fixed multiboot booting
parent
8e11ff283f
commit
c03913c62d
|
@ -46,12 +46,28 @@ TEXT _multibootheader(SB), $0
|
|||
LONG $_startKADDR-KZERO(SB) /* load_addr */
|
||||
LONG $edata-KZERO(SB) /* load_end_addr */
|
||||
LONG $end-KZERO(SB) /* bss_end_addr */
|
||||
LONG $_startKADDR-KZERO(SB) /* entry_addr */
|
||||
LONG $_multibootentry-KZERO(SB) /* entry_addr */
|
||||
LONG $0 /* mode_type */
|
||||
LONG $0 /* width */
|
||||
LONG $0 /* height */
|
||||
LONG $0 /* depth */
|
||||
|
||||
TEXT _multibootentry(SB), $0
|
||||
MOVL $etext-KZERO(SB), SI
|
||||
MOVL SI, DI
|
||||
ADDL $0xfff, DI
|
||||
ANDL $~0xfff, DI
|
||||
MOVL $edata-KZERO(SB), CX
|
||||
SUBL DI, CX
|
||||
ADDL CX, SI
|
||||
ADDL CX, DI
|
||||
STD
|
||||
REP; MOVSB
|
||||
CLD
|
||||
MOVL $_startPADDR(SB), AX
|
||||
ANDL $~KZERO, AX
|
||||
JMP* AX
|
||||
|
||||
/*
|
||||
* In protected mode with paging turned off and segment registers setup
|
||||
* to linear map all memory. Entered via a jump to PADDR(entry),
|
||||
|
|
Loading…
Reference in New Issue