summaryrefslogtreecommitdiffstats
path: root/sys/conf/ldscript.amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-03-28 06:35:17 +0000
committeralc <alc@FreeBSD.org>2011-03-28 06:35:17 +0000
commitb3ffae779b5756d0990126a19585b3fb90960ae2 (patch)
tree3b272c999160ba635920218041fd00ed26c442df /sys/conf/ldscript.amd64
parentcd47b87c5fa1d10379920666d8a16dfc6a890639 (diff)
downloadFreeBSD-src-b3ffae779b5756d0990126a19585b3fb90960ae2.zip
FreeBSD-src-b3ffae779b5756d0990126a19585b3fb90960ae2.tar.gz
The new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000
instead of 0x100000. As a side effect, an amd64 kernel now loads at physical address 0x200000 instead of 0x100000. This is probably for the best because it avoids the use of a 2MB page mapping for the first 1MB of the kernel that also spans the fixed MTRRs. However, getmemsize() still thinks that the kernel loads at 0x100000, and so the physical memory between 0x100000 and 0x200000 is lost. Fix this problem by replacing the hard-wired constant in getmemsize() by a symbol "kernphys" that is defined by the linker script. In collaboration with: kib
Diffstat (limited to 'sys/conf/ldscript.amd64')
-rw-r--r--sys/conf/ldscript.amd643
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64
index ce275ef..9210a73 100644
--- a/sys/conf/ldscript.amd64
+++ b/sys/conf/ldscript.amd64
@@ -6,7 +6,8 @@ SEARCH_DIR("/usr/lib");
SECTIONS
{
/* Read-only sections, merged into text segment: */
- . = kernbase + CONSTANT (MAXPAGESIZE) + SIZEOF_HEADERS;
+ kernphys = CONSTANT (MAXPAGESIZE);
+ . = kernbase + kernphys + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
OpenPOWER on IntegriCloud