[coreboot-gerrit] Patch set updated for coreboot: d39489b Add MSR support for serialICE.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Fri Mar 22 23:35:24 CET 2013


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1095

-gerrit

commit d39489bde2c81322a2b2fa0eb2f48cc224092b10
Author: Rudolf Marek <r.marek at assembler.cz>
Date:   Tue Jun 5 00:27:54 2012 +0200

    Add MSR support for serialICE.
    
    Adds MSR support forwarding, no password key yet, cpuid is missing.
    
    Change-Id: Ib33f91839d2a1b07314dc4b0f6aead00c47f1b08
    Signed-off-by: Rudolf Marek <r.marek at assembler.cz>
---
 src/include/cpu/x86/msr.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/include/cpu/x86/msr.h b/src/include/cpu/x86/msr.h
index 40926df..0ba3910 100644
--- a/src/include/cpu/x86/msr.h
+++ b/src/include/cpu/x86/msr.h
@@ -16,7 +16,7 @@ static void wrmsr(unsigned long index, msr_t msr)
 }
 
 #else
-
+#include <serialice_host.h>
 typedef struct msr_struct
 {
 	unsigned lo;
@@ -42,21 +42,34 @@ typedef struct msrinit_struct
 static inline __attribute__((always_inline)) msr_t rdmsr(unsigned index)
 {
 	msr_t result;
+#if defined(__PRE_RAM__)
 	__asm__ __volatile__ (
 		"rdmsr"
 		: "=a" (result.lo), "=d" (result.hi)
 		: "c" (index)
 		);
 	return result;
+
+#else
+	int64_t ret =  serialice_rdmsr(index, 0);
+	result.lo = ret & 0xffffffff;
+	result.hi = (ret >> 32) & 0xffffffff;
+	return result;
+#endif
 }
 
 static inline __attribute__((always_inline)) void wrmsr(unsigned index, msr_t msr)
 {
+
+#if defined(__PRE_RAM__) || CONFIG_ULINUX == 0
 	__asm__ __volatile__ (
 		"wrmsr"
 		: /* No outputs */
 		: "c" (index), "a" (msr.lo), "d" (msr.hi)
 		);
+#else
+     serialice_wrmsr ((((uint64_t) msr.hi) << 32) | msr.lo, index, 0);
+#endif
 }
 
 #endif /* __ROMCC__ */



More information about the coreboot-gerrit mailing list