but my cpu keeps crashing.
The code I have:
Code: Select all
mem = (unsigned int *) 0x300000; /* Page Directory Entry */
mem[0] = (0x300000 + 0x1000) | 3;
mem = (unsigned int *) 0x301000 ; /* Page Table Entry */
mem[0] = (0x302000) | 3;
asm("movl $0x300000,%eax"); /* Put the Page-Directory Base address in eax */
asm("movl %eax,%cr3"); /* Set the pointer to the 1st Page-Directory Base in CR3 (Controll Register 3 / PDBR) */
asm("movl %cr0,%eax");
asm("addl $2147483648,%eax");
asm("movl %eax,%cr0"); /* Set bit 31 of CR0 (Controll Register 0, paging bit) */
asm("jmp $0x08,$pagingdone");
asm("pagingdone:");
I've read the intel manual and k.j. tutorial btw.
Thanks in advance,
Frank

