summaryrefslogtreecommitdiffstats
path: root/src/usr/scom
diff options
context:
space:
mode:
authorMissy Connell <missyc@us.ibm.com>2012-05-14 16:08:19 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-05-21 09:45:21 -0500
commit0a5b1b7cf70292696984dae4e68658511f33001f (patch)
treebd45d07909fd5eb7c7f56c78fdbb560652106587 /src/usr/scom
parentf4161d714e3e9de684610e35f6dd42c3a2cabc94 (diff)
downloadtalos-hostboot-0a5b1b7cf70292696984dae4e68658511f33001f.tar.gz
talos-hostboot-0a5b1b7cf70292696984dae4e68658511f33001f.zip
Scom translate update to fix the MCS/DMI bus numbering change.
There was an updated p8.unit.scominfo file that I was not aware of. I updated the Scom translate code to reflect the changes in that file. Change-Id: Iad4f538f717b23fecd6b7364bbbb7b909c443bd0 RTC: 42029 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1057 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/scom')
-rw-r--r--src/usr/scom/scomtrans.C44
-rw-r--r--src/usr/scom/scomtrans.H5
-rw-r--r--src/usr/scom/test/scomtest.H10
3 files changed, 37 insertions, 22 deletions
diff --git a/src/usr/scom/scomtrans.C b/src/usr/scom/scomtrans.C
index 73e9f4fb6..03334db7b 100644
--- a/src/usr/scom/scomtrans.C
+++ b/src/usr/scom/scomtrans.C
@@ -160,6 +160,7 @@ errlHndl_t scomTranslate(DeviceFW::OperationType i_opType,
// Check that we are working with the correct MCS direct address range
if ((i_addr & SCOM_TRANS_MCS_MASK) == SCOM_TRANS_MCS_BASEADDR )
{
+
// Need to extract what instance of the entity we are at
l_instance =
epath.pathElementOfType(TARGETING::TYPE_MCS).instance;
@@ -207,15 +208,15 @@ errlHndl_t scomTranslate(DeviceFW::OperationType i_opType,
// correct address range.
// MCS Indirect mask = 0x80000060_FFFFFFFF
- // 0x80000000_02011A3F MCS 0 # DMI0 Indirect SCOM
- // 0x80000020_02011A3F MCS 1 # DMI1 Indirect SCOM
- // 0x80000040_02011A3F MCS 2 # DMI2 Indirect SCOM
- // 0x80000060_02011A3F MCS 3 # DMI3 Indirect SCOM
- // 0x80000000_02011E3F MCS 4 # DMI4 Indirect SCOM
- // 0x80000020_02011E3F MCS 5 # DMI5 Indirect SCOM
- // 0x80000040_02011E3F MCS 6 # DMI6 Indirect SCOM
- // 0x80000060_02011E3F MCS 7 # DMI7 Indirect SCOM
- // SCOM_TRANS_IND_MCS_BASEADDR = 0x8000000002011A00,
+ // 0x80000060_02011A3F MCS 0 # DMI0 Indirect SCOM
+ // 0x80000040_02011A3F MCS 1 # DMI1 Indirect SCOM
+ // 0x80000020_02011A3F MCS 2 # DMI2 Indirect SCOM
+ // 0x80000000_02011A3F MCS 3 # DMI3 Indirect SCOM
+ // 0x80000060_02011E3F MCS 4 # DMI4 Indirect SCOM
+ // 0x80000040_02011E3F MCS 5 # DMI5 Indirect SCOM
+ // 0x80000020_02011E3F MCS 6 # DMI6 Indirect SCOM
+ // 0x80000000_02011E3F MCS 7 # DMI7 Indirect SCOM
+ // SCOM_TRANS_IND_MCS_BASEADDR = 0x8000006002011A00,
// check that we are working with a MCS/DMI address range..
// can be indirect or direct.
@@ -233,11 +234,25 @@ errlHndl_t scomTranslate(DeviceFW::OperationType i_opType,
if ((i_addr & SCOM_TRANS_IND_MCS_DMI_MASK) ==
SCOM_TRANS_IND_MCS_DMI_BASEADDR)
{
-
- // Need to update the upper bits of the indirect scom address.
- uint64_t temp_instance = l_instance % 4;
- temp_instance = temp_instance << 37;
- i_addr = i_addr | temp_instance;
+ // based on the instance, update the address
+ // If instance 0 or 4 then no updating required.
+ if (l_instance % 4 != 0)
+ {
+ // zero out the instance bits that need to change
+ i_addr = i_addr & 0xFFFFFF9FFFFFFFFF;
+
+ // instance 1 or 5 - update instance in the addr
+ if (l_instance % 4 == 1)
+ {
+ i_addr |= 0x4000000000;
+ }
+ // instance 2 or 6
+ else if (l_instance % 4 == 2)
+ {
+ i_addr |= 0x2000000000;
+ }
+ // instance 3 or 7 is 0 so no bits to turn on.
+ }
}
// Need to update the address whether we are indirect or not
@@ -249,6 +264,7 @@ errlHndl_t scomTranslate(DeviceFW::OperationType i_opType,
// or 0x400 to change 0x2011Axx to 0x2011Exx
i_addr = i_addr | 0x400;
}
+
// Call to set the target to the parent target type
l_err = scomfindParentTarget(epath,
TARGETING::TYPE_PROC,
diff --git a/src/usr/scom/scomtrans.H b/src/usr/scom/scomtrans.H
index d57e414dd..60ac48fc3 100644
--- a/src/usr/scom/scomtrans.H
+++ b/src/usr/scom/scomtrans.H
@@ -50,13 +50,12 @@ namespace SCOM
SCOM_TRANS_EX_BASEADDR = 0x0000000010000000,
SCOM_TRANS_MCS_BASEADDR = 0x0000000002011800,
SCOM_TRANS_MCS_DMI_BASEADDR = 0x0000000002011A00,
- SCOM_TRANS_IND_MCS_BASEADDR = 0x8000000002011A00,
+ SCOM_TRANS_IND_MCS_BASEADDR = 0x8000006002011A00,
SCOM_TRANS_MBA_BASEADDR = 0x0000000003010400,
- // SCOM_TRANS_MBS_DPHY_BASEADDR = 0x0000000003011000,
SCOM_TRANS_XBUS_BASEADDR = 0x0000000004011000,
SCOM_TRANS_ABUS_BASEADDR = 0x0000000008010C00,
SCOM_TRANS_IND_MBA_BASEADDR = 0x800000000301143f,
- SCOM_TRANS_IND_MCS_DMI_BASEADDR = 0x8000000002011A3F,
+ SCOM_TRANS_IND_MCS_DMI_BASEADDR = 0x8000006002011A3F,
SCOM_TRANS_INDIRECT_ADDRESS = 0x8000000000000000,
};
diff --git a/src/usr/scom/test/scomtest.H b/src/usr/scom/test/scomtest.H
index 29eeec729..7d92c0a7b 100644
--- a/src/usr/scom/test/scomtest.H
+++ b/src/usr/scom/test/scomtest.H
@@ -928,11 +928,11 @@ public:
uint64_t addr;
uint64_t data;
} test_data[] = {
- { scom_targets[myMCS1], 0x800EAC0002011A3F ,0x1111111122222222},
- { scom_targets[myMCS4], 0x800EAC0002011A3F, 0x3333333344444444},
- { scom_targets[myMCS2], 0x800EAC0002011A3F, 0x5555555566666666},
- { scom_targets[myMCS7], 0x800EAC0002011A3F, 0x7777777788888888},
- { scom_targets[myMCS4], 0x800EAC2002011A3F, 0x0101010101010101}, // invalid address range
+ { scom_targets[myMCS1], 0x800EAC6002011A3F ,0x1111111122222222},
+ { scom_targets[myMCS4], 0x800EAC6002011A3F, 0x3333333344444444},
+ { scom_targets[myMCS2], 0x800EAC6002011A3F, 0x5555555566666666},
+ { scom_targets[myMCS7], 0x800EAC6002011A3F, 0x7777777788888888},
+ { scom_targets[myMCS4], 0x800EAC0002011A3F, 0x0101010101010101}, // invalid address range
{ scom_targets[myMCS4], 0x800EAC4002011E3F, 0x2323232323232323}, // Invalid address range for target
};
const uint64_t NUM_ADDRS = sizeof(test_data)/sizeof(test_data[0]);
OpenPOWER on IntegriCloud