diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-08 02:50:09 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-08 02:50:09 +0200 |
| commit | fba26da490b453f58b727954184650f9767fab94 (patch) | |
| tree | da94f7adbd239994f95598378c7d9f4d8189965b | |
| parent | 853823f435cd30ffb52d90cd49b4cfdba42121d4 (diff) | |
| download | plan9front-fba26da490b453f58b727954184650f9767fab94.tar.xz | |
pc, pc64: extend initial memory map for qemu multiboot data
qemu puts multiboot data after the end of the kernel image, so
to be able to KADDR() that memory early, we extend the initial
identity mapping by 16K. right now we just got lucky with
the pc kernel as it rounds the map to 4MB pages.
| -rw-r--r-- | sys/src/9/pc/l.s | 3 | ||||
| -rw-r--r-- | sys/src/9/pc64/l.s | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/9/pc/l.s b/sys/src/9/pc/l.s index 44071a634..0d28ab2f1 100644 --- a/sys/src/9/pc/l.s +++ b/sys/src/9/pc/l.s @@ -186,6 +186,9 @@ TEXT mode32bit(SB), $0 MOVL $PADDR(CPU0PTE), AX /* first page of page table */ MOVL $end-KZERO(SB), CX + + ADDL $(16*1024), CX /* qemu puts multiboot data after the kernel */ + ADDL $(BY2XPG-1), CX ANDL $~(BY2XPG-1), CX /* round to 4MB */ MOVL CX, MemMin-KZERO(SB) /* see memory.c */ diff --git a/sys/src/9/pc64/l.s b/sys/src/9/pc64/l.s index 94356a9fb..6736ec42b 100644 --- a/sys/src/9/pc64/l.s +++ b/sys/src/9/pc64/l.s @@ -149,6 +149,9 @@ TEXT _warp64<>(SB), 1, $-4 */ ADDL $PDO(KZERO), AX MOVL $end-KZERO(SB), CX + + ADDL $(16*1024), CX /* qemu puts multiboot data after the kernel */ + ADDL $(PGLSZ(1)-1), CX ANDL $~(PGLSZ(1)-1), CX MOVL CX, MemMin-KZERO(SB) /* see memory.c */ |
