Skip to content

Commit 1ac08dd

Browse files
mabaiocchiwghoffa
authored andcommitted
Key Clear: Fix Hostboot GPIO processing on multi-node systems
This commit fixes a bug where hostboot code was not properly setting up ATTR_GPIO_INFO_PHYS_PRES for fleetwood systems which can have different primary processors on multiple nodes. Now, each processor is given a default setting that works when it is the active primary processor on that node. Change-Id: I75923dda95f8185464696f295a594fa2d5e71510 CQ:SW495867 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/100311 Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J Engel <cjengel@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
1 parent 7f2e013 commit 1ac08dd

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

src/usr/gpio/gpiodd.C

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2014,2019 */
8+
/* Contributors Listed Below - COPYRIGHT 2014,2020 */
99
/* [+] Google Inc. */
1010
/* [+] International Business Machines Corp. */
1111
/* */
@@ -89,14 +89,16 @@ errlHndl_t gpioPerformOp(DeviceFW::OperationType i_opType,
8989
break;
9090
}
9191

92+
char * path_str = gpioInfo.i2cMasterPath.toString();
93+
9294
TARGETING::TargetService& ts = TARGETING::targetService();
9395
TARGETING::Target * i2c_master = ts.toTarget(gpioInfo.i2cMasterPath);
9496

9597
if( i2c_master == NULL )
9698
{
9799
TRACFCOMP( g_trac_gpio,ERR_MRK"gpioPerformOp() - "
98-
"I2C Target not found. Device type %d.",
99-
gpioInfo.deviceType );
100+
"I2C Target not found. Device type %d. entity path=%s",
101+
gpioInfo.deviceType, path_str );
100102
/*@
101103
* @errortype
102104
* @reasoncode GPIO_I2C_TARGET_NOT_FOUND
@@ -116,8 +118,19 @@ errlHndl_t gpioPerformOp(DeviceFW::OperationType i_opType,
116118
true /*Add HB SW Callout*/ );
117119

118120
err->collectTrace( GPIO_COMP_NAME );
121+
ERRORLOG::ErrlUserDetailsString(path_str).addToLog(err);
122+
free(path_str);
123+
path_str=nullptr;
119124
break;
120125
}
126+
else
127+
{
128+
TRACDCOMP( g_trac_gpio,INFO_MRK"gpioPerformOp() - "
129+
"I2C Target entity path=%s",
130+
path_str );
131+
}
132+
free(path_str);
133+
path_str = nullptr;
121134

122135
if( i_opType == DeviceFW::READ )
123136
{

src/usr/targeting/common/processMrw.pl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,27 @@ sub processProcessor
12711271
"PROC_MEM_TO_USE", ( $targetObj->getAttribute($target,
12721272
"FABRIC_GROUP_ID") << 3));
12731273
processPowerRails ($targetObj, $target);
1274+
1275+
# Set GPIO_INFO_PHYS_PRES for each proc to the same default even though
1276+
# it's only valid on the primary and alt-primary proc.
1277+
# It will only get called on the active primary processor during the IPL.
1278+
1279+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1280+
"i2cMasterPath",$path);
1281+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1282+
"port","0");
1283+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1284+
"devAddr","0xC0");
1285+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1286+
"engine","2");
1287+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1288+
"windowOpenPin","0");
1289+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1290+
"physicalPresencePin","1");
1291+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1292+
"i2cMuxBusSelector","0xFF");
1293+
$targetObj->setAttributeField($target,"GPIO_INFO_PHYS_PRES",
1294+
"i2cMuxPath","physical:sys-0");
12741295
}
12751296
12761297
sub processPowerRails

0 commit comments

Comments
 (0)