Fix the blank in acpi_tables.c
Change-Id: I65d50616e49802b7bb13f02369c4898fa4a238a4 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/903 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* DSDT */
|
/* DSDT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
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);
|
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||||
|
|
||||||
/* FACS */ // it needs 64 bit alignment
|
/* FACS */ // it needs 64 bit alignment
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||||
current += sizeof(acpi_facs_t);
|
current += sizeof(acpi_facs_t);
|
||||||
acpi_create_facs(facs);
|
acpi_create_facs(facs);
|
||||||
|
|
||||||
/* FADT */
|
/* FADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||||
fadt = (acpi_fadt_t *) current;
|
fadt = (acpi_fadt_t *) current;
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
/*
|
/*
|
||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -163,7 +163,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, hpet);
|
acpi_add_table(rsdp, hpet);
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) current;
|
srat = (acpi_srat_t *) current;
|
||||||
acpi_create_srat(srat);
|
acpi_create_srat(srat);
|
||||||
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, srat);
|
acpi_add_table(rsdp, srat);
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) current;
|
slit = (acpi_slit_t *) current;
|
||||||
acpi_create_slit(slit);
|
acpi_create_slit(slit);
|
||||||
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, slit);
|
acpi_add_table(rsdp, slit);
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = ( current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||||
ssdt = (acpi_header_t *)current;
|
ssdt = (acpi_header_t *)current;
|
||||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||||
@ -216,7 +216,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
} else {
|
} else {
|
||||||
c = (u8) ('A' + i - 1 - 6);
|
c = (u8) ('A' + i - 1 - 6);
|
||||||
}
|
}
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||||
ssdtx = (acpi_header_t *)current;
|
ssdtx = (acpi_header_t *)current;
|
||||||
switch (sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
|
@ -237,7 +237,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
#ifdef UNUSED_CODE // Don't need HPET table. we have one in dsdt
|
#ifdef UNUSED_CODE // Don't need HPET table. we have one in dsdt
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -246,7 +246,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -254,14 +254,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = (current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||||
if (srat != NULL) {
|
if (srat != NULL) {
|
||||||
@ -273,7 +273,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||||
if (slit != NULL) {
|
if (slit != NULL) {
|
||||||
@ -285,7 +285,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = (current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * AGESA ALIB SSDT at %lx\n", current);
|
||||||
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
alib = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_ALIB);
|
||||||
if (alib != NULL) {
|
if (alib != NULL) {
|
||||||
|
@ -216,7 +216,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = (current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
|
@ -144,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* DSDT */
|
/* DSDT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
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);
|
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||||
|
|
||||||
/* FACS */ // it needs 64 bit alignment
|
/* FACS */ // it needs 64 bit alignment
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||||
current += sizeof(acpi_facs_t);
|
current += sizeof(acpi_facs_t);
|
||||||
acpi_create_facs(facs);
|
acpi_create_facs(facs);
|
||||||
|
|
||||||
/* FADT */
|
/* FADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||||
fadt = (acpi_fadt_t *) current;
|
fadt = (acpi_fadt_t *) current;
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
/*
|
/*
|
||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, hpet);
|
acpi_add_table(rsdp, hpet);
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) current;
|
srat = (acpi_srat_t *) current;
|
||||||
acpi_create_srat(srat);
|
acpi_create_srat(srat);
|
||||||
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, srat);
|
acpi_add_table(rsdp, srat);
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) current;
|
slit = (acpi_slit_t *) current;
|
||||||
acpi_create_slit(slit);
|
acpi_create_slit(slit);
|
||||||
@ -203,7 +203,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, slit);
|
acpi_add_table(rsdp, slit);
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = ( current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * coreboot PSTATE/TOM SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * coreboot PSTATE/TOM SSDT at %lx\n", current);
|
||||||
ssdt = (acpi_header_t *) current;
|
ssdt = (acpi_header_t *) current;
|
||||||
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
|
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
|
||||||
|
@ -198,7 +198,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* DSDT */
|
/* DSDT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||||
dsdt = (acpi_header_t *)current;
|
dsdt = (acpi_header_t *)current;
|
||||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
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);
|
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
|
||||||
|
|
||||||
/* FACS */ // it needs 64 bit alignment
|
/* FACS */ // it needs 64 bit alignment
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||||
facs = (acpi_facs_t *) current;
|
facs = (acpi_facs_t *) current;
|
||||||
current += sizeof(acpi_facs_t);
|
current += sizeof(acpi_facs_t);
|
||||||
acpi_create_facs(facs);
|
acpi_create_facs(facs);
|
||||||
|
|
||||||
/* FADT */
|
/* FADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||||
fadt = (acpi_fadt_t *) current;
|
fadt = (acpi_fadt_t *) current;
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
@ -225,7 +225,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
/*
|
/*
|
||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -233,7 +233,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, hpet);
|
acpi_add_table(rsdp, hpet);
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n", current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -241,7 +241,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) current;
|
srat = (acpi_srat_t *) current;
|
||||||
acpi_create_srat(srat);
|
acpi_create_srat(srat);
|
||||||
@ -249,7 +249,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, srat);
|
acpi_add_table(rsdp, srat);
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) current;
|
slit = (acpi_slit_t *) current;
|
||||||
acpi_create_slit(slit);
|
acpi_create_slit(slit);
|
||||||
@ -257,7 +257,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, slit);
|
acpi_add_table(rsdp, slit);
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = ( current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||||
ssdt = (acpi_header_t *)current;
|
ssdt = (acpi_header_t *)current;
|
||||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||||
@ -287,7 +287,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
else {
|
else {
|
||||||
c = (u8) ('A' + i - 1 - 6);
|
c = (u8) ('A' + i - 1 - 6);
|
||||||
}
|
}
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||||
ssdtx = (acpi_header_t *)current;
|
ssdtx = (acpi_header_t *)current;
|
||||||
switch(sysconf.hcid[i]) {
|
switch(sysconf.hcid[i]) {
|
||||||
|
@ -215,7 +215,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = (current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
|
@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* DSDT */
|
/* DSDT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
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);
|
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||||
|
|
||||||
/* FACS */ // it needs 64 bit alignment
|
/* FACS */ // it needs 64 bit alignment
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||||
current += sizeof(acpi_facs_t);
|
current += sizeof(acpi_facs_t);
|
||||||
acpi_create_facs(facs);
|
acpi_create_facs(facs);
|
||||||
|
|
||||||
/* FADT */
|
/* FADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||||
fadt = (acpi_fadt_t *) current;
|
fadt = (acpi_fadt_t *) current;
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
@ -155,7 +155,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
/*
|
/*
|
||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -163,7 +163,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, hpet);
|
acpi_add_table(rsdp, hpet);
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -171,7 +171,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) current;
|
srat = (acpi_srat_t *) current;
|
||||||
acpi_create_srat(srat);
|
acpi_create_srat(srat);
|
||||||
@ -179,7 +179,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, srat);
|
acpi_add_table(rsdp, srat);
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) current;
|
slit = (acpi_slit_t *) current;
|
||||||
acpi_create_slit(slit);
|
acpi_create_slit(slit);
|
||||||
@ -187,7 +187,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
acpi_add_table(rsdp, slit);
|
acpi_add_table(rsdp, slit);
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = ( current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||||
ssdt = (acpi_header_t *)current;
|
ssdt = (acpi_header_t *)current;
|
||||||
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
|
||||||
@ -216,7 +216,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
} else {
|
} else {
|
||||||
c = (u8) ('A' + i - 1 - 6);
|
c = (u8) ('A' + i - 1 - 6);
|
||||||
}
|
}
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); //pci0 and pci1 are in dsdt
|
||||||
ssdtx = (acpi_header_t *)current;
|
ssdtx = (acpi_header_t *)current;
|
||||||
switch (sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
|
@ -164,7 +164,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
* We explicitly add these tables later on:
|
* We explicitly add these tables later on:
|
||||||
*/
|
*/
|
||||||
#if 0 // Don't need HPET table.
|
#if 0 // Don't need HPET table.
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If we want to use HPET Timers Linux wants an MADT */
|
/* If we want to use HPET Timers Linux wants an MADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n",current);
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
@ -188,7 +188,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
/* SRAT */
|
/* SRAT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
|
||||||
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
srat = (acpi_srat_t *) agesawrapper_getlateinitptr (PICK_SRAT);
|
||||||
if (srat != NULL) {
|
if (srat != NULL) {
|
||||||
@ -200,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
|
||||||
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
slit = (acpi_slit_t *) agesawrapper_getlateinitptr (PICK_SLIT);
|
||||||
if (slit != NULL) {
|
if (slit != NULL) {
|
||||||
@ -212,7 +212,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
current = ( current + 0x0f) & -0x10;
|
current = (current + 0x0f) & -0x10;
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
|
||||||
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
ssdt = (acpi_header_t *)agesawrapper_getlateinitptr (PICK_PSTATE);
|
||||||
if (ssdt != NULL) {
|
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);
|
printk(BIOS_DEBUG, "ACPI: * SSDT for PState at %lx\n", current);
|
||||||
|
|
||||||
/* DSDT */
|
/* DSDT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
|
||||||
dsdt = (acpi_header_t *)current; // it will used by fadt
|
dsdt = (acpi_header_t *)current; // it will used by fadt
|
||||||
memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
|
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);
|
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
|
||||||
|
|
||||||
/* FACS */ // it needs 64 bit alignment
|
/* FACS */ // it needs 64 bit alignment
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FACS at %lx\n", current);
|
||||||
facs = (acpi_facs_t *) current; // it will be used by fadt
|
facs = (acpi_facs_t *) current; // it will be used by fadt
|
||||||
current += sizeof(acpi_facs_t);
|
current += sizeof(acpi_facs_t);
|
||||||
acpi_create_facs(facs);
|
acpi_create_facs(facs);
|
||||||
|
|
||||||
/* FADT */
|
/* FADT */
|
||||||
current = ( current + 0x07) & -0x08;
|
current = (current + 0x07) & -0x08;
|
||||||
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
|
||||||
fadt = (acpi_fadt_t *) current;
|
fadt = (acpi_fadt_t *) current;
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
|
Reference in New Issue
Block a user