aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-17skiboot-5.6.0-rc1 release notesskiboot-5.6.0-rc1Stewart Smith1-0/+502
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16hdata_to_dt: Output up to PR_DEBUGOliver O'Halloran1-4/+4
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>
2017-05-16hdata: Add no-op stub functionsOliver O'Halloran1-2/+8
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>
2017-05-16hdata: Don't use printfOliver O'Halloran2-3/+4
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>
2017-05-16hdata: Respect OCC and HOMER resevationsOliver O'Halloran1-6/+0
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>
2017-05-16core/mem_region: Print a useful error on overlapOliver O'Halloran1-1/+28
New memory regions need to be either fully contained by an existing region or completely disjoint. Right now we just fail silently or crash with an assert which is less than helpful. Printing some basic information, such as the names of the overlapping regions is helpful. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16core/test: Test pre-init memory reservationsOliver O'Halloran1-6/+9
Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16mem_region: Add reserved regions after memory initOliver O'Halloran1-7/+30
When a new memory region is added (e.g for memory reserved by firmware) the list of existing memory regions is iterated through and a cut-out is made in any existing region that overlaps with the new one. Prior to the HDAT reservations being made the region init process was always: 1) Create regions from the memory@<addr> DT nodes. (mostly large) 2) Create reserved regions from the device-tree. (mostly small) When adding new regions we have assume that the new region will only every intersect with at most one existing region, which it will split. Adding reservations inside the HDAT parser breaks this because when adding the memory@<addr> node regions we can potentially overlap with multiple reserved regions. This patch fixes this by maintaining a seperate list of memory reservations and delaying merging them until after the normal memory init has finished, similar to how DT reservations are handled. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16phys map: Add tests for holes in MMIO region and orderMichael Neuling1-1/+27
This adds a couple of tests to ensure that there are no holes in the map for MMIO mappings and the map is sorted by start address. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16phys map: Remove hole in NPU sectionMichael Neuling1-10/+10
When we first added the map, we accidentally left a hole after the NPU PHY regs region. Fix this hole. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16phys map: Add missing NPU user regs regionMichael Neuling2-0/+2
We don't use this region currrently but we should add for completeness. Signed-off-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>
2017-05-12Remove multiple logging for un-handled fsp sub commands.ppaidipe@linux.vnet.ibm.com1-1/+0
If any new or unknown command need to be handled, just log un-hnadled message from only fsp, not required from fsp-dpo. cat /sys/firmware/opal/msglog | grep -i ,3 [ 110.232114723,3] FSP: fsp_trigger_reset() entry [ 188.431793837,3] FSP #0: Link down, starting R&R [ 464.109239162,3] FSP #0: Got XUP with no pending message ! [ 466.340598554,3] FSP-DPO: Unknown command 0xce0900 [ 466.340600126,3] FSP: Unhandled message ce0900 Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-12GCC7: fixes for -Wimplicit-fallthrough expected regexesStewart Smith3-3/+5
It turns out GCC7 adds a useful warning and does fancy things like parsing your comments to work out that you intended to do the fallthrough. There's a few places where we don't match the regex. Fix them, as it's harmless to do so. Found by building on Fedora Rawhide in Travis. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-12travis: stop allowing fedora24 and fedora25 to failStewart Smith1-2/+0
They've been really reliable for a while now, so let's switch to not ignoring any failures there (when introduced, there were some problems with the fedora mirrors that could cause spurious failures) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-12phb4: Add an option for disabling EEH MMIO in nvramRussell Currey1-3/+8
Having the option to disable EEH for MMIO without rebuilding skiboot could be useful for testing, so check for pci-eeh-mmio=disabled in nvram. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-12hdata/i2c: avoid possible int32_t overflowStewart Smith1-1/+1
We're safe up until engine number 524288. Found by static analysis Fixes: ae4e50eb35695 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-12tpm_i2c_nuvoton: fix use-after-free in tpm_register_chip failure pathStewart Smith1-1/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10test/hdata_to_dt: fix build breakage caused by phys_map_getStewart Smith1-0/+3
Fixes: 5f67c1e253788691d376e4e639d4a6e7785efa55 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10phb4: Cleanup BAR inits and loggingMichael Neuling1-57/+20
We always assign BARs in phb4, so this removes the unnecessary force assign logic. This patch also cleanup the logging to make it less verbose. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10phb4: Increase 64bit MMIO BAR size from 128GB to 256GBMichael Neuling1-7/+7
Primarily for GPUs which may have large MMIO space for frame buffers. This shuffles the memory map around a bit and starts using the 2TB region. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10lpc: Migrate BAR assignment to phys_map_get()Michael Neuling1-4/+3
Keeps existing address. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10xive: Migrate BAR assignment to phys_map_get()Michael Neuling1-30/+15
Keeps existing addresses. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10phb4: Migrate BAR assignment to phys_map_get()Michael Neuling2-21/+9
Keeps existing addresses. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10nx: Migrate P9 RNG BAR assignment to phys_map_get()Michael Neuling1-4/+2
Keeps existing address. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10Add tests for physical memory mapMichael Neuling3-0/+179
This adds a bunch of tests to the physical memory map infrastructure. It checks for overlaps and alignment.. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10Add global physical memory mapMichael Neuling4-0/+267
This adds a global map for allocating physical memory address. This centralises physical memory space allocations into one location rather than spread through, PHB, XIVE, NX etc. This adds a new call phys_map_get() which takes a chip, type and index and returns a address and size for the region to be used. An error in a call to this function crashes skiboot. This is done since bogus calls here are going to be hit by developers not users and they need to be fixed. Currently only P9 is implemented but other chips should be easy to add. On P9 BARs are generally set by skiboot. On P8 this was done by hostboot so this is not needed there. This just adds the infrastructure. User (PHB4, XIVE etc) will be migrated in subsequent patches. Suggested-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>
2017-05-10phb4: Enforce root complex config space size of 2048Michael Neuling2-2/+8
The root complex config space size on PHB4 is 2048. This patch sets that size and enforces it when trying to read/write the config space in the root complex. Without this someone reading the config space via /sysfs in linux will cause an EEH on the PHB. If too high, reads returns 1s and writes are silently dropped. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10core/pci.c: Don't reserve PCI slots for non-pluggable slotsAlistair Popple1-6/+9
If a downstream PCIe link is down we currently reserve a number of busses for hot pluggable devices. However we do not need to do this when we know a slot is not hotplug capable. Signed-off-by: Alistair Popple <alistair@popple.id.au> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10pore: Always use libporeOliver O'Halloran4-39/+2
In the days of yore libpore was closed source and people wanted the option to not use it. That's no longer the case so lets ditch all the #ifdef crap. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10hdata/test: Fix proc_gen when testingOliver O'Halloran3-62/+70
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>
2017-05-10npu2: Do not attempt to initialise non DD1 hardwareAlistair Popple1-0/+7
There are significant changes to hardware register addresses and meanings on newer chip revisions making them unlikely to work correctly with the existing code. Better to fail clearly and early. Suggested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10npu2: Fix BAR mapping for multiple chipsAlistair Popple3-113/+149
NPU2 BARs were being assigned and tracked with a global static array. This worked fine when there was only a single chip/NPU2 in the system however multiple chips results in the a shared data structure for BAR management which results in multiple chips getting assigned the same BAR addresses and other incorrect sharing of BAR properties. This patch splits the static and dynamic BAR configuration and stores the dynamic configuration in the per-NPU2 data structure. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10npu2: Fix argument order to npu2_scom_write in BAR setupAlistair Popple1-1/+1
The arguments to npu2_scom_write() in npu2_write_bar() resulting in incorrect BAR setup in some circumstances. This patch swaps the arguments so they are correct. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10FSP: Notify FSP of Platform Log ID after Host Initiated Reset ReloadStewart Smith6-33/+83
Trigging a Host Initiated Reset (when the host detects the FSP has gone out to lunch and should be rebooted), would cause "Unknown Command" messages to appear in the OPAL log. This patch implements those messages How to trigger FSP RR(HIR): $ putmemproc 300000f8 0x00000000deadbeef s1 k0:n0:s0:p00 ecmd_ppc putmemproc 300000f8 0x00000000deadbeef Log showing unknown command: / # cat /sys/firmware/opal/msglog | grep -i ,3 [ 110.232114723,3] FSP: fsp_trigger_reset() entry [ 188.431793837,3] FSP #0: Link down, starting R&R [ 464.109239162,3] FSP #0: Got XUP with no pending message ! [ 466.340598554,3] FSP-DPO: Unknown command 0xce0900 [ 466.340600126,3] FSP: Unhandled message ce0900 The message we need to handle is "Get PLID after host initiated FipS reset/reload". When the FSP comes back from HIR, it asks "hey, so, which error log explains why you rebooted me?". So, we tell it. Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-08head.S: store LR rather than CTR when trying to store LRStewart Smith1-1/+1
Long existing typo of r5 rather than r6, meaning we were storing CTR instead of LR. Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-08libstb/create-container: Fix coverity warningsDave Heller1-1/+2
Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-08phb4: Fix slot presence detectMichael Neuling1-0/+2
phb4_get_presence_state() needs to set *val to indicate the presence of something in the slot. Currently it doesn't set *val at all. The existing logic is correct, so this patch just sets val in the right places. This has the nice side effect of improving boot times since we no longer waste time tring to train links that don't have anything present. Signed-off-by: Michael Neuling <mikey@neuling.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-08head.S: store all of LR and CTROliver O'Halloran1-2/+2
When saving the CTR and LR registers the skiboot exception handlers use the 'stw' instruction which only saves the lower 32 bits of the register. Given these are both 64 bit registers this leads to some strange register dumps, for example: *********************************************** Unexpected exception 200 ! SRR0 : 0000000030016968 SRR1 : 9000000000201000 HSRR0: 0000000000000180 HSRR1: 9000000000001000 LR : 3003438830823f50 CTR : 3003438800000018 CFAR : 00000000300168fc CR : 40004208 XER: 00000000 In this dump the upper 32 bits of LR and CTR are actually stack gunk which obscures the underlying issue. 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>
2017-05-05README: Update build instructionsOliver O'Halloran1-15/+29
Add some more explicit instructions about how to install and use cross compilers. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: Add dependencies from our CI Dockerfiles] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03hdata: indicate when booted with elevated risk levelOliver O'Halloran2-0/+6
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>
2017-05-03nx: Cleanup init message for P9 RNGMichael Neuling1-1/+1
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03npu, npu2: Describe diag data size in device treeRussell Currey2-0/+2
NPU and NPU2 don't use diag data, but the kernel will allocate a buffer for NPU PHBs regardless. Set ibm,phb-diag-data-size to 0 for NPU PHBs to save a whole precious 8K. Signed-off-by: Russell Currey <ruscur@russell.cc> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03xive: Workaround a problem with indirect TM accessBenjamin Herrenschmidt1-0/+10
A HW issue can cause accesses to the content of the indirect data area to pass the actual selection of the target thread. The workaround is to read the PC_TCTXT_INDIR0 register back before accessing the data area. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03mambo: Fix reserved-ranges nodeOliver O'Halloran1-0/+4
The DT bindings for the /reserved-memory node requires that it: a) Has #size-cells equal to the root b) Has #address-cells equal to the root c) Has an empty ranges property (i.e directly maps on the root) Currently we do not assign any of these when generating the Mambo device tree which causes the booted kernel to ignore the reservations in the /reserved-memory node. Fixes: b7b5302af737 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03hdata: Make FSPv1 work againOliver O'Halloran1-0/+1
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>
2017-05-03Skiboot 5.4.4 release notesStewart Smith1-0/+76
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 1853c665f40fefd0f8629b89d2631f4653c6831a) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-02Documentation minor updates prior to OpenPOWER Foundation PDF generation.Jeff Scheel4-11/+19
Signed-off-by: Jeff Scheel <scheel@us.ibm.com> [stewart@linux.vnet.ibm.com: fix TODO item, capitalization] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-01gcov: fix typo preventing libc coverage reportStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-01xive: Log more information in opal_xive_dump() for emulation stateBenjamin Herrenschmidt1-4/+27
Add a counter of total interrupts taken by a CPU, dump the queue buffer both before and after the current pointer, and also display the HW state of the queue descriptor and the PQ state of the IPI. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-01xive: Add a per-cpu logging mechanism to XICS emulationBenjamin Herrenschmidt1-1/+104
This is a small 32-entries rolling buffer that logs a few operations. It's useful to debug odd problems. The output is printed when opal_xive_dump() is called. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>