diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/boot2/boot2.c | 6 | ||||
-rw-r--r-- | sys/boot/i386/gptboot/gptboot.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index bb6d171..9e239be 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -332,7 +332,7 @@ load(void) return; } if (fmt == 0) { - addr = hdr.ex.a_entry; + addr = hdr.ex.a_entry & 0xffffff; p = PTOV(addr); fs_off = PAGE_SIZE; if (xfsread(ino, p, hdr.ex.a_text)) @@ -366,7 +366,7 @@ load(void) j++; } for (i = 0; i < 2; i++) { - p = PTOV(ep[i].p_paddr); + p = PTOV(ep[i].p_paddr & 0xffffff); fs_off = ep[i].p_offset; if (xfsread(ino, p, ep[i].p_filesz)) return; @@ -387,7 +387,7 @@ load(void) p += es[i].sh_size; } } - addr = hdr.eh.e_entry; + addr = hdr.eh.e_entry & 0xffffff; } bootinfo.bi_esymtab = VTOP(p); bootinfo.bi_kernelname = VTOP(kname); diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index bb6d171..9e239be 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -332,7 +332,7 @@ load(void) return; } if (fmt == 0) { - addr = hdr.ex.a_entry; + addr = hdr.ex.a_entry & 0xffffff; p = PTOV(addr); fs_off = PAGE_SIZE; if (xfsread(ino, p, hdr.ex.a_text)) @@ -366,7 +366,7 @@ load(void) j++; } for (i = 0; i < 2; i++) { - p = PTOV(ep[i].p_paddr); + p = PTOV(ep[i].p_paddr & 0xffffff); fs_off = ep[i].p_offset; if (xfsread(ino, p, ep[i].p_filesz)) return; @@ -387,7 +387,7 @@ load(void) p += es[i].sh_size; } } - addr = hdr.eh.e_entry; + addr = hdr.eh.e_entry & 0xffffff; } bootinfo.bi_esymtab = VTOP(p); bootinfo.bi_kernelname = VTOP(kname); |