-
Notifications
You must be signed in to change notification settings - Fork 1
HalGenerateIDTDesc
This function generates a valid IDT descriptor structure for later use
idt_descriptor HalGenerateIDTDesc(dword baseAddress,
word selector,
idtflags idtFlags
);
baseAddress
The base address of the desired interrupt handler
selector
Selector to use when processing the interrupt. Must be a code selector
idtFlags
The bitflags used for the descriptor
idt_type_32bitTaskGate
The interrupt is a 32 bit task gate. This flag cannot be specified with any other flags that start with idt_type
idt_type_16bitInterruptGate
The interrupt is a 16 bit interrupt gate. This flag cannot be specified with any other flags that start with idt_type
idt_type_16bitTrapGate
The interrupt is a 16 bit trap gate. This flag cannot be specified with any other flags that start with idt_type
idt_type_32bitInterruptGate
The interrupt is a 32 bit interrupt gate. This flag cannot be specified with any other flags that start with idt_type
idt_type_32bitTrapGate
The interrupt is a 32 bit trap gate. This flag cannot be specified with any other flags that start with idt_type
idt_storage_segment
Only specify this flag for task gates. Otherwise it won't work.
idt_ring0
This flag specifies the descriptor is accessible from ring 0. Not valid with gdt_ring1
, gdt_ring2
or gdt_ring3
idt_ring1
This flag specifies the descriptor is accessible from ring 1. Not valid with gdt_ring0
, gdt_ring2
or gdt_ring3
idt_ring2
This flag specifies the descriptor is accessible from ring 2. Not valid with gdt_ring0
, gdt_ring1
or gdt_ring3
idt_ring3
This flag specifies the descriptor is accessible from ring 3. Not valid with gdt_ring0
, gdt_ring1
or gdt_ring2
idt_present
This flag enables the decriptor. It must be specified or the descriptor will be ignored
This function always returns a IDT descriptor structure.
Roadmap:
- Stage 1 FAT12 bootloader
- Stage 2 bootloader (SOARELDR)
- Hardware Abstraction Layer
- GDT and IDT abstraction
- Memory manager
- Disk IO
- PE Loader
- Convert HAL to be a module
- Keyboard IO