diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-05-30 19:38:04 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-06-10 01:17:49 +0000 |
commit | ab516294a5d7847bd99e68566ebb84b4e30f35b9 (patch) | |
tree | 3ff7433276ca9c7e22d34ea9f981c556c2c63cef /src/southbridge | |
parent | 61ef71bcb26c4b56f7d64c09072f629a36fdadb6 (diff) |
sb/amd/agesa,cimx,pi: Select COMMON_FADT
Change-Id: Ib6a0f8a3beb3d02dfd90234b1af6eccd3cde21bb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41924
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Mike Banon <mikebdp2@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/Kconfig | 1 | ||||
-rw-r--r-- | src/southbridge/amd/agesa/hudson/fadt.c | 32 | ||||
-rw-r--r-- | src/southbridge/amd/cimx/sb800/Kconfig | 1 | ||||
-rw-r--r-- | src/southbridge/amd/cimx/sb800/fadt.c | 32 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/Kconfig | 1 | ||||
-rw-r--r-- | src/southbridge/amd/pi/hudson/fadt.c | 21 |
6 files changed, 6 insertions, 82 deletions
diff --git a/src/southbridge/amd/agesa/hudson/Kconfig b/src/southbridge/amd/agesa/hudson/Kconfig index e61bc85829..fadc69446f 100644 --- a/src/southbridge/amd/agesa/hudson/Kconfig +++ b/src/southbridge/amd/agesa/hudson/Kconfig @@ -14,6 +14,7 @@ config SOUTHBRIDGE_SPECIFIC_OPTIONS # dummy select HAVE_USBDEBUG_OPTIONS select HAVE_CF9_RESET select HAVE_CF9_RESET_PREPARE + select COMMON_FADT select SOC_AMD_COMMON select SOC_AMD_COMMON_BLOCK select SOC_AMD_COMMON_BLOCK_ACPIMMIO diff --git a/src/southbridge/amd/agesa/hudson/fadt.c b/src/southbridge/amd/agesa/hudson/fadt.c index 06f3b9a6b4..cbdcbab1c5 100644 --- a/src/southbridge/amd/agesa/hudson/fadt.c +++ b/src/southbridge/amd/agesa/hudson/fadt.c @@ -23,33 +23,10 @@ * Reference section 5.2.9 Fixed ACPI Description Table (FADT) * in the ACPI 3.0b specification. */ -void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) +void acpi_fill_fadt(acpi_fadt_t *fadt) { - acpi_header_t *header = &(fadt->header); - printk(BIOS_DEBUG, "pm_base: 0x%04x\n", HUDSON_ACPI_IO_BASE); - /* Prepare the header */ - memset((void *)fadt, 0, sizeof(acpi_fadt_t)); - memcpy(header->signature, "FACP", 4); - header->length = sizeof(acpi_fadt_t); - header->revision = get_acpi_table_revision(FADT); - memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); - memcpy(header->asl_compiler_id, ASLC, 4); - header->asl_compiler_revision = asl_revision; - - if ((uintptr_t)facs > 0xffffffff) - printk(BIOS_DEBUG, "ACPI: FACS lives above 4G\n"); - else - fadt->firmware_ctrl = (uintptr_t)facs; - - if ((uintptr_t)dsdt > 0xffffffff) - printk(BIOS_DEBUG, "ACPI: DSDT lives above 4G\n"); - else - fadt->dsdt = (uintptr_t)dsdt; - - fadt->reserved = 0; /* reserved, should be 0 ACPI 3.0 */ fadt->preferred_pm_profile = PM_UNSPECIFIED; fadt->sci_int = 9; /* HUDSON - IRQ 09 - ACPI SCI */ @@ -113,11 +90,6 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->ARM_boot_arch = 0; /* MUST be 0 ACPI 3.0 */ fadt->FADT_MinorVersion = 0; /* MUST be 0 ACPI 3.0 */ - fadt->x_firmware_ctl_l = ((uintptr_t)facs) & 0xffffffff; - fadt->x_firmware_ctl_h = ((uint64_t)(uintptr_t)facs) >> 32; - fadt->x_dsdt_l = ((uintptr_t)dsdt) & 0xffffffff; - fadt->x_dsdt_h = ((uint64_t)(uintptr_t)dsdt) >> 32; - fadt->x_pm1a_evt_blk.space_id = ACPI_ADDRESS_SPACE_IO; fadt->x_pm1a_evt_blk.bit_width = 32; fadt->x_pm1a_evt_blk.bit_offset = 0; @@ -181,6 +153,4 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.addrl = 0; fadt->x_gpe1_blk.addrh = 0x0; - - header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t)); } diff --git a/src/southbridge/amd/cimx/sb800/Kconfig b/src/southbridge/amd/cimx/sb800/Kconfig index 8379d233f5..8d15f7b688 100644 --- a/src/southbridge/amd/cimx/sb800/Kconfig +++ b/src/southbridge/amd/cimx/sb800/Kconfig @@ -8,6 +8,7 @@ config SOUTHBRIDGE_AMD_CIMX_SB800 select AMD_SB_CIMX select HAVE_CF9_RESET select HAVE_CF9_RESET_PREPARE + select COMMON_FADT select SOC_AMD_COMMON select SOC_AMD_COMMON_BLOCK select SOC_AMD_COMMON_BLOCK_ACPIMMIO diff --git a/src/southbridge/amd/cimx/sb800/fadt.c b/src/southbridge/amd/cimx/sb800/fadt.c index 153becca98..5ddb2f46fe 100644 --- a/src/southbridge/amd/cimx/sb800/fadt.c +++ b/src/southbridge/amd/cimx/sb800/fadt.c @@ -27,34 +27,12 @@ * Reference section 5.2.9 Fixed ACPI Description Table (FADT) * in the ACPI 3.0b specification. */ -void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) +void acpi_fill_fadt(acpi_fadt_t *fadt) { u16 val = 0; - acpi_header_t *header = &(fadt->header); printk(BIOS_DEBUG, "ACPI_BLK_BASE: 0x%04x\n", ACPI_BLK_BASE); - /* Prepare the header */ - memset((void *)fadt, 0, sizeof(acpi_fadt_t)); - memcpy(header->signature, "FACP", 4); - header->length = sizeof(acpi_fadt_t); - header->revision = get_acpi_table_revision(FADT); - memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); - memcpy(header->asl_compiler_id, ASLC, 4); - header->asl_compiler_revision = asl_revision; - - if ((uintptr_t)facs > 0xffffffff) - printk(BIOS_DEBUG, "ACPI: FACS lives above 4G\n"); - else - fadt->firmware_ctrl = (uintptr_t)facs; - - if ((uintptr_t)dsdt > 0xffffffff) - printk(BIOS_DEBUG, "ACPI: DSDT lives above 4G\n"); - else - fadt->dsdt = (uintptr_t)dsdt; - - fadt->reserved = 0; /* reserved, should be 0 ACPI 3.0 */ fadt->preferred_pm_profile = PM_DESKTOP; fadt->sci_int = 9; /* HUDSON 1 - IRQ 09 - ACPI SCI */ @@ -135,11 +113,6 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->ARM_boot_arch = 0; /* MUST be 0 ACPI 3.0 */ fadt->FADT_MinorVersion = 0; /* MUST be 0 ACPI 3.0 */ - fadt->x_firmware_ctl_l = ((uintptr_t)facs) & 0xffffffff; - fadt->x_firmware_ctl_h = ((uint64_t)(uintptr_t)facs) >> 32; - fadt->x_dsdt_l = ((uintptr_t)dsdt) & 0xffffffff; - fadt->x_dsdt_h = ((uint64_t)(uintptr_t)dsdt) >> 32; - fadt->x_pm1a_evt_blk.space_id = ACPI_ADDRESS_SPACE_IO; fadt->x_pm1a_evt_blk.bit_width = 32; fadt->x_pm1a_evt_blk.bit_offset = 0; @@ -200,7 +173,4 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.addrl = 0; fadt->x_gpe1_blk.addrh = 0x0; - - header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t)); - } diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig index b56969008b..92a1bb1f71 100644 --- a/src/southbridge/amd/pi/hudson/Kconfig +++ b/src/southbridge/amd/pi/hudson/Kconfig @@ -17,6 +17,7 @@ config SOUTHBRIDGE_SPECIFIC_OPTIONS # dummy select HAVE_USBDEBUG_OPTIONS select HAVE_CF9_RESET select HAVE_CF9_RESET_PREPARE + select COMMON_FADT select SOC_AMD_COMMON select SOC_AMD_COMMON_BLOCK select SOC_AMD_COMMON_BLOCK_ACPIMMIO diff --git a/src/southbridge/amd/pi/hudson/fadt.c b/src/southbridge/amd/pi/hudson/fadt.c index c3be679c99..5bc6fbd2e5 100644 --- a/src/southbridge/amd/pi/hudson/fadt.c +++ b/src/southbridge/amd/pi/hudson/fadt.c @@ -23,25 +23,10 @@ * Reference section 5.2.9 Fixed ACPI Description Table (FADT) * in the ACPI 3.0b specification. */ -void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) +void acpi_fill_fadt(acpi_fadt_t *fadt) { - acpi_header_t *header = &(fadt->header); - printk(BIOS_DEBUG, "pm_base: 0x%04x\n", HUDSON_ACPI_IO_BASE); - /* Prepare the header */ - memset((void *)fadt, 0, sizeof(acpi_fadt_t)); - memcpy(header->signature, "FACP", 4); - header->length = sizeof(acpi_fadt_t); - header->revision = get_acpi_table_revision(FADT); - memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); - memcpy(header->asl_compiler_id, ASLC, 4); - header->asl_compiler_revision = asl_revision; - - fadt->firmware_ctrl = (u32) facs; - fadt->dsdt = (u32) dsdt; - fadt->reserved = 0; /* reserved, should be 0 ACPI 3.0 */ fadt->preferred_pm_profile = PM_UNSPECIFIED; fadt->sci_int = 9; /* HUDSON - IRQ 09 - ACPI SCI */ @@ -107,8 +92,6 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->x_firmware_ctl_l = 0; /* set to 0 if firmware_ctrl is used */ fadt->x_firmware_ctl_h = 0; - fadt->x_dsdt_l = (u32) dsdt; - fadt->x_dsdt_h = 0; fadt->x_pm1a_evt_blk.space_id = ACPI_ADDRESS_SPACE_IO; fadt->x_pm1a_evt_blk.bit_width = 32; @@ -173,6 +156,4 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.addrl = 0; fadt->x_gpe1_blk.addrh = 0x0; - - header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t)); } |