Age | Commit message (Collapse) | Author | Files | Lines |
|
skiboot only supports POWER8 > DD1 now, all supported platforms
should use the new SPIRA-S/H structure.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Denali is P10 system. But FSP interaction (MBOX protocol) is same as ZZ.
Hence add denali platform detection code inside zz.c for now. We can think
of adding separate platform later.
Also enable :
- P10 TCE mapping support
- Detect PHBs
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
HDAT spec added fields to define the equalization settings for PCI
Gen5 link. Format is the same as PCI Gen4, so we just need to add
extra fields in the "ibm,lane-eq" in the device tree.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Initial P10 support
- LPC : This contains two useful information:
LPC MCTP Memory Window Base Address
Second vUART console details
- Enable memory-buffer mmio
- Fix ipmi sensors
IPMI sensors are deprecated in P10. Hence do not parse ipmi sensors.
- I2C support
- Detect PHB5
- Create p10 xscom, xive, chiptod nodes
- Set pa-features bit for 2nd DAWR
Availability of 2nd DAWR depends on 0th bit of 64th byte of
ibm,pa-features property. Set it for p10.
Co-authored-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Co-authored-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Co-authored-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Co-authored-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
SPDX makes it a simpler diff.
I have audited the commit history of each file to ensure that they are
exclusively authored by IBM and thus we have the right to relicense.
The motivation behind this is twofold:
1) We want to enable experiments with coreboot, which is GPLv2 licensed
2) An upcoming firmware component wants to incorporate code from skiboot
and code from the Linux kernel, which is GPLv2 licensed.
I have gone through the IBM internal way of gaining approval for this.
The following files are not exclusively authored by IBM, so are *not*
included in this update (I will be seeking approval from contributors):
core/direct-controls.c
core/flash.c
core/pcie-slot.c
external/common/arch_flash_unknown.c
external/common/rules.mk
external/gard/Makefile
external/gard/rules.mk
external/opal-prd/Makefile
external/pflash/Makefile
external/xscom-utils/Makefile
hdata/vpd.c
hw/dts.c
hw/ipmi/ipmi-watchdog.c
hw/phb4.c
include/cpu.h
include/phb4.h
include/platform.h
libflash/libffs.c
libstb/mbedtls/sha512.c
libstb/mbedtls/sha512.h
platforms/astbmc/barreleye.c
platforms/astbmc/garrison.c
platforms/astbmc/mihawk.c
platforms/astbmc/nicole.c
platforms/astbmc/p8dnu.c
platforms/astbmc/p8dtu.c
platforms/astbmc/p9dsu.c
platforms/astbmc/vesnin.c
platforms/rhesus/ec/config.h
platforms/rhesus/ec/gpio.h
platforms/rhesus/gpio.c
platforms/rhesus/rhesus.c
platforms/astbmc/talos.c
platforms/astbmc/romulus.c
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: fixed up the drift]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
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>
|
|
In several cases the make test reference .dts files were incorrectly
byteswapped, these are fixed here too.
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>
|
|
The PEC / PHB mapping is the same on P9P / Axone as it is on Nimbus
add it to the HDAT parser so we get PCI.
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/iohub.c:723:22: warning: restricted beint16_t degrades to integer
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>
|
|
This is not a shipping product and is no longer supported by Linux
or other firmware components.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Caught by static analysis. The previous if() condition was ensuring lxr
was not null, so we don't need this additional check.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Whatever this was used for appears to pre-date the public release of
skiboot.
Found using scan-build.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Slot names only really make sense when applied to an actual slot rather
than a device. On witherspoon the GPU devices have a name associated with
the device rather than the slot for the GPUs. Add a hack that moves the
slot label to the parent slot rather than on the device itself.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
We don't want to cause a VID:DID check against pluggable devices, as
they may use multiple devids.
Narrow the condition under which VID:DID is listed in the dt, so that
we'll end up creating a wildcard slot for these instead.
Cc: stable # 5.9.x
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
These aren't copied currently but should be.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
..else we endup getting below calltrace in older system.
[ 169.179598388,3] HDIF: child array idx out of range!
CPU 085c Backtrace:
S: 0000000033d739b0 R: 00000000300136e8 .backtrace+0x40
S: 0000000033d73a50 R: 00000000300a1510 .HDIF_child_arr+0x34
S: 0000000033d73ac0 R: 00000000300a47a8 .io_parse+0x708
S: 0000000033d73c80 R: 000000003009f4ec .parse_hdat+0x177c
S: 0000000033d73e30 R: 0000000030014750 .main_cpu_entry+0x148
S: 0000000033d73f00 R: 0000000030002690 boot_entry+0x198
Fixes: ad484081 (hdata: Parse IOSLOT information)
CC: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
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>
|
|
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>
|
|
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>
|
|
which requires 8 byte alignment
UBSan caught this:
hdata/test/../iohub.c:83:2: runtime error: load of misaligned address 0x7f1dc7b0210a for type 'long unsigned int', which requires 8 byte alignment
0x7f1dc7b0210a: note: pointer points here
31 4c 58 08 31 00 04 01 00 30 00 42 50 46 02 00 00 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
#0 0x41470a in io_get_lx_info hdata/test/../iohub.c:83
#1 0x41759f in io_add_p8_cec_vpd hdata/test/../iohub.c:450
#2 0x417d35 in io_parse_fru hdata/test/../iohub.c:538
#3 0x41812a in io_parse hdata/test/../iohub.c:600
#4 0x425aa2 in parse_hdat hdata/test/../spira.c:1337
#5 0x43d9f8 in main hdata/test/hdata_to_dt.c:358
#6 0x7f1dcb868509 in __libc_start_main (/lib64/libc.so.6+0x20509)
#7 0x4019e9 in _start (/home/stewart/skiboot/hdata/test/hdata_to_dt+0x4019e9)
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>
|
|
Signed-off-by: Michael Neuling <mikey@neuling.org>
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Probably due to bad merge by me
Fixes: 0baf63f38757
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
We create our own inttypes.h to get the correct printf formatting for
64bit numbers.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
No generated code change due to skiboot being BE
hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer
hdata/iohub.c:209:16: warning: restricted beint32_t degrades to integer
hdata/iohub.c:356:19: warning: restricted beint32_t degrades to integer
hdata/iohub.c:490:19: warning: restricted beint32_t degrades to integer
hdata/iohub.c:536:21: warning: restricted beint64_t degrades to integer
hdata/iohub.c:554:9: warning: restricted beint32_t degrades to integer
hdata/iohub.c:554:9: warning: restricted beint32_t degrades to integer
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Since skiboot is all BE and hdat is BE, this changes nothing except for silencing
the sparse warnings
hdata/iohub.c:35:9: warning: incorrect type in initializer (different base types)
hdata/iohub.c:35:9: expected unsigned int
hdata/iohub.c:35:9: got restricted beint32_t const [usertype] buid_ext
hdata/iohub.c:36:9: warning: incorrect type in argument 1 (different base types)
hdata/iohub.c:36:9: expected unsigned int [unsigned] [usertype] proc_chip_id
hdata/iohub.c:36:9: got restricted beint32_t const [usertype] proc_chip_id
hdata/iohub.c:36:9: warning: incorrect type in argument 1 (different base types)
hdata/iohub.c:36:9: expected unsigned int [unsigned] [usertype] proc_chip_id
hdata/iohub.c:36:9: got restricted beint32_t const [usertype] proc_chip_id
hdata/iohub.c:38:9: warning: incorrect type in initializer (different base types)
hdata/iohub.c:38:9: expected unsigned int
hdata/iohub.c:38:9: got restricted beint32_t const [usertype] gx_index
hdata/iohub.c:39:9: warning: incorrect type in initializer (different base types)
hdata/iohub.c:39:9: expected unsigned int
hdata/iohub.c:39:9: got restricted beint32_t const [usertype] ec_level
hdata/iohub.c:114:63: warning: incorrect type in argument 1 (different base types)
hdata/iohub.c:114:63: expected unsigned short [unsigned] [usertype] slca_index
hdata/iohub.c:114:63: got restricted beint16_t const [usertype] slca_index
hdata/iohub.c:634:17: warning: incorrect type in argument 1 (different base types)
hdata/iohub.c:634:17: expected restricted beint32_t [usertype] be_val
hdata/iohub.c:634:17: got restricted beint16_t const [usertype] hub_num
hdata/iohub.c:708:22: warning: incorrect type in assignment (different base types)
hdata/iohub.c:708:22: expected unsigned int [unsigned] type
hdata/iohub.c:708:22: got restricted beint32_t const [usertype] card_type
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We're mostly PR_DEBUG here, except for the basics, which are PR_INFO.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|