Age | Commit message (Collapse) | Author | Files | Lines |
|
The ibm,opal node is normally created by Skiboot either in the HDAT parser
or after the input FDT has been unflattened. However, in order to supply
the /ibm,opal/power-mgt/enabled-stop-states property FDT we to tolerate
/ibm,opal/ existing in the input tree.
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>
|
|
Commit 5ac71c9 ("pci: Avoid hot resets at boot time") missed to
avoid hot reset after fundamental reset for PCIe common slots.
This fixes it.
Cc: stable # 5.3.x
Reported-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently, skiboot can't see SRIOV VFs. It introduces some troubles
as I can see: The device initialization logic (phb->ops->device_init())
isn't applied to VFs, meaning we have to maintain same and duplicated
mechanism in kernel for VFs only. It introduces difficulty to code
maintaining and prone to lose sychronization.
This was motivated by bug reported by Carol: The VF's Max Payload
Size (MPS) isn't matched with PF's on Mellanox's adapter even kernel
tried to make them same. It's caused by readonly PCIECAP_EXP_DEVCTL
register on VFs. The skiboot would be best place to emulate this bits
to eliminate the gap as I can see.
This supports SRIOV VFs. When the PF's SRIOV capability is populated,
the number of maximal VFs (struct pci_device) are instanciated, but
but not usable yet. In the mean while, PCI config register filter is
registered against PCIECAP_SRIOV_CTRL_VFE to capture the event of
enabling or disabling VFs. The VFs are initialized, put into the PF's
children list (pd->children), populate its PCI capabilities, and
register PCI config register filter against PCICAP_EXP_DEVCTL. The
filter's handler caches what is written to MPS field and returns
the cached value on read, to eliminate the gap mentioned as above.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The PCI config register is applied before the HW register is changed.
It won't work when this mechanism is used to capture the change to
SRIOV capability in subsequent patch.
This moves the logic around so that the filter is applied after HW
register is changed. Currently, it's used to cache bridge's pref
window base/length. The code change shouldn't affect that. So no
functional changes introduced by this.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When we start to support SRIOV capability in subsequent patches,
a data struct will be instantiated and associated with the SRIOV
capability. This extends the current implementation for that.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently, AER capability is initialized in phb_ops->device_init()
which is called after the device is instantiated by PCI core, or
reinitializing the device after reset in EEH recovery path. It
means we are maintaining similar sets of codes for P7IOC, PHB3
and PHB4.
This moves the logic initializing AER capability from P7IOC, PHB3
and PHB4 to PCI core, thus the duplicated codes can be dropped.
No functional changes introduced by this.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The logic initializing device's PCIe capability is resident in the
function pci_scan_one() from day one. It's because information
(e.g. vendor/device IDs) aren't stored into PCI device instance in
old days. Now, the PCI device instance contains all information
required to initialize its PCIe capability and others.
This moves the logic initializing PCIe capability from pci_scan_one()
to separate functions, pci_init_capabilities() and pci_init_pcie_cap().
pci_scan_one() is simplified to make code maintaining a bit easier.
Also, it will allow us to intorduce separate functions to initialize other
capabilities as we're doing for PCIe capability.
This also exports pci_init_capabilities() so that it can be reused by
SRIOV VFs in future. No logical changes introduced by this.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
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>
|
|
Remove 'Support pnor "update" mode which only update selected partitions'
from TODO list as pflash supports --partition=part_name already
Signed-off-by: Werner Fischer <wfischer@thomas-krenn.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
On DD1, the LPC SerIRQ are latched to 1 in HW but never back to 0,
we need an explicit clear after running the handler. (Not before
as they are level interrupts, they will be latched again if they
are still pending).
For now we do that in lpc_dispatch_ser_irqs() but that only works
for interrupts routed to OPAL.
In order to support routing LPC interrutps to Linux, we need a custom
EOI handler that does the clearing of the latch before we do the
EOI in the ESB.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We support all the OPAL calls, and it avoids bugs in existing
Linux kernels that would otherwise crash when attempting to
access devices using a direct mapping.
When Linux is fixed it will recognize that direct mapping is
supported and avoid the OPAL calls.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This was broken on Rhesus. Also add an nvram way of
overriding the policy
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Bits[0-15] are used to indicate the supported STOP states in
"ibm,enabled-stop-levels" DT property and STOP0 is starting from
Bit0. This patch fixes the parsing to read the appropriate bits.
Fixes: c3ea33f173ec ("hw/slw: only enable supported STOP states")
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add an experimental option to do basic dead code and data elimintation
with -ffunction-sections/-fdata-sections/--gc-sections.
This saves about 80kB of text/data.
Also remove the use of of -ffunction-sections by default. This predates
git history, but I don't think there is a good reason to use it without
--gc-sections. The GCC manual says:
Only use these options when there are significant benefits from
doing so. When you specify these options, the assembler and linker
create larger object and executable files and are also slower. You
cannot use gprof on all systems if you specify this option, and you
may have problems with debugging if you specify both this option
and -g.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Provide an experimental option to compile using ELFv2 ABI even on big
endian builds. ELFv2 + BE is not officially supported by the toolchain,
but it works quite well. It may be useful as a small step toward a
little-endian build.
This saves about 200kB of text/data.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Adds a new -d <filename> command line option to the hdata_to_dt utility
to output a FDT blob. This lets us output the output DT in standard form
that can be handled by the usual tools such as dtc.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Handle the OSYS record on OPP machines in stead of VSYS
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.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>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fix some issues in the documentation.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We have an typo in a @fwts-advice field, which means it's carried
through to the generated fwts olog data. This change fixes the typo so
that the advice output from fwts is correct.
CC: Deb McLemore <debmc@linux.vnet.ibm.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fixes: 539487bae4b77
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
snprintf() with size of a pointer rather than the buffer to which we
were printing into
Found by static analysis.
Fixes: 690f9da985b5f40d4f87ff161d43fd6989f6495c
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
SCOM doesn't exist, we end up in a sad place (machine check)
Fixes: c9cadb4fe60d4d41fc45a35a1d2ae27e0632c679
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In case HostBoot leaves some gunk behind
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
To differentiate between 1.00, 1.01, 1.02 etc...
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
There is a theorical possibility that if we don't get any
pending interrupt in the queue in opal_xive_get_xirr() due
to a spurious notification we leave the CPPR elevated.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Just use the one we know is valid rather than what's passed as
an argument. Linux might call us with 0.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We were calculating the mask all wrong... we got lucky in the
normal case though.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
For the same reason as PHBs ... we need to move that to
a common module controlling the address map.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This BAR is used to force a core to send "local" commands when hitting
the TM area which has the same address on all chips.
There is one copy of this per core *pair*. The existing code only sets
it up on core 0 of a pair. However some systems have core 1 and not
core 0 ... oooops.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This helps debugging multi-chip problems
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
There are 4 snoopers, 0 and 3 are pretty busy, so let's use a mix
of 1 and 2 for the PHB and PSI notification ports. We do that by
using different cache line offsets. We use 1 for PHB0 which tends
to be the highest performance one and 2 for everybody else
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This bits saves the day if the special EX BARs happens to
be misconfigured. There is no drawback to having it always
set so let's do so.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
After a scrub, use a sync to order any load to the newly updated
memory.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Off by one on one bit
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
silences recent GCC warning
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
With addition of latest callback of check_all_slot_table found below
error message in habanero platform.
[ 17.069198739,3] PCI: built-in device not found: Network Mezz (loc: 10)
https://github.com/open-power/skiboot/issues/54
So PHB1 already having one Network Mezz(1,0) which is the only one there in the
habanero platform design layout. check_all_slot_table found the additional
Network Mezz(2,0) in slot table is in-correct. Fix this by removing it.
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Hopefully the values are all right ;-) A future TODO is to
use some nice macro to make it clearer who is what.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[stewart@linux.vnet.ibm.com: fake PVR_VERS_MAJ, use size_t]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from 5.4.x commit 5930a57455fc405cbed70d6bdd0c911175c84e6d)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
(cherry picked from 5.1.x commit fc479923ff2028c4efaa8d3e1a8a45c7c9f74e60)
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>
|