Nigel
520104a43a
- Updated gdt assembly - Updated Interrupt service request handlers - Improved virtual memory manager - NOTE: we're dependent on identity mappings for the heap to work
29 lines
648 B
C
29 lines
648 B
C
#pragma once
|
|
#include <stdint.h>
|
|
struct SegmentDescriptor {
|
|
unsigned short limit_low;
|
|
unsigned short base_low;
|
|
unsigned char base_middle;
|
|
unsigned char access;
|
|
unsigned char granularity;
|
|
unsigned char base_high;
|
|
}__attribute__((packed));
|
|
|
|
struct tss32 {
|
|
uint64_t bits;
|
|
uint8_t other_bits :5;
|
|
}__attribute__((packed));
|
|
|
|
struct GlobalDescriptorTableDescriptor{
|
|
unsigned short limit;
|
|
unsigned int base;
|
|
}__attribute__((packed)) ;
|
|
|
|
|
|
|
|
void add_descriptor(int which , unsigned long base, unsigned long limit, unsigned char access, unsigned char granularity );
|
|
|
|
|
|
extern "C" void LoadGlobalDescriptorTable();
|
|
void initGDT();
|