Pointers
_criTSF locates the Trap Stack Frame CRI.
_criVSF locates the VDM Stack Frame CRI.
_criSEF locates the System Entry Stack Frame CRI.
_criPASCALSEF locates the PASCAL System Entry Stack Frame CRI.
_criSSF locates the SCI Stack Frame CRI.
_criDHF locates the Device Help Stack Frame CRI.
fpoldstack contains a 32-bit far pointer to the ISF built by the Interrupt Router at interrupt time.
CRI Client Register Information
┌────────────────────┬──────┬──────┬────┬────────────────────────────────────────┐│Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ulSize │+0 │4 │D │size of stack frame │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_eax │+4 │4 │S │eax rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ebx │+8 │4 │S │ebx rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ecx │+c │4 │S │ecx rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_edx │+10 │4 │S │edx rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ebp │+14 │4 │S │ebp rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_esi │+18 │4 │S │esi rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_edi │+1c │4 │S │edi rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ds │+20 │4 │S │ds rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_es │+24 │4 │S │es rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_fs │+28 │4 │S │fs rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_gs │+2c │4 │S │gs rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_cs │+30 │4 │S │cs rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_eip │+34 │4 │S │eip rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_eflag │+38 │4 │S │eflag rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_ss │+3c │4 │S │ss rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_esp │+40 │4 │S │esp rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_cbargs │+44 │4 │S │cbargs rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_trapnum │+48 │4 │S │trapnum rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_errcode │+4c │4 │S │errcode rip │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_pfnRebuild │+50 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │cri_pfpfnKernelExit │+54 │4 │D │ │ └────────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
RIP Register Information Packet
┌────────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │rip_flags │+0 │2 │W │Flags │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │rip_offset │+2 │4 │W │Offset of register into stack frame │ └────────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
rip_flags flag definitions:
┌───────────────────┬────────┬────────────────────────────────────┐ │Name │Bit Mask│Description │ ├───────────────────┼────────┼────────────────────────────────────┤ │KM_RIP_INVALID │0x0001 │invalid register │ ├───────────────────┼────────┼────────────────────────────────────┤ │KM_RIP_INVALID_SET │0x0002 │invalid register to set │ ├───────────────────┼────────┼────────────────────────────────────┤ │KM_RIP_WORD │0x0004 │word register │ ├───────────────────┼────────┼────────────────────────────────────┤ │KM_RIP_TSD_RELATIVE│0x0008 │rip_offset relative to TSD beginning│ ├───────────────────┼────────┼────────────────────────────────────┤ │KM_RIP_C32 │0x0010 │32-bit C style call │ └───────────────────┴────────┴────────────────────────────────────┘
ISF Interrupt Manager Stack Frame
This is what the stack frame looks like when the system is entered thru the interrupt manager during a hardware interrupt. For a hardware interrupt in a VDM context, the stack frame always needs to be a "VSF" type so the stack frame base is adjusted by ISF_VSF_START. The points the stack frame base to "isf_edi" in the regular interrupt frame. The interrupt stack frame has also been padded (ISF_STACK_PAD) between the general registers (EDI to EAX) and the hardware pushed registers (EIP to SS) with a dummy trap number and error code to look like the VSF stack frame.
┌────────────────────┬──────┬──────┬────┬──────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_CurrIntLevel │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_gs │+4 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padgs │+6 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_fs │+8 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padfs │+a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_es │+c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_pades │+e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_ds │+10 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padds │+12 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_edi │+14 │4 │D │start of VDM stack frame │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_esi │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_ebp │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padesp │+20 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_ebx │+24 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_edx │+28 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_ecx │+2c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_eax │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_pad │+34 │8 │B │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_eip │+3c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_cs │+40 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padcs │+42 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_eflag │+44 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_esp │+48 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_ss │+4c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼──────────────────────────────┤ │isf_padss │+4e │2 │W │ │ └────────────────────┴──────┴──────┴────┴──────────────────────────────┘
TSF Trap or Exception Stack Frame
This is what the stack frame looks like when the system is entered thru a 386 exception (from protected mode).
┌────────────────────┬──────┬──────┬────┬────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_gs │+20 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padgs │+22 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_fs │+24 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padfs │+26 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_es │+28 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_pades │+2a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_ds │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padds │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_trapnum │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_errcode │+34 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_eip │+38 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_cs │+3c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padcs │+3e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_eflag │+40 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_esp │+44 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_ss │+48 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tsf_padss │+4a │2 │W │ │ └────────────────────┴──────┴──────┴────┴────────────┘
KSF Kernel Stack Frame
This is what the stack frame looks like when the system is re-entered from ring 0. This is frame used for handling exception while already in kernel mode.
┌────────────────────┬──────┬──────┬────┬────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_gs │+20 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_padgs │+22 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_fs │+24 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_padfs │+26 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_es │+28 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_pades │+2a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_ds │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_padds │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_trapnum │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_errcode │+34 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_eip │+38 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_cs │+3c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_padcs │+3e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │ksf_eflag │+40 │4 │D │ │ └────────────────────┴──────┴──────┴────┴────────────┘
VSF VDM Process Stack Frame
This is what the stack frame looks like when the system is entered from a VDM thru a exception, software or hardware interrupt. Most of the 8086 emulation code uses this stack frame directly for performance. For hardware interrupts taken in a VDM (in either V86 mode or protected mode), the interrupt stack frame (see ISF) is adjusted to look like this frame.
The alternate stack frame holds the real or protected mode sensitive registers for the other mode. So when the VDM is in protected mode, the last V86 mode segment registers and CS:EIP, SS:ESP can be accessed, etc. Two things happen with we mode switch: 1) the alternate register set is exchanged with the regular set (vsf_eip to vsf_padgs is the exchanged with vsf_alteip to vsf_altpadgs), 2) the TSS's ESP0 value is changed to the appropriate place in the VSF structure. For V86 mode, ESP0 points to the begining of the segment registers (vsf_gs/vsf_padgs) and for protected mode ESP0 points to the SS register (vsf_ss/vsf_padss). For protected mode entry, the segments registers are stored in vsf_ds to vsf_gs explictly. This makes the V86 mode and protected mode stack frames the same for VDDs and the MVDM kernel code.
┌────────────────────┬──────┬──────┬────┬────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_trapnum │+20 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_errcode │+24 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_eip │+28 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_cs │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padcs │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_eflag │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_esp │+34 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_ss │+38 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padss │+3a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_es │+3c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_pades │+3e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_ds │+40 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padds │+42 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_fs │+44 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padfs │+46 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_gs │+48 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_padgs │+4a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_alteip │+4c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altcs │+50 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpadcs │+52 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_alteflag │+54 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altesp │+58 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altss │+5c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpadss │+5e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altes │+60 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpades │+62 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altds │+64 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpadds │+66 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altfs │+68 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpadfs │+6a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altgs │+6c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │vsf_altpadgs │+6e │2 │W │ │ └────────────────────┴──────┴──────┴────┴────────────┘
SEF System Entry Stack Frame
This is the frame put on the by the call gate system entry function (KMEnterKmodeCallGate or KMEnterKmodeAPI32).
This frame is used for:
┌────────────────────┬──────┬──────┬────┬────────────┐│Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_gs │+20 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_padgs │+22 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_fs │+24 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_padfs │+26 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_es │+28 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_pades │+2a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_ds │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_padds │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_retaddr │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_cbargs │+34 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_eflag │+38 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_eip │+3c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_cs │+40 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │sef_padcs │+42 │2 │W │ │ └────────────────────┴──────┴──────┴────┴────────────┘
SCI System Call Interpreter Call Gate Stack Frame
This is what the stack frame looks like when the system is entered thru SCI via call gate using the KMEnterKmodeSCI function.
┌────────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_gs │+20 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_padgs │+22 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_fs │+24 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_padfs │+26 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_es │+28 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_pades │+2a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_ds │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_padds │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_thopadr │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_cbargs │+34 │4 │D │The Most Significant Bit of cbargs in an│ │ │ │ │ │SCI stack frame is used to denote that a│ │ │ │ │ │16 bit callgate is being used with the │ │ │ │ │ │SCI mechanism. Used by Dynamic API's. │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_sciret │+38 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_eflag │+3a │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_eip │+3e │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_cs │+42 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ssf_padcs │+42 │2 │W │ │ └────────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
DHF Device Help Stack Frame
┌────────────────────┬──────┬──────┬────┬────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_edi │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_esi │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_ebp │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_padesp │+c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_ebx │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_edx │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_ecx │+18 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_eax │+1c │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_gs │+20 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_padgs │+22 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_fs │+24 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_padfs │+26 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_es │+28 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_pades │+2a │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_ds │+2c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_padds │+2e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_eflag │+30 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_scratch │+34 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_eip │+38 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_cs │+3c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │dhf_padcs │+3e │4 │D │ │ └────────────────────┴──────┴──────┴────┴────────────┘
TF Hardware Exception Trap Stack Frame
Stack frame for the trap manager before we go into kernel mode.
┌────────────────────┬──────┬──────┬────┬────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_trapnum │+0 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_errcode │+4 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_eip │+8 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_cs │+c │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_padcs │+e │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_eflags │+10 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_esp │+14 │4 │D │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_ss │+18 │2 │W │ │ ├────────────────────┼──────┼──────┼────┼────────────┤ │tf_padss │+1a │2 │W │ │ └────────────────────┴──────┴──────┴────┴────────────┘