Fix up the tree again...
* acpi_add_table requires a pointer to the RSDP, not the RSDT anymore, in order to properly support XSDT generation. * fix compilation the DSDT on gigabyte/m57sli * drop a remaining, forgotten HPET_NAME for "HPET" Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4461 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
cdfe376c06
commit
4704dc520b
|
@ -341,7 +341,7 @@ void acpi_create_hpet(acpi_hpet_t *hpet)
|
||||||
memset((void *)hpet, 0, sizeof(acpi_hpet_t));
|
memset((void *)hpet, 0, sizeof(acpi_hpet_t));
|
||||||
|
|
||||||
/* fill out header fields */
|
/* fill out header fields */
|
||||||
memcpy(header->signature, HPET_NAME, 4);
|
memcpy(header->signature, "HPET", 4);
|
||||||
memcpy(header->oem_id, OEM_ID, 6);
|
memcpy(header->oem_id, OEM_ID, 6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
memcpy(header->asl_compiler_id, ASLC, 4);
|
memcpy(header->asl_compiler_id, ASLC, 4);
|
||||||
|
|
|
@ -389,7 +389,7 @@ int acpi_get_sleep_type(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned long acpi_add_ssdt_pstates(acpi_rsdt_t *rsdt, unsigned long current);
|
unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current);
|
||||||
|
|
||||||
#define ACPI_WRITE_MADT_IOAPIC(dev,id) \
|
#define ACPI_WRITE_MADT_IOAPIC(dev,id) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -274,7 +274,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
acpi_add_table(rsdp,ssdt);
|
acpi_add_table(rsdp,ssdt);
|
||||||
|
|
||||||
printk_debug("ACPI: * SSDT for PState at %lx\n", current);
|
printk_debug("ACPI: * SSDT for PState at %lx\n", current);
|
||||||
current = acpi_add_ssdt_pstates(rsdt, current);
|
current = acpi_add_ssdt_pstates(rsdp, current);
|
||||||
|
|
||||||
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
#if CONFIG_ACPI_SSDTX_NUM >= 1
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,8 @@ if CONFIG_HAVE_ACPI_TABLES
|
||||||
object acpi_tables.o
|
object acpi_tables.o
|
||||||
makerule dsdt.c
|
makerule dsdt.c
|
||||||
depends "$(CONFIG_MAINBOARD)/dsdt.asl"
|
depends "$(CONFIG_MAINBOARD)/dsdt.asl"
|
||||||
action "iasl -p $(PWD)/dsdt -tc $(CONFIG_MAINBOARD)/dsdt.asl"
|
action "iasl -p dsdt -tc $(CONFIG_MAINBOARD)/dsdt.asl"
|
||||||
action "mv dsdt.hex dsdt.c"
|
action "mv $(CURDIR)/dsdt.hex dsdt.c"
|
||||||
end
|
end
|
||||||
object ./dsdt.o
|
object ./dsdt.o
|
||||||
end
|
end
|
||||||
|
|
|
@ -130,7 +130,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
/* Clear all table memory. */
|
/* Clear all table memory. */
|
||||||
memset((void *) start, 0, current - start);
|
memset((void *) start, 0, current - start);
|
||||||
|
|
||||||
acpi_write_rsdp(rsdp, rsdt);
|
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* We explicitly add these tables later on: */
|
/* We explicitly add these tables later on: */
|
||||||
|
@ -156,39 +156,39 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
|
|
||||||
acpi_create_fadt(fadt, facs, dsdt);
|
acpi_create_fadt(fadt, facs, dsdt);
|
||||||
acpi_add_table(rsdt, fadt);
|
acpi_add_table(rsdp, fadt);
|
||||||
|
|
||||||
printk_debug("ACPI: * HPET\n");
|
printk_debug("ACPI: * HPET\n");
|
||||||
hpet = (acpi_hpet_t *) current;
|
hpet = (acpi_hpet_t *) current;
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
acpi_create_hpet(hpet);
|
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. */
|
/* If we want to use HPET timers Linux wants an MADT. */
|
||||||
printk_debug("ACPI: * MADT\n");
|
printk_debug("ACPI: * MADT\n");
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
current += madt->header.length;
|
current += madt->header.length;
|
||||||
acpi_add_table(rsdt, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
printk_debug("ACPI: * MCFG\n");
|
printk_debug("ACPI: * MCFG\n");
|
||||||
mcfg = (acpi_mcfg_t *) current;
|
mcfg = (acpi_mcfg_t *) current;
|
||||||
acpi_create_mcfg(mcfg);
|
acpi_create_mcfg(mcfg);
|
||||||
current += mcfg->header.length;
|
current += mcfg->header.length;
|
||||||
acpi_add_table(rsdt, mcfg);
|
acpi_add_table(rsdp, mcfg);
|
||||||
|
|
||||||
printk_debug("ACPI: * SRAT\n");
|
printk_debug("ACPI: * SRAT\n");
|
||||||
srat = (acpi_srat_t *) current;
|
srat = (acpi_srat_t *) current;
|
||||||
acpi_create_srat(srat);
|
acpi_create_srat(srat);
|
||||||
current += srat->header.length;
|
current += srat->header.length;
|
||||||
acpi_add_table(rsdt, srat);
|
acpi_add_table(rsdp, srat);
|
||||||
|
|
||||||
/* SLIT */
|
/* SLIT */
|
||||||
printk_debug("ACPI: * SLIT\n");
|
printk_debug("ACPI: * SLIT\n");
|
||||||
slit = (acpi_slit_t *) current;
|
slit = (acpi_slit_t *) current;
|
||||||
acpi_create_slit(slit);
|
acpi_create_slit(slit);
|
||||||
current+=slit->header.length;
|
current+=slit->header.length;
|
||||||
acpi_add_table(rsdt,slit);
|
acpi_add_table(rsdp, slit);
|
||||||
|
|
||||||
/* SSDT */
|
/* SSDT */
|
||||||
printk_debug("ACPI: * SSDT\n");
|
printk_debug("ACPI: * SSDT\n");
|
||||||
|
@ -196,7 +196,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
|
|
||||||
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
acpi_create_ssdt_generator(ssdt, "DYNADATA");
|
||||||
current += ssdt->length;
|
current += ssdt->length;
|
||||||
acpi_add_table(rsdt, ssdt);
|
acpi_add_table(rsdp, ssdt);
|
||||||
|
|
||||||
printk_info("ACPI: done.\n");
|
printk_info("ACPI: done.\n");
|
||||||
return current;
|
return current;
|
||||||
|
|
|
@ -169,7 +169,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
/* clear all table memory */
|
/* clear all table memory */
|
||||||
memset((void *) start, 0, current - start);
|
memset((void *) start, 0, current - start);
|
||||||
|
|
||||||
acpi_write_rsdp(rsdp, rsdt);
|
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -181,7 +181,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
current += sizeof(acpi_hpet_t);
|
current += sizeof(acpi_hpet_t);
|
||||||
ALIGN_CURRENT;
|
ALIGN_CURRENT;
|
||||||
acpi_create_intel_hpet(hpet);
|
acpi_create_intel_hpet(hpet);
|
||||||
acpi_add_table(rsdt, 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 */
|
||||||
printk_debug("ACPI: * MADT\n");
|
printk_debug("ACPI: * MADT\n");
|
||||||
|
@ -190,14 +190,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
current += madt->header.length;
|
current += madt->header.length;
|
||||||
ALIGN_CURRENT;
|
ALIGN_CURRENT;
|
||||||
acpi_add_table(rsdt, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
printk_debug("ACPI: * MCFG\n");
|
printk_debug("ACPI: * MCFG\n");
|
||||||
mcfg = (acpi_mcfg_t *) current;
|
mcfg = (acpi_mcfg_t *) current;
|
||||||
acpi_create_mcfg(mcfg);
|
acpi_create_mcfg(mcfg);
|
||||||
current += mcfg->header.length;
|
current += mcfg->header.length;
|
||||||
ALIGN_CURRENT;
|
ALIGN_CURRENT;
|
||||||
acpi_add_table(rsdt, mcfg);
|
acpi_add_table(rsdp, mcfg);
|
||||||
|
|
||||||
printk_debug("ACPI: * FACS\n");
|
printk_debug("ACPI: * FACS\n");
|
||||||
facs = (acpi_facs_t *) current;
|
facs = (acpi_facs_t *) current;
|
||||||
|
@ -220,7 +220,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
ALIGN_CURRENT;
|
ALIGN_CURRENT;
|
||||||
|
|
||||||
acpi_create_fadt(fadt, facs, dsdt);
|
acpi_create_fadt(fadt, facs, dsdt);
|
||||||
acpi_add_table(rsdt, fadt);
|
acpi_add_table(rsdp, fadt);
|
||||||
|
|
||||||
printk_info("ACPI: done.\n");
|
printk_info("ACPI: done.\n");
|
||||||
return current;
|
return current;
|
||||||
|
|
|
@ -147,7 +147,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
/* Clear all table memory. */
|
/* Clear all table memory. */
|
||||||
memset((void *)start, 0, current - start);
|
memset((void *)start, 0, current - start);
|
||||||
|
|
||||||
acpi_write_rsdp(rsdp, rsdt);
|
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/* We explicitly add these tables later on: */
|
/* We explicitly add these tables later on: */
|
||||||
|
@ -171,14 +171,14 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
|
|
||||||
acpi_create_fadt(fadt, facs, dsdt);
|
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. */
|
/* If we want to use HPET timers Linux wants it in MADT. */
|
||||||
printk_debug("ACPI: * MADT\n");
|
printk_debug("ACPI: * MADT\n");
|
||||||
madt = (acpi_madt_t *) current;
|
madt = (acpi_madt_t *) current;
|
||||||
acpi_create_madt(madt);
|
acpi_create_madt(madt);
|
||||||
current += madt->header.length;
|
current += madt->header.length;
|
||||||
acpi_add_table(rsdt, madt);
|
acpi_add_table(rsdp, madt);
|
||||||
|
|
||||||
/* NO MCFG in VX855, no PCI-E. */
|
/* NO MCFG in VX855, no PCI-E. */
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
hpet = (acpi_mcfg_t *) current;
|
hpet = (acpi_mcfg_t *) current;
|
||||||
acpi_create_hpet(hpet);
|
acpi_create_hpet(hpet);
|
||||||
current += hpet->header.length;
|
current += hpet->header.length;
|
||||||
acpi_add_table(rsdt, hpet);
|
acpi_add_table(rsdp, hpet);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printk_debug("ACPI: * SSDT\n");
|
printk_debug("ACPI: * SSDT\n");
|
||||||
|
@ -195,7 +195,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
memcpy((void *)ssdt,(void *)AmlCode_ssdt, ((acpi_header_t *)AmlCode_ssdt)->length);
|
memcpy((void *)ssdt,(void *)AmlCode_ssdt, ((acpi_header_t *)AmlCode_ssdt)->length);
|
||||||
ssdt->checksum = 0; /* Don't trust iasl to get this right. */
|
ssdt->checksum = 0; /* Don't trust iasl to get this right. */
|
||||||
ssdt->checksum = acpi_checksum(ssdt, ssdt->length);
|
ssdt->checksum = acpi_checksum(ssdt, ssdt->length);
|
||||||
acpi_add_table(rsdt, ssdt);
|
acpi_add_table(rsdp, ssdt);
|
||||||
printk_debug("ACPI: * SSDT @ %08x Length %x\n", ssdt, ssdt->length);
|
printk_debug("ACPI: * SSDT @ %08x Length %x\n", ssdt, ssdt->length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
/* clear all table memory */
|
/* clear all table memory */
|
||||||
memset((void *)start, 0, current - start);
|
memset((void *)start, 0, current - start);
|
||||||
|
|
||||||
acpi_write_rsdp(rsdp, rsdt);
|
acpi_write_rsdp(rsdp, rsdt, NULL);
|
||||||
acpi_write_rsdt(rsdt);
|
acpi_write_rsdt(rsdt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -86,7 +86,7 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||||
current += sizeof(acpi_fadt_t);
|
current += sizeof(acpi_fadt_t);
|
||||||
|
|
||||||
acpi_create_fadt(fadt,facs,dsdt);
|
acpi_create_fadt(fadt,facs,dsdt);
|
||||||
acpi_add_table(rsdt,fadt);
|
acpi_add_table(rsdp,fadt);
|
||||||
|
|
||||||
printk_info("ACPI: done.\n");
|
printk_info("ACPI: done.\n");
|
||||||
return current;
|
return current;
|
||||||
|
|
|
@ -312,7 +312,7 @@ extern unsigned char AmlCode_sspr2[];
|
||||||
extern unsigned char AmlCode_sspr1[];
|
extern unsigned char AmlCode_sspr1[];
|
||||||
|
|
||||||
/* fixme: find one good way for different p_state_num */
|
/* fixme: find one good way for different p_state_num */
|
||||||
unsigned long acpi_add_ssdt_pstates(acpi_rsdt_t *rsdt, unsigned long current)
|
unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current)
|
||||||
{
|
{
|
||||||
device_t cpu;
|
device_t cpu;
|
||||||
int cpu_index = 0;
|
int cpu_index = 0;
|
||||||
|
@ -348,7 +348,7 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdt_t *rsdt, unsigned long current)
|
||||||
/* recalculate checksum */
|
/* recalculate checksum */
|
||||||
ssdt->checksum = 0;
|
ssdt->checksum = 0;
|
||||||
ssdt->checksum = acpi_checksum((unsigned char *)ssdt,ssdt->length);
|
ssdt->checksum = acpi_checksum((unsigned char *)ssdt,ssdt->length);
|
||||||
acpi_add_table(rsdt,ssdt);
|
acpi_add_table(rsdp, ssdt);
|
||||||
|
|
||||||
cpu_index++;
|
cpu_index++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue