aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/amd/pi/s3_resume.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/amd/pi/s3_resume.c')
-rw-r--r--src/cpu/amd/pi/s3_resume.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cpu/amd/pi/s3_resume.c b/src/cpu/amd/pi/s3_resume.c
index 576a208926..830d1742d3 100644
--- a/src/cpu/amd/pi/s3_resume.c
+++ b/src/cpu/amd/pi/s3_resume.c
@@ -137,11 +137,12 @@ void restore_mtrr(void)
#ifdef __PRE_RAM__
static void move_stack_high_mem(void)
{
- void *high_stack;
+ void *high_stack = cbmem_find(CBMEM_ID_ROMSTAGE_RAM_STACK);
+ if (high_stack == NULL)
+ halt();
- high_stack = cbmem_find(CBMEM_ID_RESUME_SCRATCH);
- memcpy(high_stack, (void *)BSP_STACK_BASE_ADDR,
- (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE));
+ /* TODO: Make the switch with empty stack instead. */
+ memcpy(high_stack, (void *)BSP_STACK_BASE_ADDR, HIGH_ROMSTAGE_STACK_SIZE);
#ifdef __x86_64__
__asm__