50,12 → 50,13 |
xorw %ax,%ax |
movw %ax,%ds |
|
lgdt gdtr # initialize Global Descriptor Table register |
lgdt ap_bootstrap_gdtr # initialize Global Descriptor Table register |
|
movl %cr0,%eax |
orl $1,%eax |
movl %eax,%cr0 # switch to protected mode |
jmpl $KTEXT,$jump_to_kernel |
|
jump_to_kernel: |
.code32 |
movw $KDATA,%ax |
68,6 → 69,11 |
|
call map_kernel # map kernel and turn paging on |
|
movb $0xd1, %al # enable A20 using the keyboard controller |
outb %al, $0x64 |
movb $0xdf, %al |
outb %al, $0x60 |
|
jmpl $KTEXT,$main_ap |
|
#endif /* __SMP__ */ |