More PAGEBLOCKS support
This commit is contained in:
parent
6108fb25ab
commit
453d84c6d8
7 changed files with 252 additions and 48 deletions
|
|
@ -3461,6 +3461,26 @@ X86.fnFault = function(nFault, nError, fHalt)
|
|||
this.opFlags &= ~(X86.OPFLAG.NOREAD | X86.OPFLAG.NOWRITE);
|
||||
};
|
||||
|
||||
/**
|
||||
* fnPageFault(addr, fPresent, fWrite)
|
||||
*
|
||||
* Helper to dispatch page faults.
|
||||
*
|
||||
* @this {X86CPU}
|
||||
* @param {number} addr
|
||||
* @param {boolean} fPresent
|
||||
* @param {boolean} fWrite
|
||||
*/
|
||||
X86.fnPageFault = function(addr, fPresent, fWrite)
|
||||
{
|
||||
this.regCR2 = addr;
|
||||
var nError = 0;
|
||||
if (fPresent) nError |= X86.PTE.PRESENT;
|
||||
if (fWrite) nError |= X86.PTE.READWRITE;
|
||||
if (this.segCS.cpl == 3) nError |= X86.PTE.USER;
|
||||
X86.fnFault.call(this, X86.EXCEPTION.PG_FAULT, nError);
|
||||
};
|
||||
|
||||
/**
|
||||
* fnFaultMessage()
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue