Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11106
-gerrit
commit 4eddcf7fe77b1b60315b9baa30bb955544d87475
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Fri Jul 31 16:46:28 2015 -0700
wakeup: Switch back to 32bit mode first
On x86_64 we need to leave long mode before we can switch to 16bit
mode. Oh joy! When's my 64bit resume pointer coming?
Why didn't this get caught earlier? Seems the Asrock E350M2 didn't
do Suspend/Resume?
Yes, I know it's Intel syntax. Will be converted to AT&T syntax
as soon as the whole thing actually works.. 8)
Change-Id: Ic51869cf67d842041f8842cd9964d72a024c335f
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/arch/x86/wakeup.S | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/arch/x86/wakeup.S b/src/arch/x86/wakeup.S
index 38d6ea4..acc8737 100644
--- a/src/arch/x86/wakeup.S
+++ b/src/arch/x86/wakeup.S
@@ -32,6 +32,34 @@
.globl __wakeup
__wakeup:
+#ifdef __x86_64__
+ .intel_syntax noprefix
+ xor rax,rax
+ mov ax, ss
+ push rax
+ mov rax, rsp
+ add rax, 8
+ push rax
+ pushfq
+ push 0x10
+ lea rax,[rip+3]
+ push rax
+ iretq
+
+ .code32
+
+ /* disable paging */
+ mov eax, cr0
+ btc eax, 31
+ mov cr0, eax
+
+ /* disable long mode */
+ mov ecx, 0xC0000080
+ rdmsr
+ btc eax, 8
+ wrmsr
+ .att_syntax prefix
+#endif
/* First prepare the jmp to the resume vector */
mov 0x4(%esp), %eax /* vector */
/* last 4 bits of linear addr are taken as offset */
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11025
-gerrit
commit 8a376626dec1380014dd846296898b95437b98c9
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue Jul 21 14:37:13 2015 -0700
f14: Increase AP stack to 8k on 64bit
This has been broken out from http://review.coreboot.org/#/c/10581/
Change-Id: Ia6153115ff75e21657fa8c244c9eb993d0d63772
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/vendorcode/amd/agesa/f14/gcccar.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/vendorcode/amd/agesa/f14/gcccar.inc b/src/vendorcode/amd/agesa/f14/gcccar.inc
index 2104c27..8f395ce 100644
--- a/src/vendorcode/amd/agesa/f14/gcccar.inc
+++ b/src/vendorcode/amd/agesa/f14/gcccar.inc
@@ -42,7 +42,11 @@ BSP_STACK_SIZE = 0x10000 /* 64KB for BSP core
CORE0_STACK_BASE_ADDR = 0x80000 /* Base address for primary cores stack */
CORE0_STACK_SIZE = 0x4000 /* 16KB for primary cores */
CORE1_STACK_BASE_ADDR = 0x40000 /* Base address for AP cores */
+#ifdef __x86_64__
+CORE1_STACK_SIZE = 0x2000 /* 8KB for each AP cores */
+#else
CORE1_STACK_SIZE = 0x1000 /* 4KB for each AP cores */
+#endif
APIC_BASE_ADDRESS = 0x0000001B
APIC_BSC = 8 /* Boot Strap Core */
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11025
-gerrit
commit 2c5cdc2a6801056ef4cfad3e6b52b97f86f5a07d
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue Jul 21 14:37:13 2015 -0700
f14: Increase AP stack to 8k on 64bit
This has been broken out from http://review.coreboot.org/#/c/10581/
Change-Id: Ia6153115ff75e21657fa8c244c9eb993d0d63772
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/vendorcode/amd/agesa/f14/gcccar.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/vendorcode/amd/agesa/f14/gcccar.inc b/src/vendorcode/amd/agesa/f14/gcccar.inc
index 2104c27..8f395ce 100644
--- a/src/vendorcode/amd/agesa/f14/gcccar.inc
+++ b/src/vendorcode/amd/agesa/f14/gcccar.inc
@@ -42,7 +42,11 @@ BSP_STACK_SIZE = 0x10000 /* 64KB for BSP core
CORE0_STACK_BASE_ADDR = 0x80000 /* Base address for primary cores stack */
CORE0_STACK_SIZE = 0x4000 /* 16KB for primary cores */
CORE1_STACK_BASE_ADDR = 0x40000 /* Base address for AP cores */
+#ifdef __x86_64__
+CORE1_STACK_SIZE = 0x2000 /* 8KB for each AP cores */
+#else
CORE1_STACK_SIZE = 0x1000 /* 4KB for each AP cores */
+#endif
APIC_BASE_ADDRESS = 0x0000001B
APIC_BSC = 8 /* Boot Strap Core */