Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2018 04:47:28 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341422 - head/sys/powerpc/booke
Message-ID:  <201812030447.wB34lS8j007416@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Mon Dec  3 04:47:28 2018
New Revision: 341422
URL: https://svnweb.freebsd.org/changeset/base/341422

Log:
  powerpc/booke: Check for the metadata address by physical address
  
  The metadata pointer will almost never be at or above 'btext', as btext is a
  relocated symbol, so will be based at VM_MIN_KERNEL_ADDRESS, not at
  KERNBASE.  Check the address against kernload, where the kernel is
  physically loaded.

Modified:
  head/sys/powerpc/booke/booke_machdep.c

Modified: head/sys/powerpc/booke/booke_machdep.c
==============================================================================
--- head/sys/powerpc/booke/booke_machdep.c	Mon Dec  3 04:07:18 2018	(r341421)
+++ head/sys/powerpc/booke/booke_machdep.c	Mon Dec  3 04:47:28 2018	(r341422)
@@ -158,6 +158,7 @@ extern unsigned char __sbss_start[];
 extern unsigned char __sbss_end[];
 extern unsigned char _end[];
 extern vm_offset_t __endkernel;
+extern vm_paddr_t kernload;
 
 /*
  * Bootinfo is passed to us by legacy loaders. Save the address of the
@@ -350,7 +351,7 @@ booke_init(u_long arg1, u_long arg2)
 		end += fdt_totalsize((void *)dtbp);
 		__endkernel = end;
 		mdp = NULL;
-	} else if (arg1 > (uintptr_t)btext)	/* FreeBSD loader */
+	} else if (arg1 > (uintptr_t)kernload)	/* FreeBSD loader */
 		mdp = (void *)arg1;
 	else					/* U-Boot */
 		mdp = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812030447.wB34lS8j007416>