[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.
This commit is contained in:
Brandon Bergren 2020-09-23 00:32:50 +00:00
parent dadfbc2e60
commit c16359cf66
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366041
2 changed files with 5 additions and 0 deletions

View File

@ -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 */

View File

@ -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();