merge
commit
b494f61baa
|
@ -46,12 +46,38 @@ 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 */
|
||||
|
||||
/*
|
||||
* the kernel expects the data segment to be page-aligned
|
||||
* multiboot bootloaders put the data segment right behind text
|
||||
*/
|
||||
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
|
||||
ADDL $KZERO, BX
|
||||
MOVL BX, multiboot-KZERO(SB)
|
||||
MOVL $_startPADDR(SB), AX
|
||||
ANDL $~KZERO, AX
|
||||
JMP* AX
|
||||
|
||||
/* multiboot structure pointer */
|
||||
TEXT multiboot(SB), $0
|
||||
LONG $0
|
||||
|
||||
/*
|
||||
* In protected mode with paging turned off and segment registers setup
|
||||
* to linear map all memory. Entered via a jump to PADDR(entry),
|
||||
|
|
|
@ -37,6 +37,22 @@ options(void)
|
|||
{
|
||||
long i, n;
|
||||
char *cp, *line[MAXCONF], *p, *q;
|
||||
ulong *m, l;
|
||||
extern ulong *multiboot;
|
||||
|
||||
if(multiboot != nil){
|
||||
cp = BOOTARGS;
|
||||
*cp = 0;
|
||||
if((*multiboot & 8) != 0 && multiboot[5] > 0){
|
||||
m = KADDR(multiboot[6]);
|
||||
l = m[1] - m[0];
|
||||
m = KADDR(m[0]);
|
||||
if(l >= BOOTARGSLEN)
|
||||
l = BOOTARGSLEN - 1;
|
||||
memmove(cp, m, l);
|
||||
cp[l] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* parse configuration args from dos file plan9.ini
|
||||
|
|
Loading…
Reference in New Issue