svn commit: r366041 - in head/sys/powerpc: include powernv

Brandon Bergren bdragon at FreeBSD.org
Wed Sep 23 00:32:52 UTC 2020


Author: bdragon
Date: Wed Sep 23 00:32:50 2020
New Revision: 366041
URL: https://svnweb.freebsd.org/changeset/base/366041

Log:
  [PowerPC64LE] powernv ILE setup code.
  
  When running without a hypervisor, we need to set the ILE bit in the LPCR
  ourselves.
  
  For the boot processor, handle it in powernv_attach() like we do for other
  LPCR bits.
  
  No change for the APs, as they will use the lpcr global to set up their own
  LPCR when they do their own cpudep_ap_early_bootstrap() and pick up this
  automatically.
  
  Sponsored by:	Tag1 Consulting, Inc.

Modified:
  head/sys/powerpc/include/spr.h
  head/sys/powerpc/powernv/platform_powernv.c

Modified: head/sys/powerpc/include/spr.h
==============================================================================
--- head/sys/powerpc/include/spr.h	Wed Sep 23 00:28:47 2020	(r366040)
+++ head/sys/powerpc/include/spr.h	Wed Sep 23 00:32:50 2020	(r366041)
@@ -292,6 +292,7 @@
 #define	SPR_LPCR		0x13e	/* .6. Logical Partitioning Control */
 #define	  LPCR_LPES		  0x008	/* Bit 60 */
 #define	  LPCR_HVICE		  0x002	/* Hypervisor Virtualization Interrupt (Arch 3.0) */
+#define	  LPCR_ILE		  (1ULL << 25) /* Interrupt Little-Endian (ISA 2.07) */
 #define	  LPCR_UPRT		  (1ULL << 22) /* Use Process Table (ISA 3) */
 #define	  LPCR_HR		  (1ULL << 20) /* Host Radix mode */
 #define	  LPCR_PECE_DRBL          (1ULL << 16) /* Directed Privileged Doorbell */

Modified: head/sys/powerpc/powernv/platform_powernv.c
==============================================================================
--- head/sys/powerpc/powernv/platform_powernv.c	Wed Sep 23 00:28:47 2020	(r366040)
+++ head/sys/powerpc/powernv/platform_powernv.c	Wed Sep 23 00:32:50 2020	(r366041)
@@ -174,6 +174,10 @@ powernv_attach(platform_t plat)
 	if (cpu_features2 & PPC_FEATURE2_ARCH_3_00)
 		lpcr |= LPCR_HVICE;
 
+#if BYTE_ORDER == LITTLE_ENDIAN
+	lpcr |= LPCR_ILE;
+#endif
+
 	mtspr(SPR_LPCR, lpcr);
 	isync();
 


More information about the svn-src-all mailing list