From c513c3b5694d9c632f9ca94c29e20b49fcf49601 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 14 Oct 2003 17:02:18 +0000 Subject: [PATCH] Fix just about as many bugs in my last commit here as there were lines that I changed. That is never a good sign. 1) only map 1 page at address zero, not 4096 pages 2) page 1 starts at address 4096 (PAGE_SIZE) not 4095 (PAGE_MASK). I don't even want to think what the pte's looked like. 3) subtract the r/o page group start address from the end before converting it to a count. Otherwise an extra page is mapped. If you were affected by this, the symptoms of this was a hang at boot after the spinner. Sorry folks. :-( "You broke my laptop!" by: sam --- sys/i386/i386/locore.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 9818bb54e4ab..8b7a17c71b4f 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -789,14 +789,15 @@ no_kernend: /* Map page zero read-write so bios32 calls can use it */ xorl %eax, %eax movl $PG_RW,%edx - movl $PAGE_SIZE,%ecx + movl $1,%ecx fillkptphys(%edx) /* Map read-only from page 1 to the beginning of the kernel text section */ - movl $PAGE_MASK, %eax + movl $PAGE_SIZE, %eax xorl %edx,%edx movl $R(btext),%ecx addl $PAGE_MASK,%ecx + subl %eax,%ecx shrl $PAGE_SHIFT,%ecx fillkptphys(%edx)