[coreboot-gerrit] Patch set updated for coreboot: arch/x86: Support "weak" BIST and timestamp save routines
Leroy P Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Fri Jun 10 23:28:13 CEST 2016
Leroy P Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15126
-gerrit
commit 94e460dc22053ad5f57334a5f93a623c9ee5fdb7
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Sun Jun 5 18:41:00 2016 -0700
arch/x86: Support "weak" BIST and timestamp save routines
Not all x86 architectures support the mm register set. The default
routine that saves BIST in mm0 and a "weak" routine that saves the TSC
value in mm2:mm1. Select the Kconfig value
BOOTBLOCK_SAVE_BIST_AND_TIMESTAMP to provide a replacement routine to
save the BIST and timestamp values.
TEST=Build and run on Amenia and Galileo Gen2.
Change-Id: I8119e74664ac3522c011767d424d441cd62545ce
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/arch/x86/Kconfig | 9 +++++++++
src/arch/x86/bootblock_crt0.S | 22 +++++++++++++++++++---
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 724c4db..8a96420 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -126,6 +126,15 @@ config BOOTBLOCK_NORTHBRIDGE_INIT
config BOOTBLOCK_RESETS
string
+config BOOTBLOCK_SAVE_BIST_AND_TIMESTAMP
+ bool
+ default n
+ help
+ Select this value to provide a routine to save the BIST and timestamp
+ values. The default code places the BIST value in MM0 and the
+ timestamp value in MM2:MM1. Another file is necessary when the CPU
+ does not support the MMx register set.
+
config HAVE_CMOS_DEFAULT
def_bool n
diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S
index 9fbce5d..9f4ab68 100644
--- a/src/arch/x86/bootblock_crt0.S
+++ b/src/arch/x86/bootblock_crt0.S
@@ -34,12 +34,28 @@
bootblock_protected_mode_entry:
- /* Save BIST result */
- movd %eax, %mm0
- /* Save an early timestamp */
+
+ /* BIST result in eax */
+ movl %eax, %ebx
+
+ /* Get an early timestamp */
rdtsc
+
+#if IS_ENABLED(CONFIG_BOOTBLOCK_SAVE_BIST_AND_TIMESTAMP)
+ lea 1f, %ebp
+
+ /* eax: Low 32-bits of timestamp
+ * ebx: BIST result
+ * ebp: return address
+ * edx: High 32-bits of timestamp
+ */
+ jmp bootblock_save_bist_and_timestamp
+1:
+#else
+ movd %ebx, %mm0
movd %eax, %mm1
movd %edx, %mm2
+#endif
#if IS_ENABLED(CONFIG_SSE)
enable_sse:
More information about the coreboot-gerrit
mailing list