x86[_64]: Separate bootloader and kernel GDT and IDT logic
From now on bootloader sets up its own minimal valid GDT and IDT. Then the kernel replaces them with its own tables.
This commit is contained in:
@@ -78,11 +78,6 @@ struct interrupt_descriptor {
|
||||
uint32 reserved : 32;
|
||||
} _PACKED;
|
||||
|
||||
struct gdt_idt_descr {
|
||||
uint16 limit;
|
||||
addr_t base;
|
||||
} _PACKED;
|
||||
|
||||
struct tss {
|
||||
uint32 _reserved1;
|
||||
uint64 sp0;
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
|
||||
#define _PACKED __attribute__((packed))
|
||||
|
||||
#define IDT_LIMIT 0x800
|
||||
#define GDT_LIMIT 0x800
|
||||
|
||||
// kernel args
|
||||
typedef struct {
|
||||
// architecture specific
|
||||
@@ -30,10 +27,6 @@ typedef struct {
|
||||
uint32 num_pgtables;
|
||||
uint32 pgtables[MAX_BOOT_PTABLES];
|
||||
uint64 virtual_end;
|
||||
uint32 phys_idt;
|
||||
uint64 vir_idt;
|
||||
uint32 phys_gdt;
|
||||
uint64 vir_gdt;
|
||||
uint64 page_hole;
|
||||
// smp stuff
|
||||
uint32 apic_time_cv_factor; // apic ticks per second
|
||||
|
||||
@@ -49,8 +49,6 @@ enum gate_types {
|
||||
|
||||
void x86_descriptors_preboot_init_percpu(kernel_args* args, int cpu);
|
||||
void x86_descriptors_init(kernel_args* args);
|
||||
void x86_descriptors_init_percpu(kernel_args* args, int cpu);
|
||||
status_t x86_descriptors_init_post_vm(kernel_args* args);
|
||||
|
||||
|
||||
#endif // !_ASSEMBLER
|
||||
|
||||
Reference in New Issue
Block a user