Rudolf Marek ([email protected]) just uploaded a new patch set to gerrit, 
which you can find at http://review.coreboot.org/1095

-gerrit

commit dd11f547bb130790fbe1d0f8b17591be50faf6ec
Author: Rudolf Marek <[email protected]>
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 <[email protected]>
---
 src/include/cpu/x86/msr.h |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

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__ */

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to