Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
Iterating the SPPCRD structures (per chip data) is a fairly common
operation in the HDAT parser. Iterating the tuples directly is somewhat
irritating since we need to check for disabled chips, etc on every pass.
A better way to handle this is to iterate throught he xscom nodes
(generated from the SPPCRD data) and map from the xscom node to the
originating structure. This patch adds a function to do that.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
Largely a relic of back when we had multiple entry points into OPAL depending
on which mechanism on an FSP we were using to get loaded, this isn't needed
on modern P9 as we only have one entry point (we don't do the PHYP LID hack).
Fixes: https://github.com/open-power/skiboot/issues/82
Reported-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fixes: 2512953c7c6dc3b479d159d9bce8206219951164
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Create the VAS xscom node in hdata and use that when initializing VAS.
Suggested-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
90% of what we print isn't useful to a normal user. This
dramatically reduces the amount of messages printed by
OPAL in normal circumstances.
We still need to add a way to bump the log level at boot
based on a BMC scratch register or some HDAT property.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
The nest mmu will only get initialised by opal_nmmu_set_ptcr() if the
appropriate device-tree entries exist. Add them during hdata parsing.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Acked-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
This moves the parsing of the BMC and LPC details to the start of the
HDAT parsing. This allows us to enable the Skiboot log console earlier
so we can get debug output while parsing the rest of the HDAT.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The IPLPARAMs lacking serial ports isn't an error. Since it
never happened on FSP machine and it's not used on BMC ones
there is no need to print a message at all
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fixes: 0d81bda68f2b7adcecf268522ab9149b91115739
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The address mapping for multiple chips is different
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Memory interleaving scope under PCIA strcture is deprecated on P9.
Also I don't see anyone in OPAL/kernel using this property.
Hence remove this property from P9 DT.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Latest spec added vendor information to IPL PARAMS ntuple.
Grab this information when available instead of hardcoding
vendor name.
Also move vendor property code from vpd.c to iplparms parsing
function in spira.c.
Suggested-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>
|
|
ISAv3 added the STOP instruction to act as a front end to the various
power saving modes. The exact function of the stop instruction is
implementation dependent and the firmware must advertise which "stop
levels" are supported.
This patch adds the required HDAT parsing and exports the
"ibm,enabled-stop-levels" devicetree node for use inside of skiboot.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Adds the XIVE node under each chip's XSCOM controller node.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add p9 compatible property for various nodes.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[oohall@gmail.com: remove ibm,power9-nx compat]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
A few places (mostly old code) were using:
add_property_cells(hi32(number), lo32(number));
This patch converts them to use the helper rather than doing it manually.
Signed-off-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>
|
|
Add PSI HB XSCOM address. SCOM address and length is taken from
p9 example dts (doc/device-tree/examples/power9-phb4.dts).
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Host services ntuple is deprecated on P9.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-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>
|
|
nest-frquency -> nest-frequency
Fixes: 5cda6f6d (platforms/firenze: Fix I2C clock source frequency)
CC: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This is created seperately when parsing the hdat and when expanding the
DT. There is no real reason for this and it makes more sense to create
it in the main init path.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
master_cpu is used to determine the ChipTOD master if no ChipTOD
information is available in the HDAT. However, it is set to zero at every
skiboot entry point (fdt_entry, the 0x180 FSP entry and
opal_boot_trampoline) and is otherwise unused. This patch removes this
passing around and uses the boot CPU PIR to find the ChipTOD master rather
than zero.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We have core information under /cpus node and processor chip VPD data
(like SN, LN, etc) under /vpd directory. Presently we don't have any
property to relate cores and chip information. This patch adds chip-id
information for processor chip nodes under vpd.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We make parse_hdat() return success/failure rather than assert.
This allows the hdata_to_dt binary to gracefully error out rather
than assert, which is useful when throwing it at a fuzzer.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
hdata/spira.c:757:14: warning: restricted beint32_t degrades to integer
hdata/spira.c:773:14: warning: restricted beint32_t degrades to integer
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
That way user space tools can identify the change in VPD layout etc.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
Unfortunately we do not have single place to get all LED related
information (Some of the information is passed via HDAT and rest
via MBOX command).
Lets create led node before parsing HDAT and use this node to
populate all LED related information.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It only exposed one function that is local to the hdat stuff
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It's certainly not an error that we have a serial port, and not
essential to display during boot. Odds are, you already know
about the serial port.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We can, by default, deal with just two lines rather than 5 of
ASCII art
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Commit e810dcbc (ATTN: Set up attention area to handle attention) broke
tests, as the familiy of CPU_TO_BEXX macros are not compile time constant.
hdata/test/../spira.c:60:4: error: initializer element is not constant
.addr = CPU_TO_BE64((unsigned long)&(cpu_ctl_spat_area) + SKIBOOT_BASE)
There is no test coverage of this code, so for now we can comment out
these areas in order to allow the tests to pass.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
- Better function naming
- Better macro naming
- Re-ordered function variables
- calculate max_mdst_entry after allocating memory
for mdst table.
No change in functionality.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|