summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-04-19 21:46:20 +0200
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-11-16 04:22:00 +0000
commitdf0968062622072fe87408c736b71dd4ab1f37fd (patch)
treee3e9426e171e2c7a12b67988624b2b6a423fdf8a /src/soc/amd/common
parentc429ee1d9764398fe9dbb3e34b03bd3bd6d95ed9 (diff)
soc/amd/picasso: Add support for 64bit builds
Tested on google/vilboz (running the PCI rom with yabel). Change-Id: Icd72c4eef7805aacba6378632cbac7de9527673b Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63727 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/cpu/noncar/pre_c.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/pre_c.S b/src/soc/amd/common/block/cpu/noncar/pre_c.S
index 5c16c29c8f..503de3b5f4 100644
--- a/src/soc/amd/common/block/cpu/noncar/pre_c.S
+++ b/src/soc/amd/common/block/cpu/noncar/pre_c.S
@@ -25,6 +25,10 @@ bootblock_resume_entry:
bootblock_pre_c_entry:
post_code(0xa0)
+#if ENV_X86_64
+ #include <cpu/x86/64bit/entry64.inc>
+#endif
+
/* Clear .bss section */
cld
xor %eax, %eax
@@ -40,10 +44,17 @@ bootblock_pre_c_entry:
and $0xfffffff0, %esp
sub $8, %esp
+#if ENV_X86_64
+ movd %mm2, %rdi
+ shlq $32, %rdi
+ movd %mm1, %rsi
+ or %rsi, %rdi
+#else
movd %mm2, %eax
pushl %eax /* tsc[63:32] */
movd %mm1, %eax
pushl %eax /* tsc[31:0] */
+#endif
post_code(0xa2)