This fixes a couple of issues with older Linux kernels (that expect an XSDT as
soon as there's an ACPI 2.0 or later table) * add XSDT support * add more table types This patch will break at least the kontron (and possibly some new boards I missed) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4453 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Stefan Reinauer
parent
4d933dd2d6
commit
b657a3c9b7
@@ -158,7 +158,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -169,13 +169,13 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
#if 0
|
||||
/* SRAT */
|
||||
@@ -183,14 +183,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current += slit->header.length;
|
||||
acpi_add_table(rsdt, slit);
|
||||
acpi_add_table(rsdp, slit);
|
||||
#endif
|
||||
|
||||
/* SSDT */
|
||||
@@ -199,7 +199,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||
|
||||
@@ -238,7 +238,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum =
|
||||
acpi_checksum((u8 *)ssdtx, ssdtx->length);
|
||||
acpi_add_table(rsdt, ssdtx);
|
||||
acpi_add_table(rsdp, ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -261,7 +261,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -158,7 +158,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -169,13 +169,13 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
#if 0
|
||||
/* SRAT */
|
||||
@@ -183,14 +183,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current += slit->header.length;
|
||||
acpi_add_table(rsdt, slit);
|
||||
acpi_add_table(rsdp, slit);
|
||||
#endif
|
||||
|
||||
/* SSDT */
|
||||
@@ -199,7 +199,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||
|
||||
@@ -238,7 +238,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum =
|
||||
acpi_checksum((u8 *)ssdtx, ssdtx->length);
|
||||
acpi_add_table(rsdt, ssdtx);
|
||||
acpi_add_table(rsdp, ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -262,7 +262,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -221,7 +221,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -231,14 +231,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt,hpet);
|
||||
acpi_add_table(rsdp,hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current+=madt->header.length;
|
||||
acpi_add_table(rsdt,madt);
|
||||
acpi_add_table(rsdp,madt);
|
||||
|
||||
|
||||
/* SRAT */
|
||||
@@ -246,14 +246,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current+=srat->header.length;
|
||||
acpi_add_table(rsdt,srat);
|
||||
acpi_add_table(rsdp,srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
printk_debug("ACPI: * SSDT\n");
|
||||
@@ -261,7 +261,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||
|
||||
@@ -297,7 +297,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
update_ssdtx((void *)ssdtx, i);
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum = acpi_checksum((unsigned char *)ssdtx,ssdtx->length);
|
||||
acpi_add_table(rsdt,ssdtx);
|
||||
acpi_add_table(rsdp,ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -321,7 +321,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt,facs,dsdt);
|
||||
acpi_add_table(rsdt,fadt);
|
||||
acpi_add_table(rsdp,fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -223,7 +223,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -234,7 +234,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt,hpet);
|
||||
acpi_add_table(rsdp,hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
current = ( current + 0x07) & -0x08;
|
||||
@@ -242,7 +242,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current+=madt->header.length;
|
||||
acpi_add_table(rsdt,madt);
|
||||
acpi_add_table(rsdp,madt);
|
||||
|
||||
/* SRAT */
|
||||
current = ( current + 0x07) & -0x08;
|
||||
@@ -250,7 +250,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current+=srat->header.length;
|
||||
acpi_add_table(rsdt,srat);
|
||||
acpi_add_table(rsdp,srat);
|
||||
|
||||
/* SLIT */
|
||||
current = ( current + 0x07) & -0x08;
|
||||
@@ -258,7 +258,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
current = ( current + 0x0f) & -0x10;
|
||||
@@ -271,7 +271,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* recalculate checksum */
|
||||
ssdt->checksum = 0;
|
||||
ssdt->checksum = acpi_checksum((unsigned char *)ssdt,ssdt->length);
|
||||
acpi_add_table(rsdt,ssdt);
|
||||
acpi_add_table(rsdp,ssdt);
|
||||
|
||||
printk_debug("ACPI: * SSDT for PState at %lx\n", current);
|
||||
current = acpi_add_ssdt_pstates(rsdt, current);
|
||||
@@ -312,7 +312,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
update_ssdtx((void *)ssdtx, i);
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum = acpi_checksum((unsigned char *)ssdtx,ssdtx->length);
|
||||
acpi_add_table(rsdt,ssdtx);
|
||||
acpi_add_table(rsdp,ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -339,7 +339,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt,facs,dsdt);
|
||||
acpi_add_table(rsdt,fadt);
|
||||
acpi_add_table(rsdp,fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -108,7 +108,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* Clear all table memory. */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* We explicitly add these tables later on: */
|
||||
@@ -131,25 +131,25 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
/* If we want to use HPET timers Linux wants it in MADT. */
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
printk_debug("ACPI: * MCFG\n");
|
||||
mcfg = (acpi_mcfg_t *) current;
|
||||
acpi_create_mcfg(mcfg);
|
||||
current += mcfg->header.length;
|
||||
acpi_add_table(rsdt, mcfg);
|
||||
acpi_add_table(rsdp, mcfg);
|
||||
|
||||
printk_debug("ACPI: * SRAT\n");
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
printk_info("ACPI: done.\n");
|
||||
return current;
|
||||
|
@@ -119,7 +119,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* Clear all table memory. */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/* We explicitly add these tables later on: */
|
||||
@@ -146,39 +146,39 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
printk_debug("ACPI: * HPET\n");
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET timers Linux wants an MADT. */
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
printk_debug("ACPI: * MCFG\n");
|
||||
mcfg = (acpi_mcfg_t *) current;
|
||||
acpi_create_mcfg(mcfg);
|
||||
current += mcfg->header.length;
|
||||
acpi_add_table(rsdt, mcfg);
|
||||
acpi_add_table(rsdp, mcfg);
|
||||
|
||||
printk_debug("ACPI: * SRAT\n");
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
printk_debug("ACPI: * SSDT\n");
|
||||
@@ -186,7 +186,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
printk_info("ACPI: done.\n");
|
||||
return current;
|
||||
|
@@ -116,7 +116,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -128,7 +128,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current+=madt->header.length;
|
||||
acpi_add_table(rsdt,madt);
|
||||
acpi_add_table(rsdp,madt);
|
||||
|
||||
printk_info("ACPI: done.\n");
|
||||
return current;
|
||||
|
@@ -224,7 +224,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -234,14 +234,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt,hpet);
|
||||
acpi_add_table(rsdp,hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current+=madt->header.length;
|
||||
acpi_add_table(rsdt,madt);
|
||||
acpi_add_table(rsdp,madt);
|
||||
|
||||
|
||||
/* SRAT */
|
||||
@@ -249,14 +249,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current+=srat->header.length;
|
||||
acpi_add_table(rsdt,srat);
|
||||
acpi_add_table(rsdp,srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
printk_debug("ACPI: * SSDT\n");
|
||||
@@ -264,7 +264,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||
|
||||
@@ -302,7 +302,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
update_ssdtx((void *)ssdtx, i);
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum = acpi_checksum((unsigned char *)ssdtx,ssdtx->length);
|
||||
acpi_add_table(rsdt,ssdtx);
|
||||
acpi_add_table(rsdp,ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -326,7 +326,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt,facs,dsdt);
|
||||
acpi_add_table(rsdt,fadt);
|
||||
acpi_add_table(rsdp,fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -158,7 +158,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -169,13 +169,13 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
#if 0
|
||||
/* SRAT */
|
||||
@@ -183,14 +183,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
srat = (acpi_srat_t *) current;
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
printk_debug("ACPI: * SLIT\n");
|
||||
slit = (acpi_slit_t *) current;
|
||||
acpi_create_slit(slit);
|
||||
current += slit->header.length;
|
||||
acpi_add_table(rsdt, slit);
|
||||
acpi_add_table(rsdp, slit);
|
||||
#endif
|
||||
|
||||
/* SSDT */
|
||||
@@ -199,7 +199,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||
|
||||
@@ -238,7 +238,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
ssdtx->checksum = 0;
|
||||
ssdtx->checksum =
|
||||
acpi_checksum((u8 *)ssdtx, ssdtx->length);
|
||||
acpi_add_table(rsdt, ssdtx);
|
||||
acpi_add_table(rsdp, ssdtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -261,7 +261,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
#if DUMP_ACPI_TABLES == 1
|
||||
printk_debug("rsdp\n");
|
||||
|
@@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* Clear all table memory. */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
current = ALIGN(current, 64);
|
||||
@@ -136,28 +136,28 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
/* Add FADT now that we have facs and dsdt. */
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
printk_debug("ACPI: * HPET @ %p\n", hpet);
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
madt = (acpi_madt_t *) current;
|
||||
printk_debug("ACPI: * APIC/MADT @ %p\n", madt);
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
srat = (acpi_srat_t *) current;
|
||||
printk_debug("ACPI: * SRAT @ %p\n", srat);
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -165,7 +165,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SLIT @ %p\n", slit);
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SSDT @ %p\n", ssdt);
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
printk_info("ACPI: done %p.\n", (void *)current);
|
||||
return current;
|
||||
|
@@ -112,7 +112,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* Clear all table memory. */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
current = ALIGN(current, 64);
|
||||
@@ -136,28 +136,28 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
/* Add FADT now that we have facs and dsdt. */
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
printk_debug("ACPI: * HPET @ %p\n", hpet);
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
madt = (acpi_madt_t *) current;
|
||||
printk_debug("ACPI: * APIC/MADT @ %p\n", madt);
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
srat = (acpi_srat_t *) current;
|
||||
printk_debug("ACPI: * SRAT @ %p\n", srat);
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -165,7 +165,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SLIT @ %p\n", slit);
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -173,7 +173,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SSDT @ %p\n", ssdt);
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
printk_info("ACPI: done %p.\n", (void *)current);
|
||||
return current;
|
||||
|
@@ -123,7 +123,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* Clear all table memory. */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
current = ALIGN(current, 64);
|
||||
@@ -147,28 +147,28 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
|
||||
/* Add FADT now that we have facs and dsdt. */
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
printk_debug("ACPI: * HPET @ %p\n", hpet);
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
madt = (acpi_madt_t *) current;
|
||||
printk_debug("ACPI: * APIC/MADT @ %p\n", madt);
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
current = ALIGN(current, 16);
|
||||
srat = (acpi_srat_t *) current;
|
||||
printk_debug("ACPI: * SRAT @ %p\n", srat);
|
||||
acpi_create_srat(srat);
|
||||
current += srat->header.length;
|
||||
acpi_add_table(rsdt, srat);
|
||||
acpi_add_table(rsdp, srat);
|
||||
|
||||
/* SLIT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -176,7 +176,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SLIT @ %p\n", slit);
|
||||
acpi_create_slit(slit);
|
||||
current+=slit->header.length;
|
||||
acpi_add_table(rsdt,slit);
|
||||
acpi_add_table(rsdp,slit);
|
||||
|
||||
/* SSDT */
|
||||
current = ALIGN(current, 16);
|
||||
@@ -184,7 +184,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
printk_debug("ACPI: * SSDT @ %p\n", ssdt);
|
||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdt, ssdt);
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
|
||||
printk_info("ACPI: done %p.\n", (void *)current);
|
||||
return current;
|
||||
|
@@ -63,7 +63,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *)start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -86,7 +86,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt,facs,dsdt);
|
||||
acpi_add_table(rsdt,fadt);
|
||||
acpi_add_table(rsdp,fadt);
|
||||
|
||||
printk_info("ACPI: done.\n");
|
||||
return current;
|
||||
|
@@ -146,7 +146,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
/* clear all table memory */
|
||||
memset((void *) start, 0, current - start);
|
||||
|
||||
acpi_write_rsdp(rsdp, rsdt);
|
||||
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||
acpi_write_rsdt(rsdt);
|
||||
|
||||
/*
|
||||
@@ -158,7 +158,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
hpet = (acpi_hpet_t *) current;
|
||||
current += sizeof(acpi_hpet_t);
|
||||
acpi_create_via_hpet(hpet);
|
||||
acpi_add_table(rsdt, hpet);
|
||||
acpi_add_table(rsdp, hpet);
|
||||
|
||||
/* If we want to use HPET Timers Linux wants an MADT */
|
||||
printk_debug("ACPI: * MADT\n");
|
||||
@@ -166,13 +166,13 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
madt = (acpi_madt_t *) current;
|
||||
acpi_create_madt(madt);
|
||||
current += madt->header.length;
|
||||
acpi_add_table(rsdt, madt);
|
||||
acpi_add_table(rsdp, madt);
|
||||
|
||||
printk_debug("ACPI: * MCFG\n");
|
||||
mcfg = (acpi_mcfg_t *) current;
|
||||
acpi_create_mcfg(mcfg);
|
||||
current += mcfg->header.length;
|
||||
acpi_add_table(rsdt, mcfg);
|
||||
acpi_add_table(rsdp, mcfg);
|
||||
|
||||
printk_debug("ACPI: * FACS\n");
|
||||
facs = (acpi_facs_t *) current;
|
||||
@@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
current += sizeof(acpi_fadt_t);
|
||||
|
||||
acpi_create_fadt(fadt, facs, dsdt);
|
||||
acpi_add_table(rsdt, fadt);
|
||||
acpi_add_table(rsdp, fadt);
|
||||
|
||||
printk_debug("ACPI: * DMI (Linux workaround)\n");
|
||||
memcpy((void *)0xfff80, dmi_table, DMI_TABLE_SIZE);
|
||||
|
Reference in New Issue
Block a user