summaryrefslogtreecommitdiff
path: root/src/cpu/amd/pi
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2016-06-18 17:55:08 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2016-07-15 12:31:07 +0200
commitcbb23af2da23f4dab63ffdc89343189bc4fb9680 (patch)
treee94ed935ed34e7d003893b5f12469089aff9a3c5 /src/cpu/amd/pi
parentf32d5b8b66cb3679942501c39ee76587b8c0b0f1 (diff)
AMD binaryPI: Use common romstage ram stack
Note that no binaryPI board has HAVE_ACPI_RESUME. Change-Id: I52d0bd7dac86822242400f68f6dc202f02d6e0f1 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/15575 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/cpu/amd/pi')
-rw-r--r--src/cpu/amd/pi/s3_resume.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/amd/pi/s3_resume.c b/src/cpu/amd/pi/s3_resume.c
index 830d1742d3..6426c979b8 100644
--- a/src/cpu/amd/pi/s3_resume.c
+++ b/src/cpu/amd/pi/s3_resume.c
@@ -25,6 +25,7 @@
#include <device/device.h>
#include <arch/io.h>
#include <arch/acpi.h>
+#include <program_loading.h>
#include <string.h>
#include "Porting.h"
#include <northbridge/amd/pi/BiosCallOuts.h>
@@ -137,12 +138,13 @@ void restore_mtrr(void)
#ifdef __PRE_RAM__
static void move_stack_high_mem(void)
{
- void *high_stack = cbmem_find(CBMEM_ID_ROMSTAGE_RAM_STACK);
- if (high_stack == NULL)
+ uintptr_t high_stack = romstage_ram_stack_base(HIGH_ROMSTAGE_STACK_SIZE,
+ ROMSTAGE_STACK_CBMEM);
+ if (!high_stack)
halt();
/* TODO: Make the switch with empty stack instead. */
- memcpy(high_stack, (void *)BSP_STACK_BASE_ADDR, HIGH_ROMSTAGE_STACK_SIZE);
+ memcpy((void*)high_stack, (void *)BSP_STACK_BASE_ADDR, HIGH_ROMSTAGE_STACK_SIZE);
#ifdef __x86_64__
__asm__