Age | Commit message (Collapse) | Author | Files | Lines |
|
When new chip types are added, phys_map_init() will need to know which
memory map it should use.
Instead of directly checking PVR, make it an argument to the function,
so that 'make hw-check' can test all the maps.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Use Software Package Data Exchange (SPDX) to indicate license for each
file that is unique to skiboot.
At the same time, ensure the (C) who and years are correct.
See https://spdx.org/
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: Added a few missing files]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
hdata/spira.c:625:33: warning: incorrect type in argument 1 (different base types)
hdata/spira.c:625:33: expected restricted beint32_t [usertype] be_val
hdata/spira.c:625:33: got unsigned char [usertype] fir_bit
hdata/spira.c:625:33: warning: incorrect type in argument 1 (different base types)
hdata/spira.c:625:33: expected restricted beint32_t [usertype] be_val
hdata/spira.c:625:33: got unsigned char [usertype] fir_bit
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
hdata/fsp.c:271:9: warning: incorrect type in argument 1 (different base types)
hdata/fsp.c:271:9: expected restricted beint32_t [usertype] be_val
hdata/fsp.c:271:9: got unsigned char const [usertype] uart_int_number
hdata/fsp.c:271:9: warning: incorrect type in argument 1 (different base types)
hdata/fsp.c:271:9: expected restricted beint32_t [usertype] be_val
hdata/fsp.c:271:9: got unsigned char const [usertype] uart_int_number
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
It's been a good long while since either OPAL POWER7 user touched a
machine, and even longer since they'd have been okay using an old
version rather than tracking master.
There's also been no testing of OPAL on POWER7 systems for an awfully
long time, so it's pretty safe to assume that it's very much bitrotted.
It also saves a whole 14kb of xz compressed payload space.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Enthusiasticly-Acked-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
P8 and P9 use the same IO VPD setup, so we need to load the IOHUB VPD on
P9 systems too.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Tested-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[stewart: fixup op920 hdat_to_dt dts expected result, remove incorrect
comment, skip IOVPD loading on non-FSP.]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
It's probably about time we did that.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[stewart: add in dts result]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
The linux,sml-base property stores a raw pointer into the HDAT area.
When running the hdat parser tester the load address of the HDAT will
change each time the tool is run so we need to sanatise the property
to get consistent output.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Enable a new PVR to get us running on another p9 variant.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
In dtc v1.4.5 to at least v1.4.7 there have been a few bugs introduced
that change the layout of what's produced in the dts. In order to be
immune from them, we should use the (provided) dtdiff utility, but we
also need to run the dts we're diffing against through a dtb cycle in
order to ensure we get the same format as what the hdat_to_dt to dts
conversion will.
This fixes a bunch of unit test failures on the version of dtc shipped
with recent Linux distros such as Fedora 29.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Fixes: 06808a037d44231ba36e814ff1dbf66bc8b707da
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Add a job scheduling API which will run the job on the requested
chip_id (or return failure).
Includes test harness fixes from Stewart.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
On OpenPower system, VPD keyword size tells us the maximum size of the data.
But they fill trailing end with space (0x20) instead of NULL. Also spec
doesn't stop user to have space (0x20) within actual data.
This patch discards trailing spaces before populating device tree.
Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[stewart: fixup make check]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
hdata/test/stubs.c:112:11: error: ‘lock_caller’ alias between functions of incompatible types ‘void(void)’ and ‘_Bool(void)’ [-Werror=attribute-alias]
NOOP_STUB(lock_caller);
^~~~~~~~~~~
We fix it by giving the correct prototype to our stub
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Also fixes hdat_to_dt test cases.
Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Save us a few headaches in the future.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Rather than having a wart in main_cpu_entry() that initialises the mambo
console, we can move it into init_chips() which is where we discover that we're
on mambo.
This also means we don't need to check the quirk again, and has the added bonus
that an assert in chip initialisation (which follows immediately) will actually
produce output.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
[stewart@linux.vnet.ibm.com: fix make check by adding no-op stub]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently memory reservations are parsed, but since they are not
processed until mem_region_init() they don't appear in the output
device tree blob. Several bugs have been found with memory reservations
so we want them to be part of the test output.
Add them and clean up several usages of printf() since we want only the
dtb to appear in standard out.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
Add a new type of memory reservation that indicates a memory region is
only used by hardware and should not be touched by software. This is
needed for the in-memory tracing buffers. These reservations have the
"no-map" property which indicates that the host kernel should not setup
any virtual address mappings that cover this range, unless of course a
device driver does so explicitly.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently all existing reservations are made by hostboot itself or on
behalf of some other part of system firmware (e.g. the OCCs). We want
to add a "true" hardware reservation type that should not be touched
by the host OS. To prepare for that this patch renames the existing
reservation type to refect it's actual usage.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
A lot of stuff that is useful for debugging and general sanity checking
of the HDAT parser is only printed at PR_DEBUG. Bump up the log level
for hdata_to_dt so that more of this is output by default. The actual
test cases only look at the DTS output so there's no harm in being
verbose.
Clean up the space indentation while we're here.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
These are useful for side-stepping various HW specific functions.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fixes: 5f67c1e253788691d376e4e639d4a6e7785efa55
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In the hdata_to_dt test application the PVR override flags do not
correctly set proc_gen. This causes some butchering of the compatible
strings and some XSCOM addresses.
Signed-off-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>
|
|
Lets add model-name property for OpenPower system as well.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In P8, for few FRU's we hardcoded description table (I don't call
the reason behind this). Hence on newers system, for most devices
description propetry under /vpd contains "Unknown".
Hence lets read description from vpd blob.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Update the tests for the new VPD properties.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently these aren't sufficently obnoxious, so make them more so. HDAT
parse errors usually mean we won't be able to generate enough of a
device-tree to boot so we want to make this much more obvious.
Suggested-by: Michael Neuling <mikey@neuling.org>
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>
|
|
Current tests cases are just P8E chips, so specify that.
An exercise for the reader is to grab POWER7 and POWER9 dumps.
[Minor fixups for the blob patch - Oliver]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Gets rid of the non-dts test cases.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
convert test cases to diff DTS rather than DTB.
This means we also have to build dtc on CentOS 7 to be able to run
the test suite.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
[oohall@gmail.com moved the test cases into seperate patches]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add the DTS version of the output files.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Adds a post-processing step the hdata_to_dt test program that replaces
large "blobs" in the device tree with a <0xcafebeef, length, checksum>
u32 tuple.
The actual contents of these blobs are mostly irrelevant. We only care
that they are a) present in the device tree and b) aren't silently
corrupted by the HDAT parser. Outputting a checksum instead of the full
blob is sufficent for testing the parser.
This reduces the size of the test case output considerably so hopefully
we stop crashing everyone's mail client whenever the tests are changed.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|