Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/15474 )
Change subject: AMD fam10: Remove HAVE_ACPI_RESUME support ......................................................................
AMD fam10: Remove HAVE_ACPI_RESUME support
Change-Id: I62bbba8cfe515b3cae413582ff8d062a20e6741b Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/15474 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/x86/acpi_s3.c M src/arch/x86/include/arch/acpi.h M src/cpu/amd/car/post_cache_as_ram.c M src/cpu/amd/family_10h-family_15h/Kconfig M src/mainboard/asus/kcma-d8/Kconfig M src/mainboard/asus/kgpe-d16/Kconfig 6 files changed, 4 insertions(+), 79 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index 98c53d1..47f28d2 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -116,23 +116,6 @@ return 0; }
-void *acpi_backup_container(uintptr_t base, size_t size) -{ - struct resume_backup *backup_mem = cbmem_find(CBMEM_ID_RESUME); - if (!backup_mem) - return NULL; - - if (!IS_ALIGNED(base, BACKUP_PAGE_SZ) || !IS_ALIGNED(size, - BACKUP_PAGE_SZ)) - return NULL; - - if (backup_create_or_update(backup_mem, base, size) < 0) - return NULL; - - backup_mem->valid = 1; - return (void *)(uintptr_t)backup_mem->cbmem; -} - void backup_ramstage_section(uintptr_t base, size_t size) { struct resume_backup *backup_mem = cbmem_find(CBMEM_ID_RESUME); diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 259efcd..660f0dc 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -976,13 +976,6 @@ return CONFIG(HAVE_ACPI_RESUME); }
-/* Return address in reserved memory where to backup low memory - * while platform resumes from S3 suspend. Caller is responsible of - * making a complete copy of the region base..base+size, with - * parameteres base and size that meet page alignment requirement. - */ -void *acpi_backup_container(uintptr_t base, size_t size); - #if CONFIG(HAVE_ACPI_RESUME)
#ifdef __PRE_RAM__ diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c index aa8222b..dfa4c3d 100644 --- a/src/cpu/amd/car/post_cache_as_ram.c +++ b/src/cpu/amd/car/post_cache_as_ram.c @@ -27,6 +27,7 @@ #include <cpu/amd/car.h> #include <cpu/amd/msr.h> #include <arch/acpi.h> +#include <program_loading.h> #include <romstage_handoff.h>
#include "cpu/amd/car/disable_cache_as_ram.c" @@ -44,12 +45,6 @@ #define print_car_debug(format, arg...) #endif
-static size_t backup_size(void) -{ - size_t car_size = car_data_size(); - return ALIGN_UP(car_size + 1024, 1024); -} - static void memcpy_(void *d, const void *s, size_t len) { print_car_debug(" Copy [%08x-%08x] to [%08x - %08x] ...", @@ -58,13 +53,6 @@ memcpy(d, s, len); }
-static void memset_(void *d, int val, size_t len) -{ - print_car_debug(" Fill [%08x-%08x] ...", - (uint32_t) d, (uint32_t) (d + len - 1)); - memset(d, val, len); -} - static int memcmp_(void *d, const void *s, size_t len) { print_car_debug(" Compare [%08x-%08x] with [%08x - %08x] ...", @@ -73,41 +61,6 @@ return memcmp(d, s, len); }
-static void prepare_romstage_ramstack(int s3resume) -{ - size_t backup_top = backup_size(); - print_car_debug("Prepare CAR migration and stack regions..."); - - if (s3resume) { - void *resume_backup_memory = - acpi_backup_container(CONFIG_RAMBASE, HIGH_MEMORY_SAVE); - if (resume_backup_memory) - memcpy_(resume_backup_memory - + HIGH_MEMORY_SAVE - backup_top, - (void *)(CONFIG_RAMTOP - backup_top), - backup_top); - } - memset_((void *)(CONFIG_RAMTOP - backup_top), 0, backup_top); - - print_car_debug(" Done\n"); -} - -static void prepare_ramstage_region(int s3resume) -{ - size_t backup_top = backup_size(); - print_car_debug("Prepare ramstage memory region..."); - - if (s3resume) { - void *resume_backup_memory = - acpi_backup_container(CONFIG_RAMBASE, HIGH_MEMORY_SAVE); - if (resume_backup_memory) - memcpy_(resume_backup_memory, (void *) CONFIG_RAMBASE, - HIGH_MEMORY_SAVE - backup_top); - } - - print_car_debug(" Done\n"); -} - /* Disable Erratum 343 Workaround, see RevGuide for Fam10h, Pub#41322 Rev 3.33 * and RevGuide for Fam12h, Pub#44739 Rev 3.10 */ @@ -137,9 +90,10 @@ if ((*lower_stack_boundary) != 0xdeadbeef) printk(BIOS_WARNING, "BSP overran lower stack boundary. Undefined behaviour may result!\n");
- s3resume = acpi_is_wakeup_s3();
- prepare_romstage_ramstack(s3resume); + /* ACPI S3 is not supported without RELOCATABLE_RAMSTAGE and + * this will always return 0. */ + s3resume = acpi_is_wakeup_s3();
romstage_handoff_init(s3resume);
@@ -177,8 +131,6 @@ set_var_mtrr(0, 0x00000000, CACHE_TMP_RAMTOP, MTRR_TYPE_WRBACK); enable_cache();
- prepare_ramstage_region(acpi_is_wakeup_s3()); - set_sysinfo_in_ram(1); // So other core0 could start to train mem
/*copy and execute ramstage */ diff --git a/src/cpu/amd/family_10h-family_15h/Kconfig b/src/cpu/amd/family_10h-family_15h/Kconfig index e9ee855..ad4f5f4 100644 --- a/src/cpu/amd/family_10h-family_15h/Kconfig +++ b/src/cpu/amd/family_10h-family_15h/Kconfig @@ -10,7 +10,6 @@ select SUPPORT_CPU_UCODE_IN_CBFS select CPU_MICROCODE_MULTIPLE_FILES select CAR_GLOBAL_MIGRATION - select ACPI_HUGE_LOWMEM_BACKUP
if CPU_AMD_MODEL_10XXX
diff --git a/src/mainboard/asus/kcma-d8/Kconfig b/src/mainboard/asus/kcma-d8/Kconfig index 1a2dd90..d568ff5 100644 --- a/src/mainboard/asus/kcma-d8/Kconfig +++ b/src/mainboard/asus/kcma-d8/Kconfig @@ -27,7 +27,6 @@ select BOARD_ROMSIZE_KB_2048 select ENABLE_APIC_EXT_ID select SPI_FLASH - select HAVE_ACPI_RESUME select DRIVERS_I2C_W83795 select DRIVERS_ASPEED_AST2050 select MAINBOARD_FORCE_NATIVE_VGA_INIT diff --git a/src/mainboard/asus/kgpe-d16/Kconfig b/src/mainboard/asus/kgpe-d16/Kconfig index 32c4dbc..f3f5a5c 100644 --- a/src/mainboard/asus/kgpe-d16/Kconfig +++ b/src/mainboard/asus/kgpe-d16/Kconfig @@ -28,7 +28,6 @@ select ENABLE_APIC_EXT_ID select SPI_FLASH select MAINBOARD_HAS_LPC_TPM - select HAVE_ACPI_RESUME select DRIVERS_I2C_W83795 select DRIVERS_ASPEED_AST2050 select MAINBOARD_FORCE_NATIVE_VGA_INIT