Skip to content

Commit

Permalink
Changes to Inband SCOM MMIO ranges for Cumulus
Browse files Browse the repository at this point in the history
 - Add function to compress SCOM address
 - Old MCS target is now DMI
 - Add istep12 call to enable inband SCOMs
 - Set each DMI offset attribute in processMrw

Change-Id: If5171f8da6c58404ac598047ca0177aead048771
RTC:147272
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54574
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
cvswen authored and wghoffa committed Mar 8, 2018
1 parent c0fce11 commit 4cf79f8
Show file tree
Hide file tree
Showing 7 changed files with 326 additions and 120 deletions.
8 changes: 4 additions & 4 deletions src/include/sys/mmio.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2010,2016 */
/* Contributors Listed Below - COPYRIGHT 2010,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -146,10 +146,10 @@ mutex_t * mmio_xscom_mutex();
*/
static const uint64_t MMIO_IBSCOM_UE_DETECTED = 0x53434F4D4641494C;

/** Constants used to define IBSCOM MMIO address range
/** Constants used to define IBSCOM MMIO address ranges
*/
static const uint64_t MMIO_IBSCOM_START = 0x0003E00000000000;
static const uint64_t MMIO_IBSCOM_END = 0x0003F02000000000;
static const uint64_t MMIO_IBSCOM_BASE = 0x6030220000000;
static const uint64_t MMIO_IBSCOM_SIZE = 0x0000020000000;

#ifdef __cplusplus
}
Expand Down
5 changes: 4 additions & 1 deletion src/include/usr/ibscom/ibscomreasoncodes.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
Expand Down Expand Up @@ -34,6 +36,7 @@ namespace IBSCOM
IBSCOM_SANITY_CHECK = 0x02,
IBSCOM_GET_TARG_VIRT_ADDR = 0x03,
IBSCOM_DO_IBSCOM = 0x04,
IBSCOM_GET_PARRENT_DMI = 0x05,
};

enum ibscomReasonCode
Expand Down
28 changes: 23 additions & 5 deletions src/kernel/machchk.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* COPYRIGHT International Business Machines Corp. 2013,2014 */
/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
Expand All @@ -24,6 +26,7 @@
#include <kernel/console.H>
#include <kernel/vmmmgr.H>
#include <sys/mmio.h>
#include <arch/memorymap.H>

namespace Kernel
{
Expand Down Expand Up @@ -83,12 +86,27 @@ bool handleLoadUE(task_t* t)
uint64_t phys = VmmManager::findPhysicalAddress(vaddr);

//Check if address is in IBSCOM MMIO Range.
if((phys >= MMIO_IBSCOM_START) &&
(phys <= MMIO_IBSCOM_END))
uint64_t ibAddrStart = 0;
for(uint32_t l_groupId=0; l_groupId<4; l_groupId++)
{
ueMagicValue = MMIO_IBSCOM_UE_DETECTED;
for(uint32_t l_chipId=0; l_chipId<4; l_chipId++)
{
ibAddrStart = computeMemoryMapOffset( MMIO_IBSCOM_BASE,
l_groupId,
l_chipId );
if((phys >= ibAddrStart) &&
(phys <= ibAddrStart + MMIO_IBSCOM_SIZE - 1))
{
ueMagicValue = MMIO_IBSCOM_UE_DETECTED;
break;
}
}
if(ueMagicValue == MMIO_IBSCOM_UE_DETECTED)
{
break;
}
}
else
if(ueMagicValue != MMIO_IBSCOM_UE_DETECTED)
{
printk("MachineCheck::handleUE: Unrecognized address %lx\n",
phys);
Expand Down

0 comments on commit 4cf79f8

Please sign in to comment.