Change gdt setup, set state different
This commit is contained in:
parent
2f33f55512
commit
d19b6f69e5
1 changed files with 6 additions and 4 deletions
|
@ -27,8 +27,8 @@ void setup_gdt(void) {
|
|||
struct GDT gdt[4];
|
||||
|
||||
gdt[0].base = 0; gdt[0].limit = 0; gdt[0].type = 0;
|
||||
gdt[1].base = 0; gdt[1].limit = 0xFFFFFFFF; gdt[1].type = 0x9A;
|
||||
gdt[2].base = 0; gdt[2].limit = 0xFFFFFFFF; gdt[2].type = 0x92;
|
||||
gdt[1].base = 0x4000000; gdt[1].limit = 0x3FFFFFF; gdt[1].type = 0x9A;
|
||||
gdt[2].base = 0x8000000; gdt[2].limit = 0x3FFFFFF; gdt[2].type = 0x92;
|
||||
gdt[3].base = (unsigned int) tss; gdt[3].limit=sizeof(tss); gdt[3].type = 0x89;
|
||||
|
||||
unsigned short int GDT[4];
|
||||
|
@ -40,10 +40,12 @@ void setup_gdt(void) {
|
|||
set_gdt(GDT, sizeof(GDT));
|
||||
}
|
||||
|
||||
extern void enter_pmode(void);
|
||||
|
||||
int init(void) {
|
||||
NMI_disable();
|
||||
A20_enable();
|
||||
printf("Setting up GDT...\n");
|
||||
setup_gdt();
|
||||
printf("Enabling interrupts...\n");
|
||||
idt_init();
|
||||
printf("Fenix Dev Pre-release v0.0.3\n");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue