summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot/gptboot.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-18 02:07:00 +0000
committerjhb <jhb@FreeBSD.org>2004-09-18 02:07:00 +0000
commit8aec51c329c7d24d5fb8fc6baa0b37934f242f09 (patch)
tree2f32f08045900e0ead195f66fdb10ba73f8e2a84 /sys/boot/i386/gptboot/gptboot.c
parentebe6d04326cf6137f835e47e532b3007228fe230 (diff)
downloadFreeBSD-src-8aec51c329c7d24d5fb8fc6baa0b37934f242f09.zip
FreeBSD-src-8aec51c329c7d24d5fb8fc6baa0b37934f242f09.tar.gz
A long, long time ago in a CVS branch far away (specifically, HEAD prior
to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat mode and clients were limited to a virtual address space of 16 megabytes. Because of this limitation, boot2 silently masked all physical addresses in any binaries it loaded so that they were always loaded into the first 16 Meg. Since BTX no longer has this limitation (and hasn't for a long time), remove the masking from boot2. This allows boot2 to load kernels larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE). Submitted by: Sergey Lyubka devnull at uptsoft dot com MFC after: 1 month
Diffstat (limited to 'sys/boot/i386/gptboot/gptboot.c')
-rw-r--r--sys/boot/i386/gptboot/gptboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index e7b9a2b..8c082ca 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -321,7 +321,7 @@ load(void)
return;
}
if (fmt == 0) {
- addr = hdr.ex.a_entry & 0xffffff;
+ addr = hdr.ex.a_entry;
p = PTOV(addr);
fs_off = PAGE_SIZE;
if (xfsread(ino, p, hdr.ex.a_text))
@@ -355,7 +355,7 @@ load(void)
j++;
}
for (i = 0; i < 2; i++) {
- p = PTOV(ep[i].p_paddr & 0xffffff);
+ p = PTOV(ep[i].p_paddr);
fs_off = ep[i].p_offset;
if (xfsread(ino, p, ep[i].p_filesz))
return;
@@ -376,7 +376,7 @@ load(void)
p += es[i].sh_size;
}
}
- addr = hdr.eh.e_entry & 0xffffff;
+ addr = hdr.eh.e_entry;
}
bootinfo.bi_esymtab = VTOP(p);
bootinfo.bi_kernelname = VTOP(kname);
OpenPOWER on IntegriCloud