diff options
Diffstat (limited to 'src/usr/mmio')
| -rw-r--r-- | src/usr/mmio/mmio.C | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/mmio/mmio.C b/src/usr/mmio/mmio.C index 4a5d714ab..7d85dee8f 100644 --- a/src/usr/mmio/mmio.C +++ b/src/usr/mmio/mmio.C @@ -108,8 +108,19 @@ errlHndl_t mmioSetup() auto l_omiBaseAddr = l_mcTarget->getAttr<ATTR_OMI_INBAND_BAR_BASE_ADDR_OFFSET>(); - // Apply the MMIO base offset so we get the real address - uint64_t l_realAddr = ( l_omiBaseAddr | MMIO_BASE ); + // Build up the full address with group/chip address considerations + auto l_procType = TARGETING::TYPE_PROC; + TARGETING::Target* l_parentChip = getParent(l_mcTarget, l_procType); + uint8_t l_groupId = + l_parentChip->getAttr<ATTR_PROC_EFF_FABRIC_GROUP_ID>(); + uint8_t l_chipId = + l_parentChip->getAttr<ATTR_PROC_EFF_FABRIC_CHIP_ID>(); + uint64_t l_realAddr = computeMemoryMapOffset( MMIO_BASE, + l_groupId, + l_chipId ); + + // Apply the MMIO base offset so we get the final address + l_realAddr += l_omiBaseAddr; // Map the device with a kernal call, each device, the MC, is 32 GB uint64_t l_virtAddr = reinterpret_cast<uint64_t> |

