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
This commit is contained in:
Peter Wemm 2003-10-14 17:02:18 +00:00
parent a827a5ff6a
commit c513c3b569

View File

@ -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)