mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:23:01 +00:00
[FAST486]
Fix Fast486GetCurrentPrivLevel. svn path=/branches/ntvdm/; revision=60939
This commit is contained in:
parent
e53821aed0
commit
8389b692ea
1 changed files with 10 additions and 1 deletions
|
@ -167,7 +167,16 @@ Fast486ExceptionWithErrorCode
|
||||||
INT
|
INT
|
||||||
Fast486GetCurrentPrivLevel(PFAST486_STATE State)
|
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"
|
#include "common.inl"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue