aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-29hdata: Update MPIPL support IPL parameterVasant Hegde1-1/+1
We used bit 4 of `sys_attributes` attribute for MPIPL supported flag. Unfortunately we forgot to update HDAT spec. Now bit 4 is used for different purpose. Hence use bit 5 for MPIPL. Fortunately we don't have any released firmware with MPIPL supported yet. Hence its safe to make this change. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29Makefile: Search for distro-provided cross-compilerThiago Jung Bauermann1-0/+8
Search for different variations of cross-compiler prefixes that might be in the PATH, in this order of preference: 1. powerpc64-linux-gcc 2. powerpc64le-linux-gcc 3. powerpc64-linux-gnu-gcc 4. powerpc64le-linux-gnu-gcc The latter two are available as distro packages in at least Debian, Fedora and Ubuntu. Tested with GNU Make 3.82 (CentOS 7) and GNU make 4.2.1 (Fedora 30). Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Tested-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29hw/npu2-opencapi: Support multiple LPC devicesAndrew Donnellan3-24/+47
Currently, we only have a single range for LPC memory per chip, and we only allow a single device to use that range. With upcoming Hostboot/SBE changes, we'll use the chip address extension mask to give us multiple ranges by using the masked bits of the group ID. Each device can now allocate a whole 4TB non-mirrored region. We still don't do >4TB ranges. If the extension mask is not set correctly, we'll fall back to only permitting one device and printing an error suggesting a firmware upgrade. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29npu3: Register virtual PHBs with static IDsFrederic Barrat3-2/+14
Assigning opal IDs to virtual PHBs dynamically may lead to userland seeing the PCI domain ID for an adapter vary when adding or removing another adapter (GPU or opencapi). This patch switches to using static opal IDs for virtual PHBs, based on their ibm,phb-index property, which was made static by a previous patch. Note that the PCI domain IDs will increase on the second chip (or more, if we had more) because we now reserve 16 IDs per chip for PHBs. This affects Axone only. We don't change anything on P9 and npu2, to avoid altering how domain IDs have been shown on already GA'd platforms. Reviewed-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29npu2, npu3: Remove ibm, phb-index property from the NPU dt nodeFrederic Barrat7-14/+2
The 'ibm,phb-index' property of the NPU node is now useless, as we can have multiple PHBs associated to the same NPU on P9. Let's remove it to avoid confusion. Reviewed-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29npu3: Don't use the device tree to assign the phb-index of the PHBFrederic Barrat2-1/+7
On Axone, there's a 1-to-1 mapping between virtual PHBs and NPUs. We could keep assigning the phb-index of the virtual PHB from the value found in the npu node of the device tree, but to be consistent with P9/npu2 and avoid confusion, this patch assigns the phb-index when the virtual PHB is created, based on the npu index, similarly to what we do on P9. Reviewed-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-29npu2: Rework phb-index assignments for virtual PHBsFrederic Barrat4-3/+22
Until now, opencapi PHBs were not using the 'ibm,phb-index' property, as it was thought unnecessary. For nvlink, a phb-index was associated to the npu when parsing hdat data, and the nvlink PHB was reusing the same value. It turns out it helps to have the 'ibm,phb-index' property for opencapi PHBs after all. Otherwise it can lead to wrong results on platforms like mihawk when trying to match entries in the slot table. We end up with an opencapi device inheriting wrong properties in the device tree, because match_slot_phb_entry() default to phb-index 0 if it cannot find the property. Though it doesn't seem to cause any harm, it's wrong and a future patch is expected to start using the slot table for opencapi, so it needs fixing. The twist is that with opencapi, we can have multiple virtual PHBs for a single NPU on P9. There's one PHB per (opencapi) brick. Therefore there's no 1-to-1 mapping between the NPU and PHB index and it no longer makes sense to associate a phb-index to a npu. With this patch, opencapi PHBs created under a NPU use a fixed mapping for their phb-index, based on the brick index. The range of possible values is 7 to 12. Because there can only be one nvlink PHB per NPU, it is always using a phb-index of 7. A side effect is that 2 virtual PHBs on 2 different chips can have the same phb-index, which is similar to what happens for 'real' PCI PHBs, but is different from what was happening on a nvlink-only witherspoon so far. Reviewed-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-01-20skiboot v6.0.21 release notesVasant Hegde1-0/+15
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2019-12-16README.md: Add information on docsOliver O'Halloran2-1/+27
Add a link to the auto-generated github pages documentation and add instructions for how to build them using Sphinx and some references on reStructuredText. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/imc: Fix sphinx warningOliver O'Halloran1-1/+3
Using a normal :: block results in "WARNING: Unexpected indentation." I don't know why, but replacing it with a plain-text code block cures it. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Fix some errors in platforms-and-cpusOliver O'Halloran1-9/+23
Apollo was a P7 platform, not P8, and we don't support P7 any more. VESNIN is a P8 platform. Garrison uses the P8NVL chip, few other minor mistakes. There's stilll a bunch of systems missing from here, but eh. I also added a note about P7 support being dropped. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Remove bonus CONTRIBUTING.md from the indexOliver O'Halloran1-1/+0
This is already included under the "Development Process" and this causes a warning because there's no doc/CONTRIBUTING.md. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Use parallel buildsOliver O'Halloran1-1/+1
Using all your cores makes re-building the documentation a significantly faster. It'd be even faster if sphinx would stop assuming every single .rst file changes between builds, but casual googling didn't reveal a fix so -EEFFORT. Might be a bug in Sphinx 1.8.3 which Fedora is shipping. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Add VAS stuff into the treeOliver O'Halloran3-0/+5
It was AWOL. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/device-tree: Add secvar bindings to the toctreeOliver O'Halloran1-1/+3
There's no real point in having a seperate subdir. Move it down a level and rename it to secvar.rst so Sphinx picks it up automatically. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/opal-api: Remove ref to OPAL_HMI_FLAGS_TOD_TB_FAILOliver O'Halloran1-1/+1
A definition for this flag is provided below in a code block. It's not an OPAL call so there's no ref to it and we get a warning. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/dt: Fix memory-heirachy blockOliver O'Halloran1-13/+15
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/opal-api: Remove spurious indentOliver O'Halloran1-1/+1
Sphinx whines. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Fix block in 6.3.2 release notesOliver O'Halloran1-6/+5
Squash another warning Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Remove duplicate OPAL_ELOG_WRITE labelOliver O'Halloran1-2/+0
This was never implemented and it's documented in the "Future calls" section. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/sbe: Fix block indentationOliver O'Halloran1-3/+5
Squash some warnings. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Fix code blocks in v6.3.3 release notesOliver O'Halloran1-3/+6
Sphinx seems to choke if there's an additional indentation in a :: block. e.g.: :: one two three four It'll complain about the indentation changing at three. A ".. code-block:: text" block doesn't seem to have this problem so use that instead. Also note that you need a blank line between the code-block and the start of the actual code block. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16skiboot v6.3.3 release notesVasant Hegde1-0/+73
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [oliver: cherry picked into master, better late than never] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/secvar: Fix indentation warningsOliver O'Halloran1-15/+15
Sphinx complains about the following line not being indented to the same starting point as the lines above. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/mpipl: Fix warningsOliver O'Halloran1-12/+13
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc/secvar: Fix table markupOliver O'Halloran1-7/+7
Where the table grid intersect there needs to be a '+' rather than a '|' Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16doc: Add skiboot-5.2.0 refOliver O'Halloran1-0/+2
Fixes a few missing ref warnings Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16i2c: fix dereference beyond the end of bufferNicholas Piggin1-2/+10
Print the contents of the buffer as an array of bytes in hex, which avoids endian issues and reading beyond the end of the buffer. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16fix simple sparse warningsNicholas Piggin14-19/+20
Should be no real code change, these mostly update type declarations that sparse complains about. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16add more sparse endian annotationsNicholas Piggin18-41/+45
This fixes quite a few sparse endian annotations across the tree. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16dt: assorted cleanupsNicholas Piggin7-49/+39
This replaces several instances dt accesses with higher level primitives throughout the tree. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16add little endian supportNicholas Piggin8-44/+135
This adds support for building LE skiboot with LITTLE_ENDIAN=1. This is not complete, notably PHB3, NPU* and *CAPI*, but it is sufficient to build and boot on mambo and OpenPOWER POWER9 systems. LE/ELFv2 is a nicer calling convention, and results in smaller image and less stack usage. It also follows the rest of the Linux/OpenPOWER stack moving to LE. The OPALv3 call interface still requires an ugly transition through BE for compatibility, but that is all handled on the OPAL side. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16sfc-ctrl: endian conversionsNicholas Piggin1-10/+9
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16opal-dump: MPIPL endan conversionsNicholas Piggin2-48/+56
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16prd: endian conversionsNicholas Piggin1-32/+32
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16libflash: ecc endian conversionsNicholas Piggin2-20/+24
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16pel: endian conversionNicholas Piggin2-73/+75
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16errorlog: endian conversionNicholas Piggin3-17/+24
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16fsp: endian conversionsNicholas Piggin32-359/+431
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16sbe-p9: endian conversionNicholas Piggin1-1/+1
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16ipmi: endian conversionNicholas Piggin1-1/+1
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16debug descriptor: make endian-cleanNicholas Piggin4-35/+41
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16memconsole: make endian-cleanNicholas Piggin4-27/+27
Convert memconsole dt construction and in-memory tables to use explicit endian conversions. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16occ sensors: make endian-cleanNicholas Piggin3-93/+103
Convert occ sensors dt construction and in-memory hardware tables to use explicit endian conversions. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16phb4: make endian-cleanNicholas Piggin2-167/+177
Convert phb4 dt construction and in-memory hardware tables to use explicit endian conversions. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16xive: make endian-cleanNicholas Piggin4-211/+257
Convert xive opal calls, dt construction, and in-memory hardware tables to use explicit endian conversions. Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16cvc: allow BE cvc code to be called from LE contextNicholas Piggin3-30/+30
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16hmi: endian conversionsNicholas Piggin1-10/+10
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16io: endian conversions for io accessorsNicholas Piggin4-29/+121
This requires a small change to flash drivers which assumed 4-byte LPC reads would not change endian. _raw accessors could be added if this becomes a signifcant pattern, but for now this hack works. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-16naca: move naca definition from asm to CNicholas Piggin10-61/+99
This results in the same layout and location of the naca and hv data structures. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>