diff options
author | ru <ru@FreeBSD.org> | 2006-11-02 17:28:38 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-11-02 17:28:38 +0000 |
commit | 72eb46ae51bea2bdc5f1deb6728f9bdd26092ed5 (patch) | |
tree | 34de91a0a0dd3ee661c12286a13ec25ee3a189de /sys/boot/pc98/boot2 | |
parent | 42a69dcadeb2a9e395f7747f2d88a1ea76673757 (diff) | |
download | FreeBSD-src-72eb46ae51bea2bdc5f1deb6728f9bdd26092ed5.zip FreeBSD-src-72eb46ae51bea2bdc5f1deb6728f9bdd26092ed5.tar.gz |
Revert the last change. Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE. (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)
To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.
Discussed with: jhb
Diffstat (limited to 'sys/boot/pc98/boot2')
-rw-r--r-- | sys/boot/pc98/boot2/boot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/pc98/boot2/boot.c b/sys/boot/pc98/boot2/boot.c index 96dfb72..feccc7e 100644 --- a/sys/boot/pc98/boot2/boot.c +++ b/sys/boot/pc98/boot2/boot.c @@ -199,9 +199,9 @@ loadprog(void) /* * We assume that the entry address is the same as the lowest text * address and that the kernel startup code handles relocation by - * this address rounded down to a multiple of 1G. + * this address rounded down to a multiple of 16M. */ - startaddr = head.a_entry & 0x3FFFFFFF; + startaddr = head.a_entry & 0x00FFFFFF; addr = startaddr; printf("Booting %d:%s(%d,%c)%s @ 0x%x\n" , dosdev & 0x0f |