ReactOS  0.4.14-dev-49-gfb4591c
i386idt.c File Reference
#include <freeldr.h>
Include dependency graph for i386idt.c:

Go to the source code of this file.

Functions

KIDTENTRY DECLSPEC_ALIGN (4)
 
static void InitIdtVector (UCHAR Vector, PVOID ServiceHandler, USHORT Access)
 
void __cdecl InitIdt (void)
 

Function Documentation

◆ DECLSPEC_ALIGN()

KIDTENTRY DECLSPEC_ALIGN ( )

Definition at line 5 of file i386idt.c.

6  {0, 255, (ULONG)i386Idt};
unsigned int ULONG
Definition: retypes.h:1

◆ InitIdt()

void __cdecl InitIdt ( void  )

Definition at line 23 of file i386idt.c.

24 {
25  InitIdtVector(0, i386DivideByZero, 0x8e00);
27  InitIdtVector(2, i386NMIException, 0x8e00);
28  InitIdtVector(3, i386Breakpoint, 0x8e00);
29  InitIdtVector(4, i386Overflow, 0x8e00);
31  InitIdtVector(6, i386InvalidOpcode, 0x8e00);
33  InitIdtVector(8, i386DoubleFault, 0x8e00);
35  InitIdtVector(10, i386InvalidTSS, 0x8e00);
37  InitIdtVector(12, i386StackException, 0x8e00);
39  InitIdtVector(14, i386PageFault, 0x8e00);
41  InitIdtVector(17, i386AlignmentCheck, 0x8e00);
42  InitIdtVector(18, i386MachineCheck, 0x8e00);
43 }
void __cdecl i386InvalidOpcode(void)
void __cdecl i386BoundException(void)
void __cdecl i386InvalidTSS(void)
void __cdecl i386PageFault(void)
void __cdecl i386Overflow(void)
void __cdecl i386StackException(void)
void __cdecl i386DoubleFault(void)
void __cdecl i386NMIException(void)
void __cdecl i386DebugException(void)
static void InitIdtVector(UCHAR Vector, PVOID ServiceHandler, USHORT Access)
Definition: i386idt.c:10
void __cdecl i386DivideByZero(void)
void __cdecl i386CoprocessorError(void)
void __cdecl i386FPUNotAvailable(void)
void __cdecl i386GeneralProtectionFault(void)
void __cdecl i386SegmentNotPresent(void)
void __cdecl i386Breakpoint(void)
void __cdecl i386AlignmentCheck(void)
void __cdecl i386CoprocessorSegment(void)
void __cdecl i386MachineCheck(void)

◆ InitIdtVector()

static void InitIdtVector ( UCHAR  Vector,
PVOID  ServiceHandler,
USHORT  Access 
)
static

Definition at line 10 of file i386idt.c.

14 {
15  i386Idt[Vector].Offset = (ULONG)ServiceHandler & 0xffff;
16  i386Idt[Vector].ExtendedOffset = (ULONG)ServiceHandler >> 16;
17  i386Idt[Vector].Selector = PMODE_CS;
18  i386Idt[Vector].Access = Access;
19 }
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG Vector
Definition: iofuncs.h:798
unsigned int ULONG
Definition: retypes.h:1
#define PMODE_CS
Definition: x86common.h:69
static DWORD WINAPI ServiceHandler(DWORD ctrl, DWORD event_type, LPVOID event_data, LPVOID context)
Definition: service.c:57

Referenced by InitIdt().