projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e53821a
)
[FAST486]
author
Aleksandar Andrejevic
<aandrejevic@reactos.org>
Mon, 11 Nov 2013 15:27:54 +0000
(15:27 +0000)
committer
Aleksandar Andrejevic
<aandrejevic@reactos.org>
Mon, 11 Nov 2013 15:27:54 +0000
(15:27 +0000)
Fix Fast486GetCurrentPrivLevel.
svn path=/branches/ntvdm/; revision=60939
lib/fast486/common.h
patch
|
blob
|
history
diff --git
a/lib/fast486/common.h
b/lib/fast486/common.h
index
39c629d
..
a6c05f1
100644
(file)
--- a/
lib/fast486/common.h
+++ b/
lib/fast486/common.h
@@
-167,7
+167,16
@@
Fast486ExceptionWithErrorCode
INT
Fast486GetCurrentPrivLevel(PFAST486_STATE State)
{
- return GET_SEGMENT_RPL(State->SegmentRegs[FAST486_REG_CS].Selector);
+ if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ {
+ /* In protected mode, return the RPL of the CS */
+ return GET_SEGMENT_RPL(State->SegmentRegs[FAST486_REG_CS].Selector);
+ }
+ else
+ {
+ /* Real mode is always in supervisor mode */
+ return 0;
+ }
}
#include "common.inl"