From 8485637287a93095dc3d51725ad7be033af257cb Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 10 Dec 2020 00:06:12 +0100 Subject: soc/amd/picasso: factor out write_resume_eip to common code Change-Id: I24454aa9e2ccc98b2aceb6b189e072e6e50b8b30 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/48516 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/soc/amd/picasso/bootblock.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/soc/amd/picasso') diff --git a/src/soc/amd/picasso/bootblock.c b/src/soc/amd/picasso/bootblock.c index 0b52a17307..7d1f01cec8 100644 --- a/src/soc/amd/picasso/bootblock.c +++ b/src/soc/amd/picasso/bootblock.c @@ -2,12 +2,12 @@ #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -16,9 +16,6 @@ #include #include #include -#include - -asmlinkage void bootblock_resume_entry(void); /* PSP performs the memory training and setting up DRAM map prior to x86 cores being released. Honor TOP_MEM and set up caching from 0 til TOP_MEM. Likewise, @@ -91,23 +88,6 @@ static void set_caching(void) enable_cache(); } -static void write_resume_eip(void) -{ - msr_t s3_resume_entry = { - .hi = (uint64_t)(uintptr_t)bootblock_resume_entry >> 32, - .lo = (uintptr_t)bootblock_resume_entry & 0xffffffff, - }; - - /* - * Writing to the EIP register can only be done once, otherwise a fault is triggered. - * When this register is written, it will trigger the microcode to stash the CPU state - * (crX , mtrrs, registers, etc) into the CC6 save area. On resume, the state will be - * restored and execution will continue at the EIP. - */ - if (!acpi_is_wakeup_s3()) - wrmsr(S3_RESUME_EIP_MSR, s3_resume_entry); -} - asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { set_caching(); -- cgit v1.2.3