svn commit: r347463 - head/sys/powerpc/aim

Justin Hibbits jhibbits at FreeBSD.org
Fri May 10 19:36:16 UTC 2019


Author: jhibbits
Date: Fri May 10 19:36:14 2019
New Revision: 347463
URL: https://svnweb.freebsd.org/changeset/base/347463

Log:
  powerpc: Initialize the Hardware Interrupt Offset Register (HIOR) earlier for ppc970
  
  Since we now have a much larger KVA on powerpc64, it's possible to get SLB
  traps earlier in boot, possibly even before the HIOR is properly configured
  for us.  Move the HIOR setup to immediately after reset, so that we use our
  exception handlers instead of Open Firmware's.
  
  PR:		233863
  Submitted by:	Mark Millard (partial)
  Reported by:	Mark Millard
  MFC after:	2 weeks

Modified:
  head/sys/powerpc/aim/mp_cpudep.c

Modified: head/sys/powerpc/aim/mp_cpudep.c
==============================================================================
--- head/sys/powerpc/aim/mp_cpudep.c	Fri May 10 18:25:06 2019	(r347462)
+++ head/sys/powerpc/aim/mp_cpudep.c	Fri May 10 19:36:14 2019	(r347463)
@@ -68,6 +68,10 @@ cpudep_ap_early_bootstrap(void)
 	case IBM970:
 	case IBM970FX:
 	case IBM970MP:
+		/* Set HIOR to 0 */
+		__asm __volatile("mtspr 311,%0" :: "r"(0));
+		powerpc_sync();
+
 		/* Restore HID4 and HID5, which are necessary for the MMU */
 
 #ifdef __powerpc64__
@@ -314,10 +318,6 @@ cpudep_ap_setup()
 	case IBM970:
 	case IBM970FX:
 	case IBM970MP:
-		/* Set HIOR to 0 */
-		__asm __volatile("mtspr 311,%0" :: "r"(0));
-		powerpc_sync();
-
 		/*
 		 * The 970 has strange rules about how to update HID registers.
 		 * See Table 2-3, 970MP manual


More information about the svn-src-head mailing list