diff options
author | Tom Rini <trini@konsulko.com> | 2019-08-09 23:27:15 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-09 23:27:15 -0400 |
commit | 9fd8b2c8c714b383b6768d53d7b46682fdf87013 (patch) | |
tree | 47d9b59ac1129e9bf71a065d5f3c526d1ada15a5 /arch/x86/lib/acpi_table.c | |
parent | 188f0109055300a099f90bedd96b0e93d28acfbd (diff) | |
parent | dbaec467671fd5b56cf380121340844863f5472d (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Enable SD slot on Intel Edison
- Populate CSRT ACPI table for shared DMA controller on Intel Tangier
- Convert Intel ICH-SPI driver to use new spi-mem ops
- Enable config_distro_bootcmd for QEMU x86
- Support U-Boot as a payload for Intel Slim Bootloader
- Avoid writing temporary asl files into the source tree which fixes the
parallel build issue occasionally seen
Diffstat (limited to 'arch/x86/lib/acpi_table.c')
-rw-r--r-- | arch/x86/lib/acpi_table.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 270274f6b3..0d69cf271f 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -337,6 +337,30 @@ static void acpi_create_mcfg(struct acpi_mcfg *mcfg) header->checksum = table_compute_checksum((void *)mcfg, header->length); } +__weak u32 acpi_fill_csrt(u32 current) +{ + return current; +} + +static void acpi_create_csrt(struct acpi_csrt *csrt) +{ + struct acpi_table_header *header = &(csrt->header); + u32 current = (u32)csrt + sizeof(struct acpi_csrt); + + memset((void *)csrt, 0, sizeof(struct acpi_csrt)); + + /* Fill out header fields */ + acpi_fill_header(header, "CSRT"); + header->length = sizeof(struct acpi_csrt); + header->revision = 0; + + current = acpi_fill_csrt(current); + + /* (Re)calculate length and checksum */ + header->length = current - (u32)csrt; + header->checksum = table_compute_checksum((void *)csrt, header->length); +} + static void acpi_create_spcr(struct acpi_spcr *spcr) { struct acpi_table_header *header = &(spcr->header); @@ -464,6 +488,7 @@ ulong write_acpi_tables(ulong start) struct acpi_fadt *fadt; struct acpi_mcfg *mcfg; struct acpi_madt *madt; + struct acpi_csrt *csrt; struct acpi_spcr *spcr; int i; @@ -553,6 +578,13 @@ ulong write_acpi_tables(ulong start) acpi_add_table(rsdp, mcfg); current = ALIGN(current, 16); + debug("ACPI: * CSRT\n"); + csrt = (struct acpi_csrt *)current; + acpi_create_csrt(csrt); + current += csrt->header.length; + acpi_add_table(rsdp, csrt); + current = ALIGN(current, 16); + debug("ACPI: * SPCR\n"); spcr = (struct acpi_spcr *)current; acpi_create_spcr(spcr); |