svn commit: r309151 - head/sys/conf

Ed Maste emaste at FreeBSD.org
Fri Nov 25 18:57:15 UTC 2016


Author: emaste
Date: Fri Nov 25 18:57:14 2016
New Revision: 309151
URL: https://svnweb.freebsd.org/changeset/base/309151

Log:
  Use explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr
  
  MAXPAGESIZE is not well defined by the GNU ld documentation.
  Different linkers, and different versions of the same linker, use
  different MAXPAGESIZE values. Current versions of GNU gold and LLVM's
  lld use 4K. When set to 4K the kernel panics at boot due to an issue
  with x86bios.
  
  Here we want the kernel physaddr to be the amd64 superpage size, so use
  that value (2MB) explicitly. With this change GNU gold and LLVM lld can
  link a working amd64 kernel.
  
  PR:		214718 (x86bios)
  Differential Revision:	https://reviews.freebsd.org/D8610

Modified:
  head/sys/conf/ldscript.amd64

Modified: head/sys/conf/ldscript.amd64
==============================================================================
--- head/sys/conf/ldscript.amd64	Fri Nov 25 18:12:57 2016	(r309150)
+++ head/sys/conf/ldscript.amd64	Fri Nov 25 18:57:14 2016	(r309151)
@@ -6,7 +6,7 @@ SEARCH_DIR("/usr/lib");
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  kernphys = CONSTANT (MAXPAGESIZE);
+  kernphys = 0x200000;
   . = kernbase + kernphys + SIZEOF_HEADERS;
   /*
    * Use the AT keyword in order to set the right LMA that contains


More information about the svn-src-head mailing list