changeset 62c521c36f61 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=62c521c36f61
description:
        X86: Implement inUserMode for x86.

diffstat:

1 file changed, 6 insertions(+), 1 deletion(-)
src/arch/x86/utility.hh |    7 ++++++-

diffs (17 lines):

diff -r ecbd27e5d1f8 -r 62c521c36f61 src/arch/x86/utility.hh
--- a/src/arch/x86/utility.hh   Wed Feb 25 10:17:59 2009 -0800
+++ b/src/arch/x86/utility.hh   Wed Feb 25 10:18:06 2009 -0800
@@ -93,7 +93,12 @@
     static inline bool
     inUserMode(ThreadContext *tc)
     {
-        return false;
+#if FULL_SYSTEM
+        HandyM5Reg m5reg = tc->readMiscRegNoEffect(MISCREG_M5_REG);
+        return m5reg.cpl == 3;
+#else
+        return true;
+#endif
     }
 
     inline bool isCallerSaveIntegerRegister(unsigned int reg) {
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to