Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2014 16:41:21 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r273830 - stable/10/sys/arm/arm
Message-ID:  <201410291641.s9TGfLe3030937@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Wed Oct 29 16:41:20 2014
New Revision: 273830
URL: https://svnweb.freebsd.org/changeset/base/273830

Log:
  MFC r273288:
  
   Allow the armv6 kernel to be build with PHYSADDR undefined. The kernel
   will now find the virtual to physical mapping for libkvm to use at
   runtime. This makes PHYSADDR redundant, however keep it around to give
   everyone a chance to update their libkvm.

Modified:
  stable/10/sys/arm/arm/locore.S
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/locore.S
==============================================================================
--- stable/10/sys/arm/arm/locore.S	Wed Oct 29 16:38:13 2014	(r273829)
+++ stable/10/sys/arm/arm/locore.S	Wed Oct 29 16:41:20 2014	(r273830)
@@ -42,6 +42,18 @@
 
 __FBSDID("$FreeBSD$");
 
+/*
+ * Sanity check the configuration.
+ * FLASHADDR and LOADERRAMADDR depend on PHYSADDR in some cases.
+ * ARMv4 and ARMv5 make assumptions on where they are loaded.
+ *
+ * TODO: Fix the ARMv4/v5 case.
+ */
+#if (defined(FLASHADDR) || defined(LOADERRAMADDR) || !defined(_ARM_ARCH_6)) && \
+    !defined(PHYSADDR)
+#error PHYSADDR must be defined for this configuration
+#endif
+
 /* What size should this really be ? It is only used by initarm() */
 #define INIT_ARM_STACK_SIZE	(2048 * 4)
 
@@ -54,15 +66,21 @@ __FBSDID("$FreeBSD$");
 	CPWAIT_BRANCH			/* branch to next insn */
 
 /*
- * This is for kvm_mkdb, and should be the address of the beginning
+ * This is for libkvm, and should be the address of the beginning
  * of the kernel text segment (not necessarily the same as kernbase).
+ *
+ * These are being phased out. Newer copies of libkvm don't need these
+ * values as the information is added to the core file by inspecting
+ * the running kernel.
  */
 	.text
 	.align	0
+#ifdef PHYSADDR
 .globl kernbase
 .set kernbase,KERNBASE
 .globl physaddr
 .set physaddr,PHYSADDR
+#endif
 
 /*
  * On entry for FreeBSD boot ABI:



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