From e583424484de98e8be66549370fb28453ccb98e4 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Fri, 5 Apr 2019 15:58:40 -0500 Subject: Validate OMI INBAND BAR offset attributes against calculated values While setting up the virtual memory mapped IO to the OCMB chips we make some assumptions that the OCMB MMIO spaces will be contiguous. The p9a_omi_setup_bars HWP uses OMI_INBAND_BAR_BASE_ADDR_OFFSET to set the scom registers that determine the physical offset mapped to the IO. When setting up the Virtual addresses hostboot uses to represent the physical mmio address, we must validate that the attribute matches with what we calculated. While doing this we found that the virtual address attribute was being calculated incorrectly. It was not localizing the OCMB position relative to the MC which is required when calculating the offset into the MC bar. Change-Id: I0ebbcd38e19a238e2cc16791bb0595536788bb7f RTC: 201493 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75631 Reviewed-by: Matthew Raybuck Reviewed-by: Michael Baiocchi Reviewed-by: Roland Veloz Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/include/arch/memorymap.H | 3 ++- src/include/usr/mmio/mmio_reasoncodes.H | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/arch/memorymap.H b/src/include/arch/memorymap.H index a25bcb62d..7b75f6363 100644 --- a/src/include/arch/memorymap.H +++ b/src/include/arch/memorymap.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,6 +38,7 @@ constexpr uint64_t MMIO_OFFSET_PER_CHIP = (4*TERABYTE); //0x40000000000 constexpr uint64_t MMIO_OFFSET_PER_GROUP = (32*TERABYTE); //0x200000000000 +constexpr uint64_t MMIO_BASE = 0x6000000000000; /** * @brief Compute MMIO value for a given chip and base value */ diff --git a/src/include/usr/mmio/mmio_reasoncodes.H b/src/include/usr/mmio/mmio_reasoncodes.H index 7e2481934..86ff60b5b 100644 --- a/src/include/usr/mmio/mmio_reasoncodes.H +++ b/src/include/usr/mmio/mmio_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -51,6 +51,7 @@ namespace MMIO RC_BAD_MMIO_READ = MMIO_COMP_ID | 0x08, RC_BAD_MMIO_WRITE = MMIO_COMP_ID | 0x09, RC_PROC_NOT_FOUND = MMIO_COMP_ID | 0x0A, + RC_BAR_OFFSET_MISMATCH = MMIO_COMP_ID | 0x0B, }; }; -- cgit v1.2.3