Attention is currently required from: Ron Minnich. Sergii Dmytruk has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57080 )
Change subject: src/arch/ppc64/include/arch/mmio.h: ignore HRMOR for POWER9 ......................................................................
src/arch/ppc64/include/arch/mmio.h: ignore HRMOR for POWER9
Change-Id: I9895fc0dcc0ab72151f3b2bde409c8556525433d Signed-off-by: Yaroslav Kurlaev yaroslav.kurlaev@3mdeb.com --- M src/arch/ppc64/include/arch/mmio.h 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/57080/1
diff --git a/src/arch/ppc64/include/arch/mmio.h b/src/arch/ppc64/include/arch/mmio.h index 6428043..b06a0b7 100644 --- a/src/arch/ppc64/include/arch/mmio.h +++ b/src/arch/ppc64/include/arch/mmio.h @@ -11,31 +11,55 @@
static inline uint8_t read8(const volatile void *addr) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (const volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif return *(volatile uint8_t *)addr; }
static inline uint16_t read16(const volatile void *addr) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (const volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif return *(volatile uint16_t *)addr; }
static inline uint32_t read32(const volatile void *addr) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (const volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif return *(volatile uint32_t *)addr; }
static inline void write8(volatile void *addr, uint8_t val) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif *(volatile uint8_t *)addr = val; }
static inline void write16(volatile void *addr, uint16_t val) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif *(volatile uint16_t *)addr = val; }
static inline void write32(volatile void *addr, uint32_t val) { +#if CONFIG(CPU_POWER9) + // Set bit to ignore HRMOR + addr = (volatile void *)((uint64_t)addr | 0x8000000000000000); +#endif *(volatile uint32_t *)addr = val; }