| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Only use devicetree model if there was one.
Fixes: CID 144258
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>
|
|
|
|
|
|
|
| |
Fixes: CID 141080
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>
|
|
|
|
|
|
|
|
|
| |
Work around a bug in the I2C devices array that shows the
array version as being v2 when only the v1 data is populated.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[stewart@linux.vnet.ibm.com: only parse V2 as V1, still pass on >v2]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Presently we do not have a way to map sensor to chip id. Hence we are
always passing chip id 0 for occ_reset request (see occ_sensor_id_to_chip()).
This patch adds chip-id property to sensors (whenever its available) so that
we can map occ sensor to chip-id and pass valid chip-id to occ_reset request.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
For PCIe GEN4, DD2 uses only 1 byte per PCIe lane for the lane-eq
settings (DD1 uses 2 bytes).
This fixes the HDAT parsing to cope with this.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
Same as the default but with TM off.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This splits out is_power9n() so it can be used elsewhere. It also
adds a check for for POWER9 so the function does more of what it's
name suggests (and so the caller doesn't need to do it).
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@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>
|
|
|
|
|
|
|
| |
We should be checking the array version, not the HDIF header version.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
Missed a few.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lane-eq data we get from hdat is all 7s but what we end up in the
device tree is:
xscom@603fc00000000/pbcq@4010c00/stack@0/ibm,lane-eq
00000000 31c339e0 00000000 0000000c
00000000 00000000 00000000 00000000
00000000 31c30000 77777777 77777777
77777777 77777777 77777777 77777777
This fixes grabbing the properties from hdat and fixes the call to put
them in the device tree.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
It's legitimate to just add model-name to the device tree if we have
one, which is what the hdata logic tries to do, but subtley fails
in one of the code paths.
Found by static analysis
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>
|
|
|
|
|
|
|
|
|
|
| |
If the model property doesn't contain a known model number
that we can translate into a name, assume it's already a name,
stop warning and don't create an extraneous 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>
|
|
|
|
|
|
|
|
|
|
|
| |
The workarounds for P9 DD1 are only needed for Nimbus. P9 Cumulus will
be DD1 but don't need these same workarounds.
This patch ensures the P9 DD1 workarounds only apply to Nimbus. It
also renames some things to make clear what's what.
Signed-off-by: Michael Neuling <mikey@neuling.org>
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we pass in a proc_chip structure to phys_map_get(). All we we
really need from this structure is the Global Chip ID (GCID). This
patch reworks the function so that we only need to pass the GCID which
allows us to use it before the proc_chip structures have been
initialised (i.e in the HDAT parser).
Cc: Michael Neuling <mikey@neuling.org>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-By: Michael Neuling <mikey@neuling.org>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The HDAT has a notion of "chip ID" which is an arbitrary numbering of
chips. This numbering isn't useful outside of the HDAT so we refer to
chips uing their Global Chip ID (GCID). Currently we're using the HDAT
chip ID in a few places and this patch fixes them.
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>
|
|
|
|
|
|
|
|
| |
Some fields just aren't populated on some systems.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hostboot should name any and all memory reservations that it provides.
Currently some hostboots export a broken reservation covering the first
256MB of memory and this causes the system to crash at boot due to an
invalid free because this overlaps with the static "ibm,os-reserve"
region (which covers the first 768MB of memory).
According to the hostboot team unnamed reservations are invalid and can
be ignored.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this is not populated on FSP machines which causes some
obnoxious errors to appear in the boot log. We also only want to
parse version 1 of this structure since future versions will completely
change the array item format.
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[stewart@linux.vnet.ibm.com: return -1 on error rather than 1]
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>
|
|
|
|
|
|
|
|
|
| |
Using printf() here results in the output going into the stdout stream
when running the hdata_to_dt test. This results in an invalid dtb output
so lets not do that.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the past we've ignored these since Hostboot insisted in exporting
broken reservations and the OCC was not being used yet. This situation
seems to have resolved itself so we should respect the reservations that
hostboot provides.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Tested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Tested-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
We're safe up until engine number 524288.
Found by static analysis
Fixes: ae4e50eb35695
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
| |
Fixes: 5f67c1e253788691d376e4e639d4a6e7785efa55
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
Keeps existing address. No functional change.
Signed-off-by: Michael Neuling <mikey@neuling.org>
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
One less thing to work around for those crazy enough to try.
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clock-frequency of the i2c master should be derived from
the xscom bus frequency (itself derived from the nest frequency).
The bus-frequency of the i2c bus should be in Hz so convert the
HDAT value from kHz to Hz.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some older revisions of hostboot populate the host i2c device fields
with all zero entires. Detect and ignore these so we don't crash on
boot.
Without this we get:
[ 151.251240444,3] DT: dt_attach_root failed, duplicate unknown@0
[ 151.251300274,3] ***********************************************
[ 151.251339330,3] Unexpected exception 200 !
[ 151.251363654,3] SRR0 : 0000000030090c28 SRR1 : 9000000000201000
[ 151.251409207,3] HSRR0: 0000000000000010 HSRR1: 9000000000001000
[ 151.251444114,3] LR : 30034018300c5ab0 CTR : 30034018300a343c
[ 151.251478314,3] CFAR : 0000000030024804
[ 151.251500346,3] CR : 40004208 XER: 00000000
<snip GPRS>
[ 151.252083372,0] Aborting!
CPU 0034 Backtrace:
S: 0000000031cd36a0 R: 000000003001364c .backtrace+0x2c
S: 0000000031cd3730 R: 0000000030018db8 ._abort+0x4c
S: 0000000031cd37b0 R: 0000000030025c6c .exception_entry+0x114
S: 0000000031cd3840 R: 0000000000001f00 * +0x1f00
S: 0000000031cd3a10 R: 0000000031cd3ab0 *
S: 0000000031cd3aa0 R: 00000000300248b8 .new_property+0x90
S: 0000000031cd3b30 R: 0000000030024b50 .__dt_add_property_cells+0x30
S: 0000000031cd3bd0 R: 000000003009abec .parse_i2c_devs+0x350
S: 0000000031cd3cf0 R: 0000000030093ffc .parse_hdat+0x11e4
S: 0000000031cd3e30 R: 00000000300144c8 .main_cpu_entry+0x138
S: 0000000031cd3f00 R: 0000000030002648 boot_entry+0x198
(Modified: removed backtrace() call and added in backtrace to commit)
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The hostboot reserved ranges are [start, end] pairs rather than
[start, end) so we need to stick a +1 in there to calculate the
size properly.
Signed-off-by: Oliver O'Halloran <oohall@gmail.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>
|