summaryrefslogtreecommitdiffstats
path: root/hdata/spira.h
Commit message (Collapse)AuthorAgeFilesLines
* hdata/iohub: Fix Cumulus Hub ID numberOliver O'Halloran2018-09-131-1/+1
| | | | | | | It's wrong! Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Cleanup get_hb_reserved_memVasant Hegde2018-09-131-1/+2
| | | | | | | | | - Use macro for label size - Replace malloc with array 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>
* hdata: Add 'primary' property to master chip xscom nodeVasant Hegde2018-04-301-0/+1
| | | | | | | | 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>
* hdata: Move 'HRMOR_BIT' macro to header fileVasant Hegde2018-04-111-0/+6
| | | | | | | | 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>
* hdata: Parse IPL FW feature settingsOliver O'Halloran2018-01-051-0/+7
| | | | | | | | | | 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>
* hdata/tpmrel.c: add ibm, cvc device tree nodeClaudio Carvalho2017-12-181-0/+14
| | | | | | | | | | | | 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>
* hdata/tpmrel.c: add firmware event log info to the tpm nodeClaudio Carvalho2017-12-181-0/+33
| | | | | | | | | | | | | 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>
* hdata/spira: add ibm, secureboot node in P9Claudio Carvalho2017-12-181-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* hdata: add secure and trusted boot ntuple to SPIRA-H/SClaudio Carvalho2017-12-181-3/+4
| | | | | | | | | | | 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>
* hdata: Add ecid propertyVasant Hegde2017-09-191-1/+11
| | | | | | | | | | | | Add ecid property under xscom node. Sample output: ------------- [root@wsp xscom@623fc00000000]# lsprop ecid ecid 019a00d4 03100718 852c0000 00fd7911 Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Parse extra NVLink infoOliver O'Halloran2017-09-151-0/+3
| | | | | | | | Add parsing for the link speed information and the OCC GPU presence flags. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Parse NVLink informationOliver O'Halloran2017-09-151-0/+29
| | | | | | | | | Add the per-chip structures that descibe how the A-Bus/NVLink/OpenCAPI phy is configured. This generates the npu@xyz nodes for each chip on systems that support it. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Parse IOSLOT informationOliver O'Halloran2017-09-151-0/+88
| | | | | | | | | Add structure definitions that describe the physical PCIe topology of a system and parse them into the device-tree based PCIe slot description. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal: Extract sw checkstop fir address from HDAT.Mahesh Salgaonkar2017-08-221-0/+4
| | | | | | | | | | | | | | | | | | | Extract sw checkstop fir address info from HDAT and populate device tree node ibm,sw-checkstop-fir. This patch is required for OPAL_CEC_REBOOT2 OPAL call to work as expected on p9. With this patch a device property 'ibm,sw-checkstop-fir' is now properly populated: # lsprop ibm,sw-checkstop-fir ibm,sw-checkstop-fir 05012000 0000001f Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Tested-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/memory: Add memory reservations to the DTOliver O'Halloran2017-07-251-1/+4
| | | | | | | | | | | | | | | | Currently we just add these to a list of pre-boot reserved regions which is then converted into a the contents of the /reserved-memory/ node just before Skiboot jumps into the firmware kernel. This approach is insufficent because we need to add the ibm,prd-instance labels to the various hostboot reserved regions. To do this we want to create these resevation nodes inside the HDAT parser rather than having the mem_region flattening code handle it. On P8 systems Hostboot placed its memory reservations under the /ibm,hostboot/ node and this patch makes the HDAT parser do the same. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* HDAT: Add IPMI sensor data under /bmc nodeVasant Hegde2017-07-131-1/+23
| | | | | | | | | | Add IPMI sensor data under /bmc node. CC: Joel Stanley <joel@jms.id.au> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Tested-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Reserve Trace AreasOliver O'Halloran2017-05-261-0/+5
| | | | | | | | | When hostboot is configured to setup in memory tracing it will reserve some memory for use by the hardware tracing facility. We need to mark these areas as off limits to the operating system and firmware. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: indicate when booted with elevated risk levelOliver O'Halloran2017-05-031-0/+1
| | | | | | | | | | When the system is IPLed with an elevated risk level Hostboot will set a flag in the IPL parameters structure. Parse and export this in the device tree at: /ipl-params/sys-params/elevated-risk-level Cc: Adrian Barrera <abarrera@us.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: parse processor attached i2c devicesOliver O'Halloran2017-04-071-0/+2
| | | | | | | | Adds basic parsing for i2c devices that are attached to the processor I2C interfaces. This is mainly VPD SEEPROMs. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add __packed to all HDAT structures and workaround HB reserveBenjamin Herrenschmidt2017-03-091-12/+11
| | | | | | | | | | | | | | | | Some HDAT structures aren't properly aligned. We were using __packed on some but not others and got at least one wrong (HB reserve). This adds it everywhere to avoid such problems. However this then triggers another problem where HB gives us a crazy range (0.256M) to reserve with no label, which triggers an assertion failure later on in mem_regions.c. So also add a test to skip any region starting at 0 until we can undertand that better and have it fixed one way or another. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Add BMC device-tree node for P9 OpenPOWER systemsAnanth N Mavinakayanahalli2017-03-071-0/+1
| | | | | | | | | On P8 Hostboot creates the node. On P9, OPAL needs to create the node. BMC information available in HDAT's SPINFO section. Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: SPIRA-H/S changes for P9Vasant Hegde2017-01-161-5/+9
| | | | | | | | | | Add new ntuples to SPIRA-H/S structure. We have already switched to SPIRA-H/S from legacy SPIRA. Hence I've not made any update to legacy SPIRA structure. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add BMC and LPC IOPATH supportOliver O'Halloran2017-01-161-0/+35
| | | | | | | | | | BMC based systems use the LPC bus for communicating between the host and service processor. This is represented as a "SP IOPATH" in the HDAT and this patch adds parsing and generation of the devicetree entries to describe this. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: add new sppcrd_chip_info fieldsOliver O'Halloran2017-01-151-0/+13
| | | | | | | | | | | | A number of new fields have been defined over the last few HDAT versions that we have not used up until this point. This patch adds them to the structure. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: add 'possibly' around field that only maybe is in 0x20 of spec. Spotted by Vasant] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add support for PHB4Oliver O'Halloran2017-01-151-7/+21
| | | | | | | | | Adds support for parsing the PHB4 entries in the IOHUB array and populating the devicetree appropriately. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: s/DOUMO/DUOMO/, assert(), spotted by Vasant] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add new fields to IPL params structureVasant Hegde2017-01-151-1/+27
| | | | | | | | | | | | | | | | Add new fields to sys params structure and update sys family for p9. In P9 the compatible string is supplied by hostboot through the HDAT. This patch add support for using these strings to set the compatible property in the device tree rather than using the machine ID number scheme traditionally used in the HDAT. [removed ibm,firenze from, add some prints - Oliver] Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [Folded Oliver's changes to original patch - Vasant] Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: fixup test case] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add new fields to proc_init_data structureVasant Hegde2016-12-211-0/+2
| | | | | | | | Latest spec added two new fields to proc_init_data structure. I don't think we have to pass any data in these new fields. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix for typosFrederic Bonnard2016-06-201-5/+5
| | | | | | | | | While reviewing the Debian packaging, codespell found those. Most proposed fixes are based on codespell's default dictionnary. Signed-off-by: Frederic Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Enable SPIRA-HVasant Hegde2016-04-011-0/+2
| | | | | | | | | | | | | | Update the SPIRA-H pointer in the NACA so that the FSP can build and pass the SPIRA-S structure to OPAL instead of the legacy SPIRA. Older systems (which does not support SPIRA-H) ignores SPIRA-H pointer and continue to pass legacy SPIRA. "spira" is a global structure and referred everywhere inside hdata dir. Once we enable SPIRA-H we get data in SPIRA-S area, not in legacy spira. Hence fixup spira structure, so that we don't break building device tree. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Initialize SPIRA-H structureVasant Hegde2016-04-011-0/+2
| | | | | | | | | | | | Previous patch reduced reserved space in spira structure. Now its safe to reduce the memory for spira section from 2K to 1K. Create separate memory section with 1K size for SPIRA-H. Also initialize SPIRA-H. FSP makes use of this information to pass various boot time data (like SPIRA-S, etc) to host. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Define SPIRA-H and SPIRA-S structureVasant Hegde2016-04-011-0/+65
| | | | | | | | | | | | | | | | | | | | In latest firwmare the SPIRA is split into two portions, a hypervisor initialized and managed portion and a service processor (FSP) built portion, to accommodate secure boot. The hypervisor portion will be referred to as the SPIRA-H and the FSP portion referred to as the SPIRA-S. The legacy N-tuples that are no longer being used have been removed. N-tuples that are initialized by the hypervisor at compile/build time but not modified by the FSP reside in the SPIRA-H. All other N-tuples reside in the SPIRA-S that is built dynamically by the FSP at the beginning of that HDAT memory pointed to by the “Host Data Area” N-tuple in SPIRA-H. This patch defines new SPIRA-H and SPIRA-S structures. No functionality change. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Reduce reserved space in spira structureVasant Hegde2016-04-011-1/+7
| | | | | | | | | | | As per spec we reserve 0x4c0 in spira structure for future use. But spira is being deprecated and we will be using new SPIRAH/SPIRAS structure. Hence reduce reserved space in spira to 0xc0 so that we can use remaining 1K space for new SPIRAH structure. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: added comment as to why we reserve less] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* platforms/firenze: Fix I2C clock source frequencyGavin Shan2016-03-081-2/+6
| | | | | | | | | | | | | | | | The I2C master clock source frequency is hardcoded to wrong value. The correct frequency should be the nest clock frequency divided by 16 as Ben said. This fixes I2C master source frequency with the help of additional properties "nest-frequency" and "bus-frequency" to root and xscom device node separately. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: fixup hdata test for added property] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Drop support for p5ioc2Daniel Axtens2015-11-181-1/+0
| | | | | | | | | | | | | | | | | | | p5ioc2 is used by approximately 2 machines in the world, and has never ever been a supported configuration. Not only is the code virtually unused and very tricky to test, but keeping it around is making life unnecessarily difficult: - It's more complexity to manage for things such as PCI slot support - It's more code for static analysis to cover, which means more time fixing bugs that affect no-one. - It's bloating every single install of skiboot for no benefit. - It's reducing coverage stats, which is sad. Drop p5ioc2. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/hdata: Populate System Attention Indicator location codeVasant Hegde2015-05-071-0/+1
| | | | | | | | | | | | | | | | | On FSP based machine, FSP controls System Attention Indicator. This indicator detail (location code) is passed to OPAL via HDAT. OPAL can get/set this indicator via normal MBOX command. This patch takes care of parsing SLCA entry and populating device tree with SAI location code. Device Tree: We create '/ibm,opal/led' node which contains all location code LED information. 'led-types' property under each node tells LED type. For SAI indicator 'led-types' property will be 'attention'. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Detect LED mode and populate device treeVasant Hegde2015-05-071-0/+1
| | | | | | | | | | | | | | | | FSP based machine supports two different LED modes: - Light Path : Both identify and fault LEDs are supported - Guiding Light: Only identify LEDs are supported And this information is passed to OPAL via HDAT. Lets parse this and populate the device tree. Later LED driver uses this information to populate indivisual LED node. Device Tree property: /ibm,opal/led/led-mode : lightpath/guidinglight Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* vpd: Use slca parent-child relationship to create vpd treeNeelesh Gupta2015-02-111-0/+2
| | | | | | | | | | | | SLCA entries available through hdat have parent-child relationship of various FRUs of the system, the patch makes use of this data to create VPD nodes in hierarchial fashion. This is further useful for the user space tools like 'lshw'/'lsvpd' to plug-in the support easily on POWER. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* ATTN: Set up attention area to handle attentionAruna Balakrishnaiah2014-08-011-0/+32
| | | | | | | | | | | | | | | | | | | | | | At present CPU control area ntuple in SPIRA structure is NULL. ATTN component in Service Processor side checks for this field and if its empty, it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for all failure (assert call) from OPAL side. This makes difficult to debug the issue. Service processor provides attention area interface (FIPS PHyp Attentions spec), so that we can pass SRC and user data (error message) to service processor. This will helps us identify different failures in OPAL. This patch enables attention area and provides interface (update_sp_attn_area()) to add src and user data (error message) through assert macro. Attention SRC format: 1st byte - Opal src type 2-4 bytes - Holds the address of the assert function call Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-021-0/+864
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud