diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2017-01-16 07:51:31 -0600 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-01-17 15:49:30 -0500 |
commit | 2a40c0466548a5771073846188a536eb6cb3a8c8 (patch) | |
tree | 57cbce297f29cf5bdadb1d680ac84264998ceae6 /src/usr | |
parent | 31ba9fac64153db8365c28784fcf1fef2bc728f2 (diff) | |
download | talos-hostboot-2a40c0466548a5771073846188a536eb6cb3a8c8.tar.gz talos-hostboot-2a40c0466548a5771073846188a536eb6cb3a8c8.zip |
Handle fsi i2c correctly on second socket
- Security registers prevent usage of diag mode
- FSI to host engine mapping changes in P9
Change-Id: I1b88e73cc1cdb6c01a24710916fdfe71cd664b48
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34926
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@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>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/i2c/i2c.C | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C index 643db7b07..7e134a5bc 100755 --- a/src/usr/i2c/i2c.C +++ b/src/usr/i2c/i2c.C @@ -1674,7 +1674,33 @@ errlHndl_t i2cSetup ( TARGETING::Target * i_target, mode.value = 0x0ull; mode.bit_rate_div = i_args.bit_rate_divisor; - mode.port_num = i_args.port; + + //On P9 the mapping of I2C ports isn't logical + //in FSI mode + // Engine 0, HB doesn't use, but port 0 == FSI 1 + // HB doesn't use, but port 1 == FSI 3 + // Port 2,3 are not connected + // Engine 1, FSI ports == HB ports + // Engine 2, Host only ports + // Engine 3, port 0 = FSI 13 + // port 1 = FSI 14 + // port 2,3 are not connected + // @TODO RTC 167460 -- account for centaur and other + // and this same mapping other places in I2C DD + if ( i_args.switches.useFsiI2C && + 0 == i_args.engine) + { + mode.port_num = (i_args.port * 2) +1; + } + else if ( i_args.switches.useFsiI2C && + 3 == i_args.engine) + { + mode.port_num = 13 + i_args.port; + } + else + { + mode.port_num = i_args.port; + } TRACUCOMP( g_trac_i2c,"i2cSetup(): set mode = 0x%lx", mode.value); @@ -2544,10 +2570,21 @@ errlHndl_t i2cForceResetAndUnlock( TARGETING::Target * i_target, // P9 engine 2 port 0 has a limitation where the diag mode // cannot be used. -- skip it if the attribute state it // should not be used - if (l_disable_diag_mode - && (0 == port) && (2 == i_args.engine)) + // This also applies to FSI mode for engine 0,1,2 ports 0..3 + // as they directly map to FSI port 0..3 which have SBE + // security + if (l_disable_diag_mode) { - continue; + if(((0 == port) && (2 == i_args.engine)) || //host + ((i_args.switches.useFsiI2C) && (i_args.engine < 3))) //FSI + { + TRACFCOMP( g_trac_i2c, + "Not doing i2cForceResetAndUnlock() for" + "tgt=0x%X: e/p= %d/%d due to P9 diag mode" + "limitations", TARGETING::get_huid(i_target), + i_args.engine, port); + continue; + } } } |