shorten
This commit is contained in:
parent
3689c7f5ce
commit
b02e13f0f6
1 changed files with 9 additions and 13 deletions
|
@ -63,7 +63,6 @@ seta20.2:
|
|||
# that it is running directly on physical memory with no translation.
|
||||
# This initial NOP-translation setup is required by the processor
|
||||
# to ensure that the transition to protected mode occurs smoothly.
|
||||
|
||||
real_to_prot:
|
||||
cli # Mandatory since we dont set up an IDT
|
||||
lgdt gdtdesc # load GDT -- mandatory in protected mode
|
||||
|
@ -85,19 +84,16 @@ protcseg:
|
|||
movw %ax, %fs # -> FS
|
||||
movw %ax, %gs # -> GS
|
||||
movw %ax, %ss # -> SS: Stack Segment
|
||||
|
||||
call cmain # finish the boot load from C.
|
||||
# cmain() should not return
|
||||
spin:
|
||||
jmp spin # ..but in case it does, spin
|
||||
|
||||
|
||||
.p2align 2 # force 4 byte alignment
|
||||
gdt:
|
||||
SEG_NULLASM # null seg
|
||||
SEG_ASM(STA_X|STA_R, 0x0, 0xffffffff) # code seg
|
||||
SEG_ASM(STA_W, 0x0, 0xffffffff) # data seg
|
||||
|
||||
gdtdesc:
|
||||
.word 0x17 # sizeof(gdt) - 1
|
||||
.long gdt # address gdt
|
||||
|
|
Loading…
Reference in a new issue