aboutsummaryrefslogtreecommitdiff
path: root/hdata
AgeCommit message (Collapse)AuthorFilesLines
2018-04-30hdata: Add 'primary' property to master chip xscom nodeVasant Hegde2-1/+5
Needed for SBE communication as some of the SBE MBOX commands has to be sent to SBE on master chip only. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-30hdat_to_dt: hash_prop the same on all platformsStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-24hdata/i2c: Fix up pci hotplug labelsOliver O'Halloran1-2/+2
These labels are used on the devices used to do PCIe slot power control for implementing PCIe hotplug. I'm not sure how they ended up as "eeprom-pgood" and "eeprom-controller" since that doesn't make any sense. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-24hdata/i2c: Ignore multi-port I2C devicesOliver O'Halloran1-4/+13
Recent FSP firmware builds add support for multi-port I2C devices such as the GPIO expanders used for the presence detect of OpenCAPI devices and the PCIe hotplug controllers used to power cycle PCIe slots on ZZ. The OpenCAPI driver inside of skiboot currently uses a platform-specific method to talk to the relevant I2C device rather than relying on HDAT since not all platforms correctly report the I2C devices (hello Zaius). Additionally the nature of multi-port devices require that we a device specific handler so that we generate the correct DT bindings. Currently we don't and there is no immediate need for this support so just ignore the multi-port devices for now. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-24hdata/i2c: Replace i2c_ prefix with dev_Oliver O'Halloran1-8/+8
The current naming scheme makes it easy to conflate "i2cm_port" and "i2c_port." The latter is used to describe multi-port I2C devices such as GPIO expanders and multi-channel PCIe hotplug controllers. Rename i2c_port to dev_port to make the two a bit more distinct. Also rename i2c_addr to dev_addr for consistency. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-24hdata/i2c: Ignore CFAM I2C masterOliver O'Halloran1-0/+10
Recent FSP firmware builds put in information about the CFAM I2C master in addition the to host I2C masters accessible via XSCOM. Odds are this information should not be there since there's no handshaking between the FSP/BMC and the host over who controls that I2C master, but it is so we need to deal with it. This patch adds filtering to the HDAT parser so it ignores the CFAM I2C master. Without this it will create a bogus i2cm@<addr> which migh cause issues. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-23hdata/slots: Apply slot label to the parent slotOliver O'Halloran2-2/+22
Slot names only really make sense when applied to an actual slot rather than a device. On witherspoon the GPU devices have a name associated with the device rather than the slot for the GPUs. Add a hack that moves the slot label to the parent slot rather than on the device itself. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-23hdata/tpmrel: detect tpm not present by looking up the stinfo->statusClaudio Carvalho1-0/+8
Skiboot detects if tpm is present by checking if a secureboot_tpm_info entry exists. However, if a tpm is not present, hostboot also creates a secureboot_tpm_info entry. In this case, hostboot creates an empty entry, but setting the field tpm_status to TPM_NOT_PRESENT. This detects if tpm is not present by looking up the stinfo->status. This fixes the "TPMREL: TPM node not found for chip_id=0 (HB bug)" issue, reproduced when skiboot is running on a system that has no tpm. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-23hdata: Add DIMM actual speed to device treeVasant Hegde1-1/+8
Recent HDAT provides DIMM actuall speed. Lets add this to device tree. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart: use Hz rather than Mhz, consistent with other properties] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-23hdata: Fix DIMM size propertyVasant Hegde3-36/+17
Today we parse vpd blob to get DIMM size information. This is limited to FSP based system. HDAT provides DIMM size value. Lets use that to populate device tree. So that we can get size information on BMC based system as well. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> CC: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-11hdata/spira: parse vpd to add part-number and serial-number to xscom@ nodeStewart Smith3-1/+15
Expected by FWTS and associates our processor with the part/serial number, which is obviously a good thing for one's own sanity. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-11hdata: Move 'HRMOR_BIT' macro to header fileVasant Hegde3-5/+8
Its already defined twice. And soon I want to use in few other place. Lets move it to header file. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-04-10hdat/i2c.c: quieten "v2 found, parsing as v1"Stewart Smith1-2/+18
Suggested-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-02-28build: use thin archives rather than incremental linkingNicholas Piggin1-1/+1
This changes to build system to use thin archives rather than incremental linking for built-in.o, similar to recent change to Linux. built-in.o is renamed to built-in.a, and is created as a thin archive with no index, for speed and size. All built-in.a are aggregated into a skiboot.tmp.a which is a thin archive built with an index, making it suitable or linking. This is input into the final link. The advantags of build size and linker code placement flexibility are not as great with skiboot as a bigger project like Linux, but it's a conceptually better way to build, and is more compatible with link time optimisation in toolchains which might be interesting for skiboot particularly for size reductions. Size of build tree before this patch is 34.4MB, afterwards 23.1MB. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-20hdata/iohub: Use only wildcard slots for pluggablesOliver O'Halloran1-1/+1
We don't want to cause a VID:DID check against pluggable devices, as they may use multiple devids. Narrow the condition under which VID:DID is listed in the dt, so that we'll end up creating a wildcard slot for these instead. Cc: stable # 5.9.x Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30hdata/vpd: Add vendor propertyVasant Hegde1-0/+5
ibm,vpd blob contains VN field. Use that to populate vendor property for various FRU's. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30hdata/vpd: Remove possible dereference after null check (CID 207468)Cyril Bur1-1/+1
The next_extry label doesn't do anything other than perform an addition which requires a dereference of the NULL entry variable, just continue the loop instead. Fixes: 77190aa7 (hdata/vpd: Rework vpd node creation logic) Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-14hdata/vpd: Fix DTC warningsOliver O'Halloran3-0/+207
All the nodes under the vpd heirachy have a unit address (their SLCA index) but no reg properties. Add them and their size/address cells to squash the warnings. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-14hdat/i2c: Fix SPD EEPROM compatible stringOliver O'Halloran1-1/+16
Hostboot doesn't give us accurate information about the DIMM SPD devices. Hack around by assuming any EEPROM we find on the SPD I2C master is an SPD eeprom. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-14hdata/i2c: Fix 512Kb EEPROM sizeOliver O'Halloran1-1/+1
There's no such thing as a 412Kb EEPROM. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-05hdata: Parse IPL FW feature settingsOliver O'Halloran2-0/+54
Add parsing for the firmware feature flags in the HDAT. This indicates the settings of various parameters which are set at IPL time by firmware. Cc: stable # 5.4.x 371e88e23662 eeba2d64fb7a 0abc3af7e8f6 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-20lock: Add additional lock auditing codeBenjamin Herrenschmidt1-1/+1
Keep track of lock owner name and replace lock_depth counter with a per-cpu list of locks held by the cpu. This allows us to print the actual locks held in case we hit the (in)famous message about opal_pollers being run with a lock held. It also allows us to warn (and drop them) if locks are still held when returning to the OS or completing a scheduled job. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> [stewart: fix unit tests] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata/tpmrel.c: add ibm, cvc device tree nodeClaudio Carvalho2-0/+119
In P9, the Container Verification Code is stored in a hostboot reserved memory and the list of provided CVC services is stored in the TPMREL_IDATA_HASH_VERIF_OFFSETS idata array. Each CVC service has an offset and version. This adds the ibm,cvc device tree node and its documentation. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata/tpmrel.c: add firmware event log info to the tpm nodeClaudio Carvalho6-1/+156
This parses the firmware event log information from the secureboot_tpm_info HDAT structure and add it to the tpm device tree node. There can be multiple secureboot_tpm_info entries with each entry corresponding to a master processor that has a tpm device, however, multiple tpm is not supported. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata/spira: add ibm, secureboot node in P9Claudio Carvalho2-6/+48
In P9, skiboot builds the device tree from the HDAT. These are the "ibm,secureboot" node changes compared to P8: - The Container-Verification-Code (CVC), a.k.a. ROM code, is no longer stored in a secure ROM with static address. In P9, it is stored in a hostboot reserved memory and each service provided also has a version, not only an offset. - The hash-algo property is not provided via HDAT, instead it provides the hw-key-hash-size, which is indeed the information required by the CVC to verify containers. This parses the iplparams_sysparams HDAT structure and creates the "ibm,secureboot", which is bumped to "ibm,secureboot-v2". In "ibm,secureboot-v2": - hash-algo property is superseded by hw-key-hash-size. - container verification code is explicitly described by a child node. Added in a subsequent patch. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata: add secure and trusted boot ntuple to SPIRA-H/SClaudio Carvalho2-3/+5
This adds to spira-h/s the overall tpmrel structure, which defines secure and trusted boot related data. The internal data structures are added in subsequent patches. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata: Parse SPD dataVasant Hegde1-1/+49
Parse SPD data and populate device tree. list of properites parsing from SPD: ----------------------------------- [root@ltc-wspoon dimm@d00f]# lsprop . memory-id 0000000c (12) <-- DIMM type product-version 00000032 (50) <-- Module Revision Code device_type "memory-dimm-ddr4" serial-number 15d9acb6 (366587062) status "okay" size 00004000 (16384) phandle 000000bd (189) ibm,loc-code "UOPWR.0000000-Node0-DIMM7" part-number "36ASF2G72PZ-2G6B2 " reg 0000d007 (53255) name "dimm" manufacturer-id 0000802c (32812) <-- Vendor ID, we can get vendor name from this ID Also update documentation. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18hdata: Add memory hierarchy under xscom nodeVasant Hegde4-20/+146
We have memory to chip mapping but doesn't have complete memory hierarchy. This patch adds memory hierarchy under xscom node. This is specific to P9 system as these hierarchy may change between processor generation. It uses memory controller ID details and populates nodes like: xscom@<addr>/mcbist@<mcbist_id>/mcs@<mcs_id>/mca@<mca_id>/dimm@<resource_id> Also this patch adds few properties under dimm node. Finally make sure xscom nodes created before calling memory_parse(). Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-18make check: Make valgrind optionalMichael Ellerman1-1/+1
To (slightly) lower the barrier for contributions, we can make valgrind optional with just a small amount of plumbing. This allows make check to run successfully without valgrind. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-13hdata: Add location code property to xscom nodeVasant Hegde3-0/+11
This patch adds chip location code property to xscom node. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-11hdata/spira: Add missing newline to prlog() callReza Arbab1-1/+1
We're missing a \n here. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-19hdata/vpd: add support for parsing CPU VRML recordsRobert Lippert1-0/+24
Allows skiboot to parse out the processor part/serial numbers on OpenPOWER P9 machines. Change-Id: Ie22a3c50d32f480671334b4b6c820476e29301c9 Signed-off-by: Robert Lippert <rlippert@google.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-15hdata: Fix copying GEN4 lane equalisation settingsMichael Neuling1-0/+2
These aren't copied currently but should be. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-09hdata: Rename 'fsp-ipl-side' as 'sp-ipl-side'Vasant Hegde1-3/+9
.. as OPAL is building device tree for both FSP and BMC system. Also I don't see anyone using this property today. Hence renaming should be fine. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-16hdata/vpd: Improve vpd node find logicVasant Hegde1-14/+2
Use dt_find_by_name_addr() instead of dt_find_by_name(). That way we can avoid unnecessary memory allocation/cleanup. CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-16hdata/vpd: Rework vpd node creation logicVasant Hegde5-399/+363
Presently we traverse SLCA structure to create various FRU nodes under /vpd node. We assumed that children are always contiguous. It happened to be contiguous in P8 and worked fine, but failed in P9 system. So it ended up populating duplicate node under wrong parent. Also failed to populate some of the nodes. Unfortunately there is no way to reach all the children of a given parent from parent node :-( Hence we have to rework vpd creation logic. This patch goes through all the SLCA entries serially and creates vpd node. Assumptions: - SLCA index is always serial (0..n) - When we traverse serially parent entry comes before child - Redundant resources are always consecutive - Populate node if SLCA has 'installed' and 'VPD collected' bit set CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-15hdata/i2c: update the list of known i2c devsClaudio Carvalho1-4/+33
This updates the list of known i2c devices - as of HDAT spec v10.5e - so that they can be properly identified during the hdat parsing. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohal@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-15hdata/i2c: log unknown i2c devicesClaudio Carvalho1-4/+17
An i2c device is unknown if either the i2c device list is outdated or the device is marked as unknown (0xFF) in the hdat. This log both cases. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-15hdata/i2c: add __packed to the host_i2c_hdr structureClaudio Carvalho1-1/+1
This adds __packed to the host_i2c_hdr structure since it defines an offset that refers to the beginning of the structure. Fixes: 41dc3eb4495c451a405974570f604622a3f829ef Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-10hdat: Disable TM on Power9 DD 2.1Michael Ellerman1-1/+1
Update pa_features_p9[] to disable TM (Transactional Memory). On DD 2.1 TM is not usable by Linux without other workarounds, so skiboot must disable it. The presence of TM is communicated by setting bit 7 of byte 22 in the pa-features array. As no other bits are set in that byte, we currently have a value of 0x80. To disable TM we set bit 7 to 0, leaving a value of 0x0. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-10hdata/iohub: Check IOHUB child count before usingVasant Hegde1-1/+4
..else we endup getting below calltrace in older system. [ 169.179598388,3] HDIF: child array idx out of range! CPU 085c Backtrace: S: 0000000033d739b0 R: 00000000300136e8 .backtrace+0x40 S: 0000000033d73a50 R: 00000000300a1510 .HDIF_child_arr+0x34 S: 0000000033d73ac0 R: 00000000300a47a8 .io_parse+0x708 S: 0000000033d73c80 R: 000000003009f4ec .parse_hdat+0x177c S: 0000000033d73e30 R: 0000000030014750 .main_cpu_entry+0x148 S: 0000000033d73f00 R: 0000000030002690 boot_entry+0x198 Fixes: ad484081 (hdata: Parse IOSLOT information) CC: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-02hdata: Fix sparse warning in add_ecid_data()Vasant Hegde1-1/+1
warning: hdata/spira.c:433:33: warning: restricted beint64_t degrades to integer Reported-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-02hdata/i2c: hdat_i2c_labels and hdat_i2c_devs should be staticStewart Smith1-2/+2
Silences sparse warnings: hdata/i2c.c:103:23: warning: symbol 'hdat_i2c_labels' was not declared. Should it be static? hdata/i2c.c:93:22: warning: symbol 'hdat_i2c_devs' was not declared. Should it be static? Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-02hdata/spira: silence 'so big is unsigned long' sparse warningsStewart Smith1-2/+2
hdata/spira.c:1401:17: warning: constant 0x8000000009010c3f is so big it is unsigned long hdata/spira.c:1401:17: warning: constant 0x800000000c010c3f is so big it is unsigned long hdata/spira.c:1401:17: warning: constant 0x8000000009010c3f is so big it is unsigned long hdata/spira.c:1401:17: warning: constant 0x800000000c010c3f is so big it is unsigned long Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-02hdata/spira: be32_to_cpu() doesn't work on 8bitsStewart Smith1-1/+1
Sparse warning: hdata/spira.c:1458:41: warning: incorrect type in argument 1 (different base types) expected restricted beint32_t [usertype] be_val got unsigned char const [unsigned] [usertype] link_speed Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-20core: POWER9 implement OPAL_SIGNAL_SYSTEM_RESETNicholas Piggin2-14/+15
This implements OPAL_SIGNAL_SYSTEM_RESET, using scom registers to quiesce the target thread and raise a system reset exception on it. It has been tested on DD2 with stop0 ESL=0 and ESL=1 shallow power saving modes. DD1 is not implemented because it is sufficiently different as to make support difficult. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart@linux.vnet.ibm.com: fixup hdat_to_dt test] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-20hdata/smplink: Increment index of associated PHBOliver O'Halloran1-1/+1
The PHB number of the NPU device needs to be incremented per-chip or bad things are going to occur. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: Reza found npu_index++ needed too] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-20hdat: logically dead code, assert insteadStewart Smith1-2/+1
Since we already assert that base != NULL, the if() condition on hdif can never be NULL. Instead, we should just assert (if even that) if it is. Found by Coverity Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19hdata: Add wafer-location propertyVasant Hegde1-0/+4
Extract wafer-location from ECID and add property under xscom node. bits 64:71 are the chip x location (7:0) bits 72:79 are the chip y location (7:0) Sample output: ------------- [root@wsp xscom@623fc00000000]# lsprop ecid ecid 019a00d4 03100718 852c0000 00fd7911 [root@wsp xscom@623fc00000000]# lsprop wafer-location wafer-location 00000085 0000002c Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19hdata: Add wafer-id propertyVasant Hegde1-0/+25
Wafer id is derived from ECID data. bits 4:63 are the wafer id ( ten 6 bit fields each containing a code) Sample output: ------------- [root@wsp xscom@623fc00000000]# lsprop ecid ecid 019a00d4 03100718 852c0000 00fd7911 [root@wsp xscom@623fc00000000]# lsprop wafer-id wafer-id "6Q0DG340SO" Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>