summaryrefslogtreecommitdiff
path: root/src/cpu/amd/agesa/s3_resume.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-18 01:14:01 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-07-21 23:36:06 +0200
commit67b9430b367a9f9a884043f14365a55b7ef3c45c (patch)
tree950a1b04563c5471b256a95f10cdc5b9e70628b3 /src/cpu/amd/agesa/s3_resume.c
parent29e6548ac2b720bdccf8367d2a663f128351df38 (diff)
downloadcoreboot-67b9430b367a9f9a884043f14365a55b7ef3c45c.tar.xz
cpu: port amd/agesa to 64bit
Change-Id: I8644b04f4b57db5fc95ec155d3f78d53c63c9831 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/10579 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Diffstat (limited to 'src/cpu/amd/agesa/s3_resume.c')
-rw-r--r--src/cpu/amd/agesa/s3_resume.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/amd/agesa/s3_resume.c b/src/cpu/amd/agesa/s3_resume.c
index 5e07d7a405..98671f47d5 100644
--- a/src/cpu/amd/agesa/s3_resume.c
+++ b/src/cpu/amd/agesa/s3_resume.c
@@ -56,10 +56,17 @@ static void move_stack_high_mem(void)
memcpy(high_stack, (void *)BSP_STACK_BASE_ADDR, HIGH_ROMSTAGE_STACK_SIZE);
/* TODO: We only switch stack on BSP. */
+#ifdef __x86_64__
+ __asm__
+ volatile ("add %0, %%rsp; add %0, %%rbp; invd"::"g"
+ (high_stack - BSP_STACK_BASE_ADDR)
+ :);
+#else
__asm__
volatile ("add %0, %%esp; add %0, %%ebp; invd"::"g"
(high_stack - BSP_STACK_BASE_ADDR)
:);
+#endif
}
static void set_resume_cache(void)