29#define SIGN_FLAG_BYTE 0x80
30#define SIGN_FLAG_WORD 0x8000
31#define SIGN_FLAG_LONG 0x80000000
32#define REAL_MODE_FLAGS_MASK 0x57FD5
33#define PROT_MODE_FLAGS_MASK 0x50DD5
36#define STRING_BLOCK_SIZE 4096
38#define GET_SEGMENT_RPL(s) ((s) & 3u)
39#define GET_SEGMENT_INDEX(s) ((s) & 0xFFF8u)
40#define SEGMENT_TABLE_INDICATOR (1 << 2)
41#define EXCEPTION_HAS_ERROR_CODE(x) (((x) == 8) || ((x) >= 10 && (x) <= 14))
43#define NO_LOCK_PREFIX()\
44if (State->PrefixFlags & FAST486_PREFIX_LOCK)\
46 Fast486Exception(State, FAST486_EXCEPTION_UD);\
50#define TOGGLE_OPSIZE(x)\
51 if (State->PrefixFlags & FAST486_PREFIX_OPSIZE) x = !x;
53#define TOGGLE_ADSIZE(x)\
54 if (State->PrefixFlags & FAST486_PREFIX_ADSIZE) x = !x;
56#define SWAP(x, y) { (x) ^= (y); (y) ^= (x); (x) ^= (y); }
58#define ALIGNMENT_CHECK(x, a) if (State->Flags.Ac \
59 && (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_AM)\
61 && (((x) % (a)) != 0))\
63 Fast486Exception(State, FAST486_EXCEPTION_AC);\
67#define PAGE_ALIGN(x) ((x) & 0xFFFFF000)
68#define PAGE_OFFSET(x) ((x) & 0x00000FFF)
69#define GET_ADDR_PDE(x) ((x) >> 22)
70#define GET_ADDR_PTE(x) (((x) >> 12) & 0x3FF)
71#define INVALID_TLB_FIELD 0xFFFFFFFF
72#define NUM_TLB_ENTRIES 0x100000
143 PFAST486_STATE
State,
144 FAST486_SEG_REGS SegmentReg,
155 PFAST486_STATE
State,
156 FAST486_SEG_REGS SegmentReg,
166 PFAST486_STATE
State,
174 PFAST486_STATE
State,
183 PFAST486_STATE
State,
192 PFAST486_STATE
State,
193 PFAST486_CALL_GATE Gate,
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
_In_ NDIS_ERROR_CODE ErrorCode
_In_ ULONG _In_ ULONG Offset
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
VOID FASTCALL Fast486ExceptionWithErrorCode(PFAST486_STATE State, FAST486_EXCEPTIONS ExceptionCode, ULONG ErrorCode)
BOOLEAN FASTCALL Fast486CallGate(PFAST486_STATE State, PFAST486_CALL_GATE Gate, BOOLEAN Call)
BOOLEAN FASTCALL Fast486PerformInterrupt(PFAST486_STATE State, UCHAR Number)
union _FAST486_PAGE_TABLE * PFAST486_PAGE_TABLE
union _FAST486_PAGE_DIR FAST486_PAGE_DIR
BOOLEAN FASTCALL Fast486WriteMemory(PFAST486_STATE State, FAST486_SEG_REGS SegmentReg, ULONG Offset, PVOID Buffer, ULONG Size)
BOOLEAN FASTCALL Fast486TaskSwitch(PFAST486_STATE State, FAST486_TASK_SWITCH_TYPE Type, USHORT Selector)
union _FAST486_PAGE_DIR * PFAST486_PAGE_DIR
enum _FAST486_TASK_SWITCH_TYPE FAST486_TASK_SWITCH_TYPE
_FAST486_TASK_SWITCH_TYPE
BOOLEAN FASTCALL Fast486ReadMemory(PFAST486_STATE State, FAST486_SEG_REGS SegmentReg, ULONG Offset, BOOLEAN InstFetch, PVOID Buffer, ULONG Size)
struct _FAST486_MOD_REG_RM * PFAST486_MOD_REG_RM
enum _FAST486_TASK_SWITCH_TYPE * PFAST486_TASK_SWITCH_TYPE
struct _FAST486_MOD_REG_RM FAST486_MOD_REG_RM
union _FAST486_PAGE_TABLE FAST486_PAGE_TABLE
FAST486_GEN_REGS SecondRegister
FAST486_GEN_REGS Register
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size