]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Because the BTX mini-kernel now uses flat memory mode and clients
authorRuslan Ermilov <ru@FreeBSD.org>
Sun, 29 Oct 2006 14:50:58 +0000 (14:50 +0000)
committerRuslan Ermilov <ru@FreeBSD.org>
Sun, 29 Oct 2006 14:50:58 +0000 (14:50 +0000)
commitda6d4298b77d77eec8000b98f85e940db5f74bbb
tree8b907f11b53d6e4725c11716fdf425629834fc0a
parent96ed72ac814e9dad40a8da3386c6b402d0478bcc
Because the BTX mini-kernel now uses flat memory mode and clients
are no longer limited to a virtual address space of 16 megabytes,
only mask high two bits of a virtual address.  This allows to load
larger kernels (up to 1 gigabyte).  Not masking addresses at all
was a bad idea on machines with less than >3G of memory -- kernels
are linked at 0xc0xxxxxx, and that would attempt to load a kernel
at above 3G.  By masking only two highest bits we stay within the
safe limits while still allowing to boot larger kernels.

(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c
rev. 1.71.)

Prodded by: jhb
Tested by: nyan (pc98)
sys/boot/common/load_elf.c
sys/boot/i386/boot2/boot2.c
sys/boot/i386/gptboot/gptboot.c
sys/boot/i386/libi386/elf32_freebsd.c
sys/boot/pc98/boot2/boot.c