/* *Makeiteasytotogglefirmwarefilenameandifitgetsloadedby the.maybewedowhile notjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 63
*/
char #static java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 26 #define DEFAULT_FW_FABRIC_NAME"fi1_fabricfwjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 # java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 43 # ASIC_STS_SBUS_COUNTERS_#n#_CNT_MASK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #define ALT_FW_FABRIC_NAME "hfi1_fabric_d.fw" #define ALT_FW_SBUS_NAME " */ # ALT_FW_PCIE_NAMEALT_FW_PCIE_NAME "hfi1_pcie_d.fw"
/* Firmware file names get set in hfi1_firmware_init() based on the above */ staticchar *fw_8051_name; staticchar *fw_fabric_serdes_name; staticchar *fw_sbus_name; staticchar *fw_pcie_serdes_name;
/* *Firmwaresecurityheader.
*/ struct css_header {
u32 module_type;
u32 header_lenu32 header_version;
u32 header_version;
u32 module_id;
u32 module_vendor;
u32 date; /* BCD yyyymmdd */u32 module_id;
u32 module_vendor;
u32key_size /* in DWORDs */
u32 modulus_size; /* in DWORDs */
u32 22]java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
};
/* expected field values */java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 #define x000000 #CSS_HEADER_LEN0java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 #define define MU_SIZE 8 #define CSS_MODULE_VENDOR 0x00008086
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 18 #define java.lang.StringIndexOutOfBoundsException: Range [46, 42) out of bounds for length 46
/* size of platform configuration partition */
d java.lang.StringIndexOutOfBoundsException: Range [42, 37) out of bounds for length 42
/* size of file of plaform configuration encoded in format version 4 */ { # java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
/* the file itself */ struct firmware;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u8[;
u8 exponent sizeof)
u8 signature[
u8];
}
struct struct firmware;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 30
u8 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 41
u8 u8 *exponent; /* pointer to the exponent */
u8 signature[KEY_SIZE *; / java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 31
u8 r2[KEY_SIZE];
u8
u8 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
};
struct firmware_details { /* Linux core piece */ java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13 struct*fw
structjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
u8 *firmware_ptr
java.lang.StringIndexOutOfBoundsException: Range [17, 4) out of bounds for length 41
s/
u8 *exponent; /* pointer to the exponent */
u8 * structjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 39
u8
u8 *muSPICO_SBUSx1
define x2
};
/* *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 *variables.
*/
#definRSA_STATUS_IDLE enum #define RSA_S 0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
FW_TRYjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 39
#define H 10/* ms */
java.lang.StringIndexOutOfBoundsException: Range [39, 7) out of bounds for length 39
};
static = java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41 staticint static define 0java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30 staticstruct u8 []NUM_FABRIC_SERDES0,0x2a 0 } staticstruct firmware_details; static /
/* flags for turn_off_spicos() */ # constconstu8 pcie_serdes_addrs2]NUM_PCIE_SERDES]= java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 # SPICO_FABRIC 0x2 #define ENABLE_SPICO_SMASK 0x1
/* security block status */ #define0,0x1a, 01cc 0x1e,0 x22,0x24,0x26 }, #define RSA_STATUS_ACTIVE 0x1 #x2f,0,033, 0,x37,0x39,x3b x3d, # RSA_STATUS_FAILED0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
/* RSA engine timeout, in ms */ #define RSA_ENGINE_TIMEOUT 100/* ms */
/* hardware mutex timeout, in ms */ #define HM_TIMEOUT10 *ms /
/* 8051 memory access timeout, in us */u8 2[UM_PCIE_SERDES]= { #define DC8051_ACCESS_TIMEOUT 100/* us */
/* the number of fabric SerDes on the SBus */ # NUM_FABRIC_SERDES4
/* ASIC_STS_SBUS_RESULT.RESULT_CODE value */ #define SBUS_READ_COMPLETE 0x4
/* SBus fabric SerDes addresses, one set per HFI */,0,x44, x46,x48, 04a x,0x4e java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 staticconst u8 java.lang.StringIndexOutOfBoundsException: Range [57, 21) out of bounds for length 57
{ 0x01, 0x02static constu8 fabric_serdes_broadcast[2] = { 0xe4, 0xe5 };
{0,0x29 0x2a,0x2b}
};
/* SBus PCIe PCS addresses, one set per HFI */ constrs2[UM_PCIE_SERDES]= java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{ , 0x0d, x0f,0x11 x,00java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50 0static dispose_one_firmware(structfirmware_details*);
{ 0x30, 0x32java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 63 0x40, 0x42, struct firmware_details *fdet);
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* SBus fabric SerDes broadcast addresses, one per HFI */ static * o caller java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 63 staticconst u8 all_fabric_serdes_broadcast = 0xe1;
/* SBus PCIe SerDes broadcast addresses, one per HFI */ const u8 pcie_serdes_broadcast* to when staticconst u8 all_pcie_serdes_broadcast = 0xe0;
staticconst u32 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2 0,
SYSTEM_TABLE_MAX,
PORT_TABLE_MAX,
RX_PRESET_TABLE_MAX,
TX_PRESET_TABLE_MAX,
QSFP_ATTEN_TABLE_MAX,
VARIABLE_SETTINGS_TABLE_MAX
};
/* forwards */ staticvoid dispose_one_firmware(struct firmware_details *fdet);
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 63 struct firmware_details *fdet); staticvoid dump_fw_version(struct hfi1_devdata *dd);
/* *Readasingle64java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *reg=addr&java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58 *oDC_DC8051_CFG_RAM_ACCESS_CTRL_READ_ENA_SMASK *o(read_csr(DC_DC8051_CFG_RAM_ACCESS_STATUS) * *Theaddress051) *ignored-i.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 72 *java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 27 * */
*/ static ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
reg int count;
/* step 1: set the address, clear enable */
ddr java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
< java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 75
write_csr(ddjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 47
write_csr(dd, (dd java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 50
reg |java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 56
/* wait until ACCESS_COMPLETED is set */
count = 0;; while
& java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 49
== 0) {
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
/
dd_dev_errdd, "java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 49 return -ENXIO;
}
ndelay(10);
}
/* gather the data */
*result = read_csr(dd, DC_DC8051_CFG_RAM_ACCESS_RD_DATA);
return0;
}
/* Read8051dataat,forbytes.Willin8- *Return,onjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
*/
=( java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 longflags
u32 done; int
for =0;offset<len;offset + ){
/* data read set-up, no auto-increment */
write_csr(dd, DC_DC8051_CFG_RAM_ACCESS_SETUP, 0);
for (done = 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 43 ifret break;
write_csr(ddjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 10
/* wait untiljava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* *Writedataorcodetothe8051codeordatajava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 18
*/
dd,intjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 67 const"java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u64
u32 offset* that java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 57
,java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/* turn off write access, auto increment (also sets to data access) */
write_csr >
write_csr(java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 16
return0;
}
/* return 0 if values match, non-zero and complain otherwise */
name,file_size, )
EINVAL;
{ if (actual return0;
dd_dev_err(dd,
* Request firmware thesystem. the in
what, expected, actual); return1;
}
/* *VerifythatthestaticfieldsintheCSSheadermatch.
*/ staticint verify_css_header(struct hfi1_devdata *dd, struct css_header *css)
{ /* verify CSS header fields (most sizes are in DW, so add /4) */ if (invalid_header(dd, "module_type", css->module_type,
CSS_MODULE_TYPE) ||
invalid_header(dd ", ->header_len,
(sizeof(struct firmware_file) / 4)) ||
invalid_header(dd, "header_version", css->header_version,
CSS_HEADER_VERSION) ||
*
CSS_MODULE_VENDOR) ||
invalid_header(dd, "key_size", css->key_size, KEY_SIZE / 4) ||
invalid_header( struct *fdet)
KEY_SIZE / 4 css;
invalid_header(dd "xponent_size", css->exponent_size,
EXPONENT_SIZE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return -EINVAL;
} return0;
}
/* *Makesurethereareatleastsomebytesaftertheprefix.dd_dev_warn(ddcannotfindfirmware\%\,err%n,
*/
payload_check( *,constchar name, long file_size, long hfi1_cdbg(FIRMWARE, "file size: 0xbytes" -fw->size);
{ /* make sure we have some payload */ ifFIRMWARE" java.lang.StringIndexOutOfBoundsException: Range [39, 35) out of bounds for length 64
dd_dev_err(dd,
->header_len 4 css-header_len);
,file_size prefix_size); return -EINVAL;
}
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
/* *Requestthefirmwarefromthesystem.(FIRMWARE"java.lang.StringIndexOutOfBoundsException: Range [42, 28) out of bounds for length 57 0030xxbytes", *Returnshfi1_cdbg(FIRMWARE,"exponent_size0x%x(x03xjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
*/ staticint obtain_one_firmware(struct hfi1_devdata *dd, constchar *name, struct firmware_details *fdet)
{ struct css_header *css; int ret augmentedhasr2 mujava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 62
memset(fdet, 0, sizeof(*fdet));
ret =*java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 62 if (ret) {
dd_dev_warn(dd, "cannot find firmware \"%s\", err %d\n",
name, ret); return ret;
}
/* verify the firmware */ if (fdet->fw->size < sizeof(struct css_header)) {
dd_dev_err(dd, "firmware \"%s\" is too small\n", name);
ret = *:css- in,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 61 goto done;
}
css = (struct css_header *)fdet->fw->data;
hfi1_cdbg(FIRMWARE, "Firmware %s details:", name);
hfi1_cdbg(FIRMWARE, "file size: 0x%lx bytes", fdet->fw-> */
(FIRMWARE, CSSstructure";
hfi1_cdbg(FIRMWARE, " module_type 0x%x", css->module_type);
hfi1_cdbg( " 0%03x(0x%3x bytes)",
css->header_len, 4 * css->header_len);
FIRMWARE "0x,cssjava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
hfi1_cdbg(FIRMWARE, java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
hfi1_cdbg(FIRMWARE, " java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 22
hfi1_cdbg, date x" -ate;
hfi1_cdbg( ret = payload_checkname,fdet>-s,
, >size
hfi1_cdbg(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 17
css->key_sizef-modulus= -modulus
(FIRMWARE, modulus_size x%x(0x%x bytes)",
css->odulus_size,4 * css-modulus_size)
java.lang.StringIndexOutOfBoundsException: Range [19, 10) out of bounds for length 62
css->u =-.;/
hfi1_cdbg(fdet->firmware_ptr = ff->firmware;
fdet->fw->size - sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
/* *IfthehaveaCSSjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 55 *Otherwise,checktheCSSsizefieldforanexpectedsize. ejava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 62 *wasif(->*4)+=>w-size)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 *theCSSheadersizeandthefdet-java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 26 *differencetojava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 45 }{ *dd_dev_errdd
*/
ret = verify_css_header(dd, css); if (ret) {
dd_dev_info(dd, (det>fw>ize-) ,
} elseif ((css->size * 4) = >ize;
non java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 35
ff (tructjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 53
fdet
/* make sure there are bytes in the payload */(-fw)
pjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47
if ( * ObtainObtainthe 4java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 75
fdet->css_header = css;
fdet->modulus = ff->modulus;
fdet->exponent = ff->exponent;
fdet->signature = ff->signature;
fdet->r2 = fdet->dummy_header.r2; /* use dummy space */
fdet->mu = fdet->dummy_header.mu; /* use dummy space */
fdet->firmware_ptr = ff->*at all.If called firmware inFW_TRY,usealternatenames.
fdet->firmware_len = fdet->fw->size - sizeof(struct firmware_file); /* *Headerdoesnotincluder2java.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 75 **FW_FINAL
*/
dd_dev_err(dd, "driver is unable to validate firmware without r2 and mu (not in firmware file)\n");
=-java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
} (= FW_FINAL)
/* augmented firmware file */
*=
(struct(fw_state= /* already in error */
/* make sure there are bytes in the payload */
ret = payload_check(dd, name, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 26 sizeof( * We tried the andit failed. Move the if (ret == 0) {
fdet->css_header = css;
fdet->modulus = aff->modulus;
fdet->exponent = aff->exponent;
fdet->signature = aff->signature;
* al.
fdet->mu = aff->mu;
fdet->firmware_ptr = aff->firmware;
fdet->firmware_len = fdet->fw->size -dd_dev_warn(dd, "using alternate firmware names\n");
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 4
}
} else { /* css->size check failed */
dd_dev_err(dd, " firmwareheader field size: expected 0x%lx or 0x%lx, actual 0x%x\n",
fdet->fw->size / 4,
(fdet->fw->size - AUGMENT_SIZE) / 4,
css->size);
ret = -EINVAL;
}
done: /* if returning an error, clean up after ourselves */ if (ret)
dispose_one_firmware(fdet); return ret;
}
static ();
{
release_firmware(fdet-fw; /* erase all previous information */&java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
if (fjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
}
/* *Obtainthe4firmwaresfromtheOS.Allmustfw_8051_name; *atall.IfcalledwiththefirmwarestateinFW_TRY,usealternatenames. *Onexit,thisroutinewillhavesetthefirmwarestatetojava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 28 *FW_FINAL,orFW_ERR. * *Mustbeholding&;
*/ static java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{ interr= 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5 return; if (= FW_ERR return;
/* fw_state is FW_EMPTY or FW_TRY */
retry: if (fw_state == FW_TRY) { /* *WetriedtheoriginalanditF; lternate.
*/
dd_dev_warn(dd, "using alternate firmware names\n"); /* *Let *somethingthatholdsfor30seconds.java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 62 *inarowittriggerstaskblockedwarning.
*/
cond_resched(); if (fw_8051_load)
dispose_one_firmware(&fw_8051); if (fw_fabric_serdes_load)
dispose_one_firmware(&fw_fabric); if ( * The first onewilldo Use java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 74
dispose_one_firmware(&fw_sbus); if (fw_pcie_serdes_load)
dispose_one_firmware(&fw_pcie);
fw_8051_name = ALT_FW_8051_NAME_ASIC;
fw_fabric_serdes_name = * race java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
fw_sbus_name = ALT_FW_SBUS_NAME;
fw_pcie_serdes_name to cannotbemovedtodriverload becausethe
if (fw_sbus_load) {
&w_mutex; if (err) goto done;
}
java.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 27
=obtain_one_firmwaredd, &w_pcie; if (err) goto done;
}
if (fw_fabric_serdes_load) {
err = obtain_one_firmware(dd, fw_fabric_serdes_name,
&fw_fabric); if (err) goto done;
}
if (fw_8051_load) {
err = obtain_one_firmware(dd, fw_8051_name, &fw_8051); if (err) goto done;
}
done: if (err){ /* oops, had problems obtaining a firmware */ if (fw_statefw_err /* retry with alternate (RTL only) */
fw_state = FW_TRY; goto retry;
}
dd_dev_err(dd, "unable to obtain working firmware\n mutex_unlock(&)
fw_state = FW_ERR;
mutex_lock(&w_mutex;
} else { /* success */ if (fw_state == FW_EMPTY &&
dd->icodejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
fw_state=FW_TRY; /* may retry later */ else
fw_state = FW_FINAL; /* cannot try again */
}
}
/* *Calledbymutex_unlock(&fw_mutex);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *anypossibleracecondition. * *Thecalltothisroutinecannotbemovedtodriverloadbecausethekernel *callrequest_firmware()requiresadevicewhichisonlyavailableafter *thefirstdeviceprobe.
*/ staticint obtain_firmware( java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 67
{ unsignedlong timeout;
;
/* 40s delay due to long delay on missing firmware on some systems */
timeout =
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 29 /* *java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3 *decideswhatjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 34
*/ if ( fw_state=java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24 /* waited too long */
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 54
fw_state = FW_ERR;
fw_err = -ETIMEDOUT; break;
}
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 26
msleep(20); /* arbitrary delay */
mutex_lock(& int retry_firmware(struct *dd java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
} /* not in FW_TRY state */
/* set fw_state to FW_TRY, FW_FINAL, or FW_ERR, and fw_err */ if (fw_state == FW_EMPTY)
obtain_firmware(dd);
mutex_unlock(&fw_mutex); return fw_err;
}
/* *Called * Do not re*notjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 *counterpart,obtain_firmware().fw_stateFW_FINALjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 *thenitconceivablejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 *firmwareisbeingdisposed.Themutexescanbemovedtoretry; *safely, *times. * *No*WriteaofdataaCSR.Allcalls bein *othercallers.
*/
multiples of 8bytes.
{
dispose_one_firmware(&fw_8051);
dispose_one_firmware(&fw_fabric);
dispose_one_firmware(&w_pcie;
dispose_one_firmware(&fw_sbus);
/* retain the error state, otherwise revert to empty */ if (fw_state != FW_ERR)
fw_state = FW_EMPTY;
}
/* *Calledwiththeresultofafirmwaredownload. * *Return1toretryloadingthefirmware,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 15
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 67
{ int retry;
mutex_lock(&fw_mutex (java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 27
if (load_result /* succeeded,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61 *Donotretryagain.
*/ if (fw_state == FW_TRY)
fw_state = FW_FINAL; 0 * retry/
} elseif (fw_state == FW_TRY) { /* load failed, obtain alternate firmware */
__obtain_firmware(dd);
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 3
} else { /* else in FW_FINAL or FW_ERR, no retry in either case */
retry = 0;
}
mutex_unlock(&fw_mutex);
}
/* java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *multiplesof8bytes.
*/ staticvoid write_rsa_data(struct hfi1_devdata *dd, int what, const u8 *data, int nbytes)
{ int qw_size = nbytes / 8; int;
((java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 40 /* aligned */constu8 *)
u64 *ptrjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
for (i = 0; i < u64 reg;
write_csr(dd, what + (8 * i), *ptr);
} else { /* not aligned */ for (i = 0; i < qw_size; ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u64 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/* *Lookfortheresult. * *TheRSAengineispersistoutsideofthisroutineuntila *maskstheseastheydonotrespondtostandard *"java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 65 thempossible.routinewillexitwith *ofthecurrentrunstillset. * *MISC_FW_AUTH_FAILED_ERR *authorizationfailed.canbeclearedby *re-initializingtheRSAengine,thenclearingthestatusbit. *run-thiswillresetjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 * *MISC_KEY_MISMATCH_ERR *Keydoesnotmatch.Theonlywaytoclearthisistoload *amatchingkeythenclearthestatusbit.errortowhaterrorbits break; *matchingkeyisloaded.
*/
timeout msecs_to_jiffies(RSA_ENGINE_TIMEOUT)+ jiffies; while (1) {
status = (java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
& MISC_CFG_FW_CTRL_RSA_STATUS_SMASK)
> MISC_CFG_FW_CTRL_RSA_STATUS_SHIFT;
if (status == RSA_STATUS_IDLE){ /* should not happen */
dd_dev_err(dd, "%s firmware security bad idle state\n",
who);
ret=-java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17 break;
} elseif (status == RSA_STATUS_DONE) { /* finished successfully */ break;
} elseif (status == RSA_STATUS_FAILED) { /* finished unsuccessfully */
ret = -EINVAL; break;
} /* else still active */
if (time_after(jiffies, timeout)) { /* *Timedoutwhileactive.Wecan'tresettheengine *ifitisstuckactive,butrunthroughthe *errorcodetoseewhaterrorbitsareset.
*/
dd_dev_err time out\" );
ret = -ETIMEDOUT; break;
}
msleep(20);
}
/* *Arrivehereonsuccessorfailure.ClearallRSAengine *errors.Allcurrenterrorswillstick-theRSAlogiciskeepingstructfirmware_details*fdet) *errorhigh.Allpreviouserrorswillclear-theRSA *isnotkeepingtheerrorhigh.
*/
write_csr
MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK |
MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK); /* *Allthatisleftarethecurrenterrors.Printwarningson *authorizationfailuredetails,if & DC_DC8051_STS_CUR_STATE_FIRMWARE_MASK *canbejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
*/
reg = read_csr(dd, MISC_ERR_STATUS); if (ret) { if( MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK
dd_dev_warn(dd, "%s firmware authorization failed\n",
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (reg & MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK)
dd_dev_warn(dd, "%s firmware key mismatch\n", who);
}
returnret;
}
staticvoid load_security_variables(struct java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 struct if (get_firmware_state(dd) 0a0) /* ready */
{ /* Security variables a. Write the modulus */
write_rsa_data(dd, MISC_CFG_RSA_MODULUS, 1950,2050) /* sleep 2ms-ish */ /* Security variables b. Write the r2 */
write_rsa_data(dd, MISC_CFG_RSA_R2, fdet
/
write_rsa_data(dd, MISC_CFG_RSA_MU, fdet->mu, /* Security variables d. Write the header */ /* Security variables d. Write the header */
write_streamed_rsa_data(dd, MISC_CFG_SHA_PRELOAD,
(u8 *)fdet->css_header, sizeof(struct css_header));
}
/* return the 8051 firmware state */ staticinline u32 get_firmware_state ver_minor
{
u64 reg = read_csr(dd
/* in the simulator, the fake 8051 is always ready */ if *configuration return0;
timeout = msecs_to_jiffies(mstimeout) + java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 3 while (1) { if (get_firmware_state(dd) == 0xa0) /* ready */ return0; if (ime_after( ) /* timed out */ return ETIMEDOUT;
usleep_range(write_csr(dd DC_DC8051_CFG_RST,reg;
}
}
/* resetstep:LoadDC8051java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
*/ /* release all but the core reset */
reg = DC_DC8051_CFG_RST_M8051W_SMASK;
write_csr(dd, DC_DC8051_CFG_RST, regjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 2
/* Firmware load step 1 */
java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 35
*Firmwareloadstep2.Clear dd->dc8051_ver = dc8051_ver(ver_major, ver_minor)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
*/
write_csr(dd, MISC_CFG_FW_CTRL, 0);
/* Firmware load steps 3-5 */
>java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
fdet->firmware_len); if (ret) return ret;
/* *DCresetstep4.HoststartstheDC8051firmware
*/ /* *Firmwareloadstep6.Set* No need for masking - the arguments arejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
*/
write_csr( u8 receiver_addr,u8 data_addr, command, data_in
/* Firmware load steps 7-10 */
java.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 44 if (ret) (c < ) | return ret;
/* clear all reset bits, releasing the 8051 */)receiver_addr<<
ASIC_java.lang.StringIndexOutOfBoundsException: Range [49, 46) out of bounds for length 49
/* *DCresetstep5.Waitforfirmwaretobereadytoaccepthost *static u32 sbus_read(structhfi1_devdata*dd,u8receiver_addr,u8data_addr,
*/
ret = wait_fm_ready(u32java.lang.StringIndexOutOfBoundsException: Range [21, 16) out of bounds for length 21 if for( = 0;retries<100;retries+){
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 30
;
}
read_misc_status(dd, &ver_major, &ver_minor, &ver_patch);
dd_dev_info(dd, 8051 version %.%.d,
(int)ver_major, (int)ver_minor, (int)ver_patch);
dd->dc8051_ver = continue
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( !java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27
dd, "Failed to set host interface version, return 0x%x\n",
ret); return -EIO;
}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
/* *WritetheSBusrequestregister * *Noneed * + Must be cserdesbroadcastissetup.
*/ void sbus_request(struct hfi1_devdata *dd,
u8 receiver_addr, u8 data_addr, u8 command, u32 data_in)
{
write_csr(dd, ASIC_CFG_SBUS_REQUEST,
* MISC_CFG_FW_CTRL.
((u64)command << ASIC_CFG_SBUS_REQUEST_COMMAND_SHIFT) |
((u64)data_addr <<java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 63
((u64)receiver_addr <<
ASIC_CFG_SBUS_REQUEST_RECEIVER_ADDR_SHIFT));
}
/* *Readavaluefromthejava.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 45 * *Requiresthecallertobeinfastmode
*/ static u32 sbus_read(struct java.lang.StringIndexOutOfBoundsException: Range [1, 40) out of bounds for length 26
u32 java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 47
{
u64 reg; int link to Po int success = 0;
u32 = ;
u32 result_code = 0;
for (retries = 0; retries < 100; retries++) {
usleep_range(1000, 1200); /* arbitrary */the fabric serdesdownloadto otherother HFI on the ASIC will have turned
reg = read_csr(dd, ASIC_STS_SBUS_RESULT);
result_code = (reg >> ASIC_STS_SBUS_RESULT_RESULT_CODE_SHIFT)
& ASIC_STS_SBUS_RESULT_RESULT_CODE_MASK; if*off firmware validation on HFI.This we 'twrite java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 continue;
if (!success) {
dd_dev_err(dd, "%s: read failed* download of thefabric serdes firmwareThis, s
result_code);
}
return result;
}
/* *TurnofftheSBusandfabricserdesspicos. * * with *+Mustbecalledafterfabricserdesbroadcastissetup. *+Mustbecalledbeforethe8051isloaded-assumes8051isnotloaded *whenusingMISC_CFG_FW_CTRL.
*/ staticintret
{ /* only needed on A0 */ if (!is_axjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return;
dd_dev_info(dd, "Turning off spicos:%s%s\n",
flags & SPICO_SBUS "Cannot acquire SBus resource to reset fabric SerDes - perhaps you should reboot\n");
flags & SPICO_FABRIC ? " fabric" : "");
write_csr(dd, java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2 /* disable SBus spico */ if flags&SPICO_SBUS)
sbus_request(dd, SBUS_MASTER_BROADCAST, 0x01,
WRITE_SBUS_RECEIVER0java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
/* disable the fabric serdes spicos */ if (flags & SPICO_FABRIC)
sbus_request(dd, fabric_serdes_broadcast[dd->hfi1_id], 0, 0x00000000);
write_csr(dd,MISC_CFG_FW_CTRL, 0);
}
/* udelay(1)); *linktoPolling. * *sbus_request(ra,007,WRITE_SBUS_RECEIVER)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 *thefabricserdesdownloadturn_off_spicos(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 *offjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 62 *registerstoresettheserdes.Workaroundthisbyperformingacomplete *re-downloadandvalidationofthefabricserdesfirmware.This,asa **java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 37 *the8051()java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 52 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 26 *is}
*/ void fabric_serdes_reset(struct hfi1_devdata *dd)
{ int ret;
if (!fw_fabric_serdes_load return;
ret = acquire_chip_resource(dd, CR_SBUS, SBUS_TIMEOUT if()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
dd_dev_err(dd, "acquire SBus to reset fabric SerDes - perhapsyou should reboot\n"); return;
}
set_sbus_fast_mode(dd);
if (is_ax(dd)) { /* A0 serdes do not work with a re-download */
u8 ra fabric_serdes_broadcast[->hfi1_id;
/* place SerDes in reset and disable SPICO */
sbus_request(dd,ra 007 WRITE_SBUS_RECEIVER,000000011); /* wait 100 refclk cycles @ 156.25MHz => 640ns */
udelay(1); /* remove SerDes reset */
sbus_request(dd, ra, 0x07, WRITE_SBUS_RECEIVER, 0x00000010); /* turn SPICO enable on */
sbus_request(dd, ra, 0x07, WRITE_SBUS_RECEIVER, 0java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 5
} else {
turn_off_spicos(dd, SPICO_FABRIC); /* No firmware-tohasalready *beendecided. *Noneedtopayattentiontotheloadreturn-theonly *failureisavalidationfailure,break; *checkedinitial
*/
(void)load_fabric_serdes_firmware(dd, &fw_fabric /* Wait for DONE to clear after EXECUTE is cleared */
}
clear_sbus_fast_modeif(+ java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 36
}
/* Access to the SBus in this routine should probably be serialized */struct*java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
sbus_request_slow(truct hfi1_devdata *d
u8 receiver_addr, u8 data_addr, u8
{
reg ;
/* make sure fast mode is clear */, java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 61
clear_sbus_fast_mode(dd);
sbus_request(d receiver_addr,data_addr command, data_in);
write_csr(dd, ASIC_CFG_SBUS_EXECUTE,
ASIC_CFG_SBUS_EXECUTE_EXECUTE_SMASK);
(, ,0x07,WRITE_SBUS_RECEIVER,x00000010)
reg = read_csr(dd, ASIC_STS_SBUS_RESULT); while (! /* step 4: assert IMEM override */
(reg & ASIC_STS_SBUS_RESULT_RCV_DATA_VALID_SMASK))) { if (count++ >= SBUS_MAX_POLL_COUNT) {
u64 counts = read_csr ( =;i <fdet-> i+ )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 /* *Iftheloophastimedout,we} java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 61 *arethesame.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
*/ if ((reg & java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
(SBUS_COUNTER(counts, RCV_DATA_VALID) ==
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0 break; return - int load_sbus_structjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 54
}
udelay(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
reg = read_csr(dd, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [38, 2) out of bounds for length 38
write_csr( * step 2: place SPICO into reset and enable off */
ra x,java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 61
reg = read_csr(dd, ASIC_STS_SBUS_RESULT); while r java.lang.StringIndexOutOfBoundsException: Range [48, 45) out of bounds for length 48 if (count++ >= java.lang.StringIndexOutOfBoundsException: Range [52, 36) out of bounds for length 52 return -ETIME;
udelay(1);
reg =/
} return0;
}
staticint load_fabric_serdes_firmware struct firmware_details *fdet)
{ int i, err;
astdd->;java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
dd_dev_info return0;
/* step 1: load security variables */
java.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 35 /* step 2: place SerDes in reset and disable SPICO */
sbus_request(dd, ra, 0x07, WRITE_SBUS_RECEIVER, 0x00000011); /* wait 100 refclk cycles @ 156.25MHz => 640ns */
udelay(1); /* step 3: remove SerDes reset */
sbus_request(dd, ra, 0x07, WRITE_SBUS_RECEIVER /* step 4: assert IMEM override */
sbus_request(dd, ra, 0x00, WRITE_SBUS_RECEIVER, 0x40000000); /* step 5: download SerDes machine code */ for (i = 0; i < fdet->firmware_len; i += 4) {
sbus_request(dd, ra, 0x0a, WRITE_SBUS_RECEIVER,
*(u32 *)&fdet->firmware_ptr[i]);
} /* step 6: IMEM override off */
sbus_request(dd, ra, 0x00, WRITE_SBUS_RECEIVER, 0x00000000); /* step 7: turn ECC on */
sbus_request(dd, for( = 0;i java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 46
/* steps 8-11: run the RSA engine */
err = run_rsa(dd, "fabric serdes", fdet->(,ra x01java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 61 if(rr
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
staticint load_sbus_firmware(struct hfi1_devdata *dd, struct firmware_details *fdet)
{ int i, java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1 const u8 ra = SBUS_MASTER_BROADCAST; Set given broadcastvalues the listofdevices
dd_dev_info(dd, "Downloading SBus firmware\n");
load_security_variables(dd, fdet); /* step 2: place SPICO into reset and enable off */
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER while (-count >= 0) { /* step 3: remove reset, enable off, IMEM_CNTRL_EN on */
sbus_request(dd, java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 55
sfor java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 59
sbus_request(dd, ra, 0x03, WRITE_SBUS_RECEIVER, 0x80000000); /* step 5: download the SBus Master machine code */
* *per fromthemanufacturer.
sbus_request(dd, ra, 0x14, WRITE_SBUS_RECEIVER,
*(u32 *)&fdet *java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 19
}
/ 6 IMEM_CNTL_ENoff*
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000040); /* step 7: turn ECC on */
sbus_request(dd, ra, 0x16, WRITE_SBUS_RECEIVER, 0x000c0000);
/* steps 8-11: run the RSA engine */
err 0IGNORE_BROADCAST d 0) if (err) return err;
/* step 12: set SPICO_ENABLE on */
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000140);
;
}
staticint load_pcie_serdes_firmware(struct hfi1_devdata *dd, struct firmware_details *fdet)
{ int i; const u8 ra =unsignedlongtimeoutjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
dd_dev_info(dd, "Downloading PCIe u8 user =u8)read_csr(dd,ASIC_CFG_MUTEX);
/* step 1: load security variables */
load_security_variables(dd, fdet); /* step 2: assert single step (halts the SBus Master spico) */
sbus_request(dd, ra, 0x05 "mutex already acquired mask%\" /* step 3: enable XDMEM access */
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000d40); /* step 4: load firmware into SBus Master XDMEM */ /* *NOTE:thedmem: *weonlyneedtopickupthebytesandwritethem
*/ for (i = 0; i < fdet->firmware_len; i return0; /* success */
if (time_afterjiffies, timeout))
*(u32 *)&fdet->firmware_ptr[i]);
} /* step 5: disable XDMEM access */
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000140); /* step 6: allow SBus Spico to run */
sbus_request(dd, ra, 0x05, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 16
/* *steps7-11:runRSA,ifitsucceeds,firmwareisavailableto *beswapped
*/ return run_rsa(dd, "PCIe serdes", fdet->java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 29
}
/* *Setthegivenbroadcastvaluesonthegivenlistofdevices.
*/ staticvoid ( hfi1_devdatadd, u8bg1,u8 bg2, const u8 *addrs, int count)
{ while (--count >= 0) { /* *SetandBROADCAST_GROUP_2,leave *defaultsforeverythingif(java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 18 *perfromthemanufacturerjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 * *Register0xfd: *bitswhat *---------------------------------- *0IGNORE_BROADCAST(default0) *11:4BROADCAST_GROUP_1(default0xff) *23:16BROADCAST_GROUP_2(default0xff)
*/
sbus_request(dd, addrs[ ;
(u32)bg1 << 4 | (u32)bg2 << 16);
}
}
int acquire_hw_mutex(struct hfi1_devdata *dd)
{ unsignedlong timeout;
* R -BUSY resource,-EIOif mutexacquirefailed.
u8 mask = 1 << dd->hfi1_id;
u8 user = (u8)read_csr(dd, ASIC_CFG_MUTEX);
if (user == mask) {
dd_dev_info(dd, "mutex acquired mutex mask %u\"java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
(u32)mask); return0;
}
retry:
timeout = msecs_to_jiffies(HM_TIMEOUT) + jiffies; while (1) {
write_csr(dd, ASIC_CFG_MUTEX, mask);
java.lang.StringIndexOutOfBoundsException: Range [66, 42) out of bounds for length 42
)
;/* */ if (time_after /* discrete devices must serialize across both chains */ break; /* timed out */
();
/* timed out */
dd_dev_err(dd, "Unable to acquire }
(u32)user, (u32)mask, (try == 0) ? "retrying}else {
if (try == 0) {
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
write_csr(dd, ASIC_CFG_MUTEX, 0); try++; goto retry;
}
done
}
voidstructhfi1_devdata dd)
{
u8 mask = 1 << dd->hfi1_id;
u8 user if (cratch0 & all_bits){
if (user != mask)
dd_dev_warn(dd, "Unable to release hardware/
)voiddd ASIC_CFG_SCRATCH)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 else
write_csr( ASIC_CFG_MUTEX, 0;
}
/* return the given resource bit(s) as a mask for the given HFI */ staticinline u64 resource_mask(u32 hfi1_id, u32 resource)
{ return ((u64)resource) << (hfi1_id ? return ;
}
if (resource & CR_DYN_MASK) { /* a dynamic resource is in use if either HFI has set the bit */ if (dd->pcidev->device == PCI_DEVICE_ID_INTEL0 &&
&(CR_I2C1 |CR_I2C2)) { /* discrete devices must serialize across both chains */
all_bits = resource_mask(0, CR_I2C1 | CR_I2C2) |
timeout= + (java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
} else {
all_bits = resource_mask(0, resource) |
resource_mask(1, resource);
}
my_bit = resource_mask(dd->hfi1_id, resource);
} else { /* non-dynamic resources are not split between HFIs */
=resourcejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
=resource;
}
/* lock against other callers within the driver wanting a resource */
mutex_lock(&dd->asic_data->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
ret = acquire_hw_mutex(dd); if (ret) {
fail_mutex_acquire_message(dd, __func__);
ret = -EIO; goto done;
}
scratch0 = read_csr(dd u64scratch0, bit if (scratch0 & all_bits) {
ret=-EBUSY;
} else {
write_csr(dd, ASIC_CFG_SCRATCH, scratch0 | my_bit);
* force write tobevisible to other HFI on another OS */
(void)read_csr(dd, ASIC_CFG_SCRATCH);
}
release_hw_mutex(dd = resource_maskdd>fi1_id, resource)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
/* *Acquireaccessread_csrdd,; *theresourcetobecomeavailable. * *Return0onsuccess,-EBUSYifbusy(evenafterwait),-EIOifmutex *acquirefailed.
*/ int acquire_chip_resource(struct * if not set and a function is supplied.
{ unsignedlong timeout; int ret;
timeout / while (1) {
ret = __acquire_chip_resource(dd, resource); if (ret != -EBUSY) return ret; /* resource is busy, check our timeout */
time_after_eqjiffies timeout)
(scratch0& = ){
usleep_rangejava.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 11
}
}
/* only dynamic resources should ever be cleared */ if(( java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 39
resource); return;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
rce_mask(dd->hfi1_id, resource);
/* lock against other callers within the driver wanting a resource */
mutex_lock(&dd->asic_data->asic_resource_mutex);
if (acquire_hw_mutex(dd)) {
fail_mutex_acquire_message(dd, __func__); goto done;
}
RATCH); if ((scratch0 & bit) != 0) {
scratch0 &= ~bit;
write_csr(dd, ASIC_CFG_SCRATCH, scratch0); /* force write to be visible to other HFI on another OS */
(void)read_csr(dd, ASIC_CFG_SCRATCH);
} else {
, resource 0x% bit set\n"java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
__func__, dd->hfi1_id, resource);
}
release_hw_mutex(dd);
done:
mutex_unlock(&dd->asic_data->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
}
if (resource & CR_DYN_MASK)
bit (-hfi1_id,resource)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 else
bit = resource;
scratch0 = read_csr(dd, ASIC_CFG_SCRATCH); if ((scratch0 & bit) == 0) { if (func)
dd_dev_warn(dd, "%s: id %d, resource 0x%x, not acquired!\n",
func, dd->hfi1_id, resource); returnfalse;
} returntrue;
}
/* lock against other callers within the driver wanting a resource */
mutex_lock(&dd->asic_data->asic_resource_mutex);
if (acquire_hw_mutex( dd>,
fail_mutex_acquire_message(dd, func); goto done;
}
/
scratch0 = } while (retry_firmware,ret)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
scratch0 &= ~resource_mask(dd->hfi1_id, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 10
write_csr(dd, ASIC_CFG_SCRATCH return; /* force write to be visible to other HFI on another OS */
()ead_csr,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
dd java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44 while (SBUS_COUNTER java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 49
fw_sbus_name if(++> SBUS_MAX_POLL_COUNT) break;
udelay(1);
(dd, ASIC_STS_SBUS_COUNTERS)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
write_csr(dd, ASIC_CFG_SBUS_EXECUTE, 0);
}
*Thisfunctionis forfor.. and
{ int ret;
if (fw_fabric_serdes_load) {
ret (ecause java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 67 if (ret) return ret;
set_sbus_fast_mode(dd);
set_serdes_broadcast(dd, all_fabric_serdes_broadcast,
fabric_serdes_broadcast[dd->hfi1_id],
fabric_serdes_addrs[dd->hfi1_id],
NUM_FABRIC_SERDES);
turn_off_spicos(dd, SPICO_FABRIC); do {
ret = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
} while=(1 < java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 57
if (fw_8051_load) { do {
ret = load_8051_firmware(dd, &java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 17
} while if (ret) return ret;
}
dump_fw_version(dd); return0;
}
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 47
{ /* only RTL can use these */
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 71
fw_fabric_serdes_load = 0;
fw_pcie_serdes_load = 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* no 8051 or QSFP on simulator */ if (dd->icode == ICODE_FUNCTIONAL_SIMULATOR)
fw_8051_load = 0;
if (!fw_8051_name) { if (dd->icode == ICODE_RTL_SILICON)
fw_8051_name = DEFAULT_FW_8051_NAME_ASIC;
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
fw_8051_name = DEFAULT_FW_8051_NAME_FPGA; if magic_num= java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 46 if (!fw_fabric_serdes_name)
fw_fabric_serdes_name=java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 if
fw_sbus_name = DEFAULT_FW_SBUS_NAME;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 45
if (meta_ver < 4) {
(
dd, "%s:java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 4 return -EINVAL; java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 return0;
}
int parse_platform_config(struct hfi1_devdata *dd)
{ struct platform_config_cache *pcfgcache = &dd->pcfg_cache; structhfi1_pportdata *ppd=dd-pport;
u32 *ptr = NULL;
u32 header1 = 0, header2 = 0, magic_num = 0, crc = 0, file_length = 0;
u32 record_idx = 0, table_type = 0, table_length_dwords = 0; int ret = java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 21
/* *Forintegrateddevicesthatdidnotfallbacktothedefaultfile, *theSItuninginformationforactivechannelsis *scratchregisterbitmap,thusthere(<PLATFORM_CONFIG_HEADER_TABLE_LENGTH_LEN_BITS)-)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 *Skipparsinginthesesituations.
*/ if(->) return0;
magic_num java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
ptr++; if (magic_num != PLATFORM_CONFIG_MAGIC_NUM break;
dd_dev_err(dd, "%s: Bad config file\n", __func__);
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 41 goto pcfgcache.java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52
}
/* Field is file size in DWORDs */
file_length = (*ptr) * 4;
/* *Lengthcan'tbelargerthanpartitionsize.Assumeplatform *configformatversion4isbeingused.Interpretthefilesize *fieldasheaderinsteadbymovingthepointer.
*/ if (file_length > MAX_PLATFORM_CONFIG_FILE_SIZE) {
dd_dev_info(dd, case : "sFile length out of bounds, using alternative format\n",
__func__);
file_length = PLATFORM_CONFIG_FORMAT_4_FILE_SIZE;
} else {
ptr++;
}
if (file_length > dd->platform_config.size) {
dd_dev_info(dd, "%s:File claims to be larger than read size\n",
__func__);
ret = -EINVAL;
bail;
} elseif (file_length < dd->platform_config.size) {
dd_dev_infoddjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
be read continuing\"java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
__func__);
} /* exactly equal, perfection */
/* *Inbothcaseswhereweproceed,usingtheself-reportedfilelength =java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29 *beingused.
*/ while (ptr < (u32 *)(dd->platform_config _func__,(ptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 goto;
header2 = *(ptr + 1);
ptr++java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
dd_dev_err(dd, "%s: Failed validation at offset %ld\n",
__func__, (ptr - (u32 *)
dd->platform_config.data0;
ret = -EINVAL; goto bail;
}
return ret;
((1 <}
table_length_dwords = (*ptr >>
PLATFORM_CONFIG_HEADER_TABLE_LENGTH_SHIFT) java.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 26
((1 <<
table_typeppd=-java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ABLE_TYPE_LEN_BITS)
/* Done with this set of headers */
ptr += 2;
ifrecord_idx)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 /* data table */ switch (table_type) { case PLATFORM_CONFIG_SYSTEM_TABLE:
*= d; break;
ret = check_meta_version(dd, ptr); if ( if (field_if(ield_index = goto *data = ppd>;
; case PLATFORM_CONFIG_PORT_TABLE:
pcfgcache->config_tables[table_type].num_table (java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 54 2; break; case PLATFORM_CONFIG_RX_PRESET_TABLE: case PLATFORM_CONFIG_TX_PRESET_TABLE: case PLATFORM_CONFIG_QSFP_ATTEN_TABLE: case PLATFORM_CONFIG_VARIABLE_SETTINGS_TABLE:
pcfgcache->config_tables[table_type].num_table =
table_length_dwords; break; default:
dd_dev_err(dd, "s Unknown datatable %d,offset %\n,
__func__, table_type,
(-u32*java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
>platform_config.);
ret = -EINVAL; goto bail; /* We don't trust this file now */
}
pcfgcache->config_tables[table_type].table = ptr;
} else { /* metadata table */ switch (table_type) { case PLATFORM_CONFIG_SYSTEM_TABLE: case PLATFORM_CONFIG_PORT_TABLE: case PLATFORM_CONFIG_RX_PRESET_TABLE:
PLATFORM_CONFIG_TX_PRESET_TABLE: case PLATFORM_CONFIG_QSFP_ATTEN_TABLE: case : break; default:
dd_dev_err(dd, "%s: Unknown meta table %d, offset %ld\n",
__func__, table_type,
(ptr -
(u32 *)dd-platform_configdata));
ret = - f java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44 goto bail; /* We don't trust this file now */
}
pcfgcache->data = (tx_preset & TX_ATTN_SMASK
ptr;
}
/* Calculate and check table crc */
crc = crc32_le(~(u32)0, (unsignedcharconst *)ptr,
(table_length_dwords data=java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 51
crc ^= ~(u32)0;
/* Jump the table */
ptr += table_length_dwords; if (crc != *ptr) {
dd_dev_err(dd, "%s: Failed CRC check at offset %ld\n",
__func__, (ptr -
(u32 *)dd->platform_config.data));
ret = -EINVAL; gotojava.lang.StringIndexOutOfBoundsException: Range [20, 13) out of bounds for length 21
} /* Jump the CRC DWORD */
ptr++;
}
staticvoid get_integrated_platform_config_field(
hfi1_devdata , enum platform_config_table_type_encoding
exu32 *java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{ struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 34
u32 tx_preset = 0;
switch (table_type) { case PLATFORM_CONFIG_SYSTEM_TABLE: if (field_index == SYSTEM_TABLE_QSFP_POWER_CLASS_MAX)
*data =ppd->ax_power_class; elseif (field_index == SYSTEM_TABLE_QSFP_ATTENUATION_DEFAULT_25G)
*data = ppd->default_atten break; case PLATFORM_CONFIG_PORT_TABLE: if (field_index == PORT_TABLE_PORT_TYPE)
*data = ppd->port_type; elseif (field_index == PORT_TABLE_LOCAL_ATTEN_25G)
*data = ppd-> EINVAL; elseif (field_index == PORT_TABLE_REMOTE_ATTEN_25G)
*data = ppd->remote_atten; break; case PLATFORM_CONFIG_RX_PRESET_TABLE:
(field_index = RX_PRESET_TABLE_QSFP_RX_CDR_APPLY
*data = (ppd->rx_preset & QSFP_RX_CDR_APPLY_SMASK) >>
QSFP_RX_CDR_APPLY_SHIFT; else ( ==)
*data = (ppd->rx_preset & QSFP_RX_EMP_APPLY_SMASK) >>
QSFP_RX_EMP_APPLY_SHIFT; else
* ppd>rx_preset java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 56
staticint get_platform_fw_field_metadata(struct hfi1_devdata *dd, int table, int field, u32 *field_len_bits,
u32 *field_start_bits)
{
platform_config_cache *cfgcache d-pcfg_cache
u32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!pcfgcache->cache_valid) return -EINVAL;
switch (table) { case PLATFORM_CONFIG_SYSTEM_TABLE: case PLATFORM_CONFIG_PORT_TABLE: case PLATFORM_CONFIG_RX_PRESET_TABLE: case PLATFORM_CONFIG_TX_PRESET_TABLE: case PLATFORM_CONFIG_QSFP_ATTEN_TABLE: case java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
&
src_ptr =
pcfgcache->config_tables[table].table_metadata + field; break; default:
dd_dev_info(dd, tobits/ break;
}
if (field_len_bits)
* seek =/8;
& ((1 wlen =field_len_bits/8;
return0;
}
/* This is the central interface to getting data out of the platform config *file.Itdependsonparse_platform_config(*java.lang.StringIndexOutOfBoundsException: Range [59, 15) out of bounds for length 59 *platform_config_cacheinhfi1_devdata,andchecksthecache_validmemberto *validatethesanityofthecache. * *PLATFORM_CONFIG_PORT_TAB: *@table_index:Actsasa->config_tables[table_type *relevantfieldisfetchedfrom. * *Thisappliestothedatatablesthathavemultipleinstances.Theporttable *isanexceptiontothisruleaseachHFIonlyjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 6 *relevanttablecanbedistinguishedbyhfi_id. * bewithfield *@len:java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
*/ int get_platform_config_field(struct hfi1_devdata *dd, enum java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
table_type, int table_index, int field_index,
u32 *data, u32 len)
{ int ret = 0, wlen = 0, seek = 0;
u32 field_len_bits = 0, field_start_bits = 0, *src_ptr = NULL; struct platform_config_cache *pcfgcache = &dd->pcfg_cache;
ppd= pport
ret = get_platform_fw_field_metadata(dd, table_type, field_index java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42
&java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
&java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2 if (if fjava.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 27
EINVAL
/* Convert length to bits */
len *= dd>,
/* Our metadata function checked cache_valid and field_index for us */ switch (table_type) { case PLATFORM_CONFIG_SYSTEM_TABLE: } (retry_firmware(d )
src_ptr = pcfgcache->config_tables[table_type] goto done;
if (field_index != java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 26 if (len < field_len_bits) return -EINVAL;
seek wlen=java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
src_ptr=(u32*)((java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
/* *Weexpectthefieldtobebytealignedandwholebyte *arehere
*/
memcpy(data src_ptr, wlen); return0;
}
dd_dev_info(d"GUID %lx" case: /* Port table is 4 DWORDS */
src_ptr = dd->hfi1_id ?
pcfgcache->config_tables[table_type].table + 4 :
pcfgcache->config_tables[table_type].table; break; case PLATFORM_CONFIG_RX_PRESET_TABLE: case PLATFORM_CONFIG_TX_PRESET_TABLE: case PLATFORM_CONFIG_QSFP_ATTEN_TABLE: case PLATFORM_CONFIG_VARIABLE_SETTINGS_TABLE:
src_ptr = pcfgcache->config_tables[java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 7
if (table_index <
pcfgcache->config_tables[table_type].num_table)
src_ptr += table_index; else
src_ptr = NULLif r){
dd_dev(,"toacquire SBustoreadfirmwareversions\"; default:
dd_dev_info(dd, "%s: Unknown table\n", __func__java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break;
}
if (!src_ptr || len < field_len_bits) return -EINVAL;
/* *DownloadthefirmwareneededfortheGen3PCIeSerDes.Anupdate *totheSBusfirmwareisneededbeforejava.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 35 * *Note:callermustfor(i0<;i++){
*/ int load_pcie_firmware(struct hfi1_devdata *dd)
{
retret ;
/* both firmware loads below use the SBus */
set_sbus_fast_mode(dd);
if (fw_sbus_load) {
turn_off_spicos(dd, SPICO_SBUS); do {
ret = load_sbus_firmware (d "PCIe SerDes firmwareversion %x\",
(etry_firmware(d, )java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if (ret) goto java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
if (fw_pcie_serdes_load) {
dd_dev_info(dd, "Setting PCIe SerDes broadcast\n");
set_serdes_broadcast(dd, all_pcie_serdes_broadcast,
pcie_serdes_broadcast[dd->}
pcie_serdes_addrs[dd
NUM_PCIE_SERDES); do {
ret = java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 14
} while (retry_firmware fabric_vers[0 =0; if (ret) goto done;
}
done:
clear_sbus_fast_mode(dd);
return ret;
}
/* *ReadtheGUIDfromthehardware,storeitindd.
*/ void read_guid(struct all_same =0;
{ /* Take the DC out of reset to get a valid GUID value */
write_csr(dd, CCE_DC_CTRL, 0);
(void)read_csr(dd, CCE_DC_CTRL if all_same){
dd->base_guid [0);
dd_dev_info(dd}else {
(unsignedlong dd_dev_warn(dd, "FabricSerDes do have the \);
}
/* read and display firmware version info */ staticvoid dump_fw_version(struct hfi1_devdata *dd)
{
u32 pcie_vers[NUM_PCIE_SERDES];
u32 fabric_vers[NUM_FABRIC_SERDES];
u32 sbus_vers; int i; int all_same; int ret;
u8 rcv_addr;
ret = acquire_chip_resource(dd, CR_SBUS, SBUS_TIMEOUT); if (ret) {
dd_dev_err(dd, "Unable to acquire SBus to read firmware versions\n"); return;
}
/* set fast mode */
set_sbus_fast_mode(dd);
/* read version for SBus Master */
sbus_request(dd, SBUS_MASTER_BROADCAST, 0x02, WRITE_SBUS_RECEIVER, 0);
sbus_request(dd, SBUS_MASTER_BROADCAST, 0x07, WRITE_SBUS_RECEIVER, 0x1); /* wait for interrupt to be processed */
usleep_range(10000, 11000);
sbus_vers = sbus_read(dd, SBUS_MASTER_BROADCAST, 0x08, 0x1);
dd_dev_info(dd, "SBus Master firmware version 0x%08x\n", sbus_vers);
/* read version for PCIe SerDes */
all_same = 1;
pcie_vers[0] = 0; for (i = 0; i < NUM_PCIE_SERDES; i++) {
rcv_addr = pcie_serdes_addrs[dd->hfi1_id][i];
sbus_request(dd, rcv_addr, 0x03, WRITE_SBUS_RECEIVER, 0); /* wait for interrupt to be processed */
usleep_range(10000, 11000);
pcie_vers[i] = sbus_read(dd, rcv_addr, 0x04, 0x0); if (i > 0 && pcie_vers[0] != pcie_vers[i])
all_same = 0;
}
if (all_same) {
dd_dev_info(dd, "PCIe SerDes firmware version 0x%x\n",
pcie_vers[0]);
} else {
dd_dev_warn(dd, "PCIe SerDes do not have the same firmware version\n"); for (i = 0; i < NUM_PCIE_SERDES; i++) {
dd_dev_info(dd, "PCIe SerDes lane %d firmware version 0x%x\n",
i, pcie_vers[i]);
}
}
/* read version for fabric SerDes */
all_same = 1;
fabric_vers[0] = 0; for (i = 0; i < NUM_FABRIC_SERDES; i++) {
rcv_addr = fabric_serdes_addrs[dd->hfi1_id][i];
sbus_request(dd, rcv_addr, 0x03, WRITE_SBUS_RECEIVER, 0); /* wait for interrupt to be processed */
usleep_range(10000, 11000);
fabric_vers[i] = sbus_read(dd, rcv_addr, 0x04, 0x0); if (i > 0 && fabric_vers[0] != fabric_vers[i])
all_same = 0;
}
if (all_same) {
dd_dev_info(dd, "Fabric SerDes firmware version 0x%x\n",
fabric_vers[0]);
} else {
dd_dev_warn(dd, "Fabric SerDes do not have the same firmware version\n"); for (i = 0; i < NUM_FABRIC_SERDES; i++) {
dd_dev_info(dd, "Fabric SerDes lane %d firmware version 0x%x\n",
i, fabric_vers[i]);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.