Refactor some alignment handling
Made using coccinelle: @@ expression E; @@ -(E + 7) & -8 +ALIGN(E, 8) @@ expression E; @@ -(E + 15) & -16 +ALIGN(E, 16) Change-Id: I071d2c98cd95580d7de21d256c31b6368a3dc70b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/910 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
d6e4d518b1
commit
26b00e6d39
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -130,7 +130,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -138,7 +138,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -146,7 +146,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -154,7 +154,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -162,7 +162,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -191,7 +191,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -220,7 +220,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -229,7 +229,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* FDAT */
|
||||
#if CONFIG_BOARD_HAS_FADT == 1
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -137,14 +137,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -163,7 +163,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -216,7 +216,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
|
|
@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
* We explicitly add these tables later on:
|
||||
*/
|
||||
#ifdef UNUSED_CODE // Don't need HPET table. we have one in dsdt
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -246,7 +246,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -254,14 +254,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -273,7 +273,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -285,7 +285,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -299,7 +299,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -311,7 +311,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -182,14 +182,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -208,7 +208,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -216,14 +216,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -265,7 +265,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -277,7 +277,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -123,7 +123,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -199,7 +199,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); /* pci0 and pci1 are in dsdt */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
ssdtx = (acpi_header_t *) current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
case 1: /* 8132 */
|
||||
|
|
|
@ -126,7 +126,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -144,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -153,14 +153,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -203,7 +203,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot PSTATE/TOM SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -182,14 +182,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -208,7 +208,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -216,14 +216,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -265,7 +265,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -277,7 +277,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -174,7 +174,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); //it will get sblk, pci1234, hcdn, and sbdn
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ( start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -264,7 +264,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch(sysconf.hcid[i]) {
|
||||
|
|
|
@ -180,7 +180,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); //it will get sblk, pci1234, hcdn, and sbdn
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ( start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -198,7 +198,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -207,14 +207,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -225,7 +225,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -233,7 +233,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n", current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -241,7 +241,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -249,7 +249,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -257,7 +257,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -287,7 +287,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch(sysconf.hcid[i]) {
|
||||
|
|
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -182,14 +182,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -208,7 +208,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -216,14 +216,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -265,7 +265,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -277,7 +277,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -137,14 +137,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -163,7 +163,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -216,7 +216,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
|
|
@ -143,7 +143,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -181,14 +181,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -212,7 +212,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -234,7 +234,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * SSDT for PState at %lx\n", current);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -243,14 +243,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -182,14 +182,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -208,7 +208,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -216,14 +216,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -265,7 +265,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -277,7 +277,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -92,7 +92,7 @@ unsigned long acpi_fill_madt(unsigned long current)
|
|||
return current;
|
||||
}
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -123,7 +123,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -178,7 +178,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); /* pci0 and pci1 are in dsdt */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
ssdtx = (acpi_header_t *) current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
case 1: /* 8132 */
|
||||
|
|
|
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current;
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -182,14 +182,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current;
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -208,7 +208,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -216,14 +216,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -265,7 +265,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -277,7 +277,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -94,7 +94,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -105,7 +105,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -105,7 +105,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -108,7 +108,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -109,7 +109,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -109,7 +109,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -129,7 +129,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -137,7 +137,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -145,7 +145,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -153,7 +153,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -161,7 +161,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -190,7 +190,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -219,7 +219,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -228,14 +228,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -148,7 +148,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -156,7 +156,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -164,7 +164,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -172,7 +172,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -180,7 +180,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot PSTATE/TOM SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
|
||||
|
@ -188,7 +188,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp,ssdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -197,14 +197,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -130,7 +130,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -138,7 +138,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -146,7 +146,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -154,7 +154,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -162,7 +162,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -191,7 +191,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -220,7 +220,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -229,7 +229,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* FDAT */
|
||||
#if CONFIG_BOARD_HAS_FADT == 1
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -130,7 +130,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -138,7 +138,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -146,7 +146,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -154,7 +154,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -162,7 +162,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -191,7 +191,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -220,7 +220,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -229,7 +229,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* FDAT */
|
||||
#if CONFIG_BOARD_HAS_FADT == 1
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -175,7 +175,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -116,7 +116,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -108,7 +108,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -136,7 +136,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -144,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -152,7 +152,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -160,7 +160,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -189,7 +189,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -218,7 +218,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -227,14 +227,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -108,7 +108,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -136,7 +136,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -144,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -152,7 +152,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -160,7 +160,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -189,7 +189,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -218,7 +218,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -227,14 +227,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -124,7 +124,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -126,7 +126,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -144,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -153,14 +153,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -203,7 +203,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot PSTATE/TOM SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -115,7 +115,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
#endif
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
}
|
||||
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -103,7 +103,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_madt_t *madt;
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = ( start + 0x0f ) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -127,7 +127,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -181,7 +181,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); //it will get sblk, pci1234, hcdn, and sbdn
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = ( start + 0x0f ) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -251,7 +251,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
c = (uint8_t) ('A' + i - 1 - 6);
|
||||
}
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); //pci0 and pci1 are in dsdt
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch(sysconf.hcid[i]) {
|
||||
case 1: //8132
|
||||
|
|
|
@ -109,7 +109,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -129,7 +129,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -137,7 +137,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -145,7 +145,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -153,7 +153,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -161,7 +161,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -190,7 +190,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -219,7 +219,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -228,14 +228,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -124,7 +124,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -186,7 +186,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
|
||||
|
|
|
@ -120,7 +120,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current)
|
|||
|
||||
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
unsigned long current;
|
||||
|
|
|
@ -174,7 +174,7 @@ unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_ta
|
|||
return (unsigned long) (acpigen_get_current());
|
||||
}
|
||||
|
||||
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
|
||||
#define ALIGN_CURRENT current = (ALIGN(current, 16))
|
||||
|
||||
unsigned long write_acpi_tables(unsigned long start)
|
||||
{
|
||||
|
|
|
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
* We explicitly add these tables later on:
|
||||
*/
|
||||
#ifdef UNUSED_CODE // Don't need HPET table. we have one in dsdt
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -246,7 +246,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -254,14 +254,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* HEST */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
hest = (acpi_hest_t *)current;
|
||||
acpi_write_hest((void *)current);
|
||||
acpi_add_table(rsdp, (void *)current);
|
||||
current += ((acpi_header_t *)current)->length;
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||
if (srat != NULL) {
|
||||
|
@ -273,7 +273,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||
if (slit != NULL) {
|
||||
|
@ -285,7 +285,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
}
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||
if (alib != NULL) {
|
||||
|
@ -299,7 +299,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
|
||||
/* The DSDT needs additional work for the AGESA SSDT Pstate table */
|
||||
/* Keep the comment for a while. */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * AGESA SSDT Pstate at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||
if (ssdt != NULL) {
|
||||
|
@ -311,7 +311,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, " AGESA SSDT Pstate table NULL. Skipping.\n");
|
||||
}
|
||||
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * coreboot TOM SSDT2 at %lx\n", current);
|
||||
ssdt2 = (acpi_header_t *) current;
|
||||
acpi_create_ssdt_generator(ssdt2, ACPI_TABLE_CREATOR);
|
||||
|
|
|
@ -123,7 +123,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
@ -143,7 +143,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
/*
|
||||
* We explicitly add these tables later on:
|
||||
*/
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
|
@ -151,7 +151,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
|
@ -159,7 +159,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, madt);
|
||||
|
||||
/* SRAT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
|
@ -167,7 +167,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
|
@ -175,7 +175,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_add_table(rsdp, slit);
|
||||
|
||||
/* SSDT */
|
||||
current = (current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||
|
@ -204,7 +204,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
} else {
|
||||
c = (u8) ('A' + i - 1 - 6);
|
||||
}
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||
ssdtx = (acpi_header_t *)current;
|
||||
switch (sysconf.hcid[i]) {
|
||||
|
@ -233,7 +233,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* DSDT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
||||
|
@ -242,14 +242,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||
|
||||
/* FACS */ // it needs 64 bit alignment
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||
current += sizeof(acpi_facs_t);
|
||||
acpi_create_facs(facs);
|
||||
|
||||
/* FADT */
|
||||
current = (current + 0x07) & -0x08;
|
||||
current = ALIGN(current, 8);
|
||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||
fadt = (acpi_fadt_t *) current;
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
|
|
@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
|
||||
|
|
|
@ -110,7 +110,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
|
||||
|
|
|
@ -135,7 +135,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
|
||||
|
|
|
@ -47,7 +47,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = ( start + 0x0f ) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -132,7 +132,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
#endif
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -129,7 +129,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = ( start + 0x0f ) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16byte */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
|
||||
|
|
|
@ -362,7 +362,7 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current)
|
|||
}
|
||||
printk(BIOS_DEBUG, "ACPI: pstate cpu_index=%02x, node_id=%02x, core_id=%02x\n", cpu_index, cpu->path.apic.node_id, cpu->path.apic.core_id);
|
||||
|
||||
current = ( current + 0x0f) & -0x10;
|
||||
current = ALIGN(current, 16);
|
||||
ssdt = (acpi_header_t *)current;
|
||||
memcpy(ssdt, AmlCode_sspr, sizeof(acpi_header_t));
|
||||
current += ssdt->length;
|
||||
|
|
|
@ -113,7 +113,7 @@ unsigned long __attribute__((weak)) write_acpi_tables(unsigned long start)
|
|||
acpi_header_t *dsdt;
|
||||
|
||||
/* Align ACPI tables to 16 byte. */
|
||||
start = (start + 0x0f) & -0x10;
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
||||
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
|
||||
|
|
Loading…
Reference in New Issue