aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-28Don't warn on "long" OPAL_RESYNC_TIMEBASE callsStewart Smith1-1/+1
On P8 this is called when we exit fastsleep, and we shouldn't measure the "time" spent in the call for what (in retrospect) is an obvious reason. Fixes: 50ea35c2d07874755c03e6ae2bdf7a33ad2c768a Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-28libpore: Sync p8 files, remove erroneous "IBM Confidential"Stewart Smith8-28/+50
We also had some rogue "IBM Confidential" strings that we failed to remove with the original change of Copyright headers for open sourcing. Do this by synchronising with the hostboot copy of the code, which removed the Confidential string when their copyright headers changed for initial open sourcing of the code back in 2014. See hostboot commit 3bcf5b7982bb8a2d9227dbff7be4ff2ce5fec05c where the HWP copyright headers were updated. We likely missed this as we did a similar process inside the skiboot repository, but likely only on the (C) headers themselves. The libpore changes that we were missing *look* minor, but we need to throw some testing at them at least, as there *are* changes that we were missing. We also have to make a minor modification (being sent upstream) to avoid a compiler warning of always false comparison (<0 on unsigned int) Reported-by: Dawn Sylvia <ddzubak@us.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-27skiboot v6.0.14 release notesStewart Smith1-0/+50
Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit f4afd85a84ab090ddda7aea18c5153755777f103) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-26hdata/test: workaround dtc bugsStewart Smith2-4/+17
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>
2018-11-26platform/firenze: Fix branch-to-null crashOliver O'Halloran1-0/+1
When the bus alloc and free methods were removed we missed a case in the Firenze platform slot code that relied on the the bus-specific method to the bus pointer in the request structure. This results in a branch-to-null during boot and a crash. This patch fixes it by initialising it manually here. Fixes: 801462feb7d6 ("core/i2c: Remove bus specific alloc and free callbacks") Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-21libflash: Don't merge ECC-protected rangesSamuel Mendoza-Jonas2-41/+3
Libflash currently merges contiguous ECC-protected ranges, but doesn't check that the ECC bytes at the end of the first and start of the second range actually match sanely. More importantly, if blocklevel_read() is called with a position at the start of a partition that is contained somewhere within a region that has been merged it will update the position assuming ECC wasn't being accounted for. This results in the position being somewhere well after the actual start of the partition which is incorrect. For now, remove the code merging ranges. This means more ranges must be held and checked however it prevents incorrectly reading ECC-correct regions like below: [ 174.334119453,7] FLASH: CAPP partition has ECC [ 174.437349574,3] ECC: uncorrectable error: ffffffffffffffff ff [ 174.437426306,3] FLASH: failed to read the first 0x1000 from CAPP partition, rc 14 [ 174.439919343,3] CAPP: Error loading ucode lid. index=201d1 Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-21libflash: Restore blocklevel testsSamuel Mendoza-Jonas1-0/+5
This fell out in f58be46 "libflash/test: Rewrite Makefile.check to improve scalability". Add it back in as test-blocklevel. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-21Warn on long OPAL callsStewart Smith2-0/+10
Measure entry/exit time for OPAL calls and warn appropriately if the calls take too long (>100ms gets us a DEBUG log, > 1000ms gets us a warning). Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-19skiboot v6.2-rc1 release notesv6.2-rc1Stewart Smith1-0/+893
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-19ipmi: Reduce ipmi_queue_msg_sync() polling loop time to 10msStewart Smith1-1/+1
On a plain boot, this reduces the time spent in OPAL by ~170ms on p9dsu. This is due to hiomap (currently) using synchronous IPMI messages. It will also *significantly* reduce latency on runtime flash operations, as we'll spend typically 10-20ms in OPAL rather than 100-200ms. It's not an ideal solution to that, but it's a quick and obvious win for jitter. Cc: stable Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-19platform/witherspoon: Fix opencapi lane-mask used on GPU0Frederic Barrat1-3/+3
When an opencapi device is used via the Acorn adapter, the link used is connected to the "middle" group of lanes of the obus. We were using the wrong set of lanes. The link was somehow still training, likely because the default settings at power-on were good enough, but it's still wrong. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-19platform/witherspoon: Avoid harmless error messageFrederic Barrat1-0/+7
The I2C read to find out if a device on the GPU slot is an opencapi adapter or nvidia card is reporting an "arbitration loss" error if no device is connected on the GPU slot. That I2C read is actually useless if we already know there's no device connected, so let's skip it. It will avoid logging an harmless error. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-18Add the other 7 ATSD registers to the device tree.Rashmica Gupta2-5/+12
Suggested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-14skiboot v6.0.13 release notesStewart Smith1-0/+22
Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit e550528a74af7e632c359cd29e4ba295743bdb84) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08hiomap: quieten warning on failing to move a windowStewart Smith1-1/+1
This isn't *necessarily* an error that we should complain loudly about. If, for example, the BMC enforces the Read Only flag on a FFS partition, opening a write window *should* fail, and we do indeed test this in op-test. Thus we deal with the error in a well known path: returning an error code and then it's eventually a userspace problem. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08gcov: link in ctors* as newer GCC doesn't group them allStewart Smith1-1/+1
It seems that newer toolchains get us multiple ctors sections to link in rather than just one. If we discard them (as we were doing), then we don't have a working gcov build (and we get the "doesn't look sane" warning on boot). So, include ctors* and all is well. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libstb: Pass a tpm_dev to tpm_i2c_request_send()Oliver O'Halloran4-20/+17
Just pass the container structure rather than bus_id and xscom_base to tpm_i2c_request_send(). Rename xscom_base to i2c_addr while we're here since that's just plain wrong. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libflash/ipmi-hiomap: Respect daemon presence and flash controlAndrew Jeffery2-1/+326
Fix the fix of ORing in the BMC state - we only want to retain state covered by the ack mask as this is something we still need to handle. Critically, we must not retain state not covered by the ack mask as this may lead to host firmware attempting to communicate with a dead daemon or attempting to access the PNOR whilst the daemon is not in control of the flash. Further, add unit tests to capture the desired (and now implemented) behaviour. Fixes: 34cffed2ccf3 ("libflash/ipmi-hiomap: Improve event handling") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libflash/ipmi-hiomap: Add support for unit testsAndrew Jeffery6-31/+374
Lay the ground work for unit testing the ipmi-hiomap implementation. The design hooks a subset of the IPMI interface to move through a data-driven "scenario" of IPMI message exchanges. Two basic tests are added exercising the initialsation path of the protocol implementation. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libflash/ipmi-hiomap: Fix argument type warning on x86-64Andrew Jeffery1-1/+1
libflash/ipmi-hiomap.c: In function ‘hiomap_window_move’: libflash/ipmi-hiomap.c:17:21: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=] #define pr_fmt(fmt) "HIOMAP: " fmt ^~~~~~~~~~ include/skiboot.h:93:41: note: in expansion of macro ‘pr_fmt’ #define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0) ^~~~~~ include/skiboot.h:94:30: note: in expansion of macro ‘prlog’ #define prerror(fmt...) do { prlog(PR_ERR, fmt); } while(0) ^~~~~ libflash/ipmi-hiomap.c:291:3: note: in expansion of macro ‘prerror’ prerror("Invalid window properties: len: %llu, size: %llu\n", ^~~~~~~ libflash/ipmi-hiomap.c:291:47: note: format string is defined here prerror("Invalid window properties: len: %llu, size: %llu\n", ~~~^ %lu Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libflash/test: Rewrite Makefile.check to improve scalabilityAndrew Jeffery1-26/+137
The current implementation makes it hard to expand the list of tests if we want to build anything that doesn't link to mbox-server. This is a consequence of embedding the $(LIBFLASH_TEST_EXTRA) variable inside the recipes for building test executables, which makes the makefile a bit of a maze to navigate. To address this we could go the route of duplicating the $(LIBFLASH_TEST), $(LIBFLASH_TEST_EXTRA) and the corresponding make directives (targets/prerequisites/recipes) each time we want to link a binary against a new set of objects, but that seems ham-fisted. Further, $(LIBFLASH_TEST_EXTRA) is defined in terms of the relevant object (.o) files, but the recipes it is used in otherwise use source (.c) paths for compilation. These other paths are typically to non-test code that needs to be compiled into the test executable, but we can't use object files at the usual path because we will typically have a conflict of architectures (PPC64 for the skiboot object, x86_64 for the test object). This in turn means that we will compile source files multiple times (once for each test binary it is required in) rather than re-using an existing object file. Further, the current structure of the Makefile requires we #include the .c file under test directly into the test source if we want it in a specific test case due to the relationship of the prerequisites to the build (only the first source prerequisite is included in the build). The include-the-c-file approach can have some annoying side-effects with respect to macros, typically errors regarding redefinition. While it is useful for testing static functions in the source under test, it would be nice if this approach was optional rather than required. This change attempts to address all of these issues. The outcome is we have precise control of which objects get linked into each test binary, we avoid the architecture clash problem, we re-use existing compiled objects (avoiding recompilation), and we make the include-the-c-file approach optional. The general approach is to generate a new directory hierarchy of object files under a `$(HOSTCC) -dumpmachine` directory in the repository root and use these for linking the test cases. Objects that land in this segregated tree are described by a _SOURCES variable for each test, similar in structure and behaviour to automake's _SOURCES variables. Again similar to automake, a check_PROGRAMS variable is used that describes the path of each test binary to be built. The test binary paths are mapped to the corresponding _SOURCES variable by some secondary-evaluation wizardry that no-one has to pay any attention to once it is written. Whilst the implementation is perhaps slightly tricky, it allows us to avoid the recipe headache of unconditionally linking in objects defined in variables that don't directly participate in the target's prerequisites, and so prevents the explosion of variables as we implement tests that require disjoint sets of dependencies. This is initially intended as an isolated experiment with the libflash test makefile, but it's feasible that the scope of the concept could be expanded to other test Makefiles. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08phb4: Update & cleanup register definitionsBenjamin Herrenschmidt1-22/+9
We had a bunch of remaining definitions for registers that don't actually exist in PHB4 anymore (copied from PHB3). This removes them along with a handful of minor style cleanups Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-02skiboot 6.0.11 release notesStewart Smith1-0/+57
Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit 3e2024d903ee27ad77da01f454bb2404627ba5dc) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-02CI: Bump the Qemu we build for CI testingStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01phb4/capp: Only reset FIR bits that cause capp machine checkVaibhav Jain2-0/+18
During CAPP recovery do_capp_recovery_scoms() will reset the CAPP Fir register just after CAPP recovery is completed. This has an unintentional side effect of preventing PRD from analyzing and reporting this error. If PRD tries to read the CAPP FIR after opal has already reset it, then it logs a critical error complaining "No active error bits found". To prevent this from happening we update do_capp_recovery_scoms() to only reset fir bits that cause CAPP machine check (local xstop). This is done by reading the CAPP Fir Action0/1 & Mask registers and generating a mask which is then written on CAPP_FIR_CLEAR register. Cc: stable Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01phb4: Check for RX errors after link trainingOliver O'Halloran3-3/+30
Some PHB4 PHYs can get stuck in a bad state where they are constantly retraining the link. This happens transparently to skiboot and Linux but will causes PCIe to be slow. Resetting the PHB4 clears the problem. We can detect this case by looking at the RX errors count where we check for link stability. This patch does this by modifying the link optimal code to check for RX errors. If errors are occurring we retrain the link irrespective of the chip rev or card. Normally when this problem occurs, the RX error count is maxed out at 255. When there is no problem, the count is 0. We chose 8 as the max rx errors value to give us some margin for a few errors. There is also a knob that can be used to set the error threshold for when we should retrain the link. ie nvram -p ibm,skiboot --update-config phb-rx-err-max=8 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01core/flash: Log return code when ffs_init() failsAndrew Jeffery1-1/+1
Knowing the return code is at least better than not knowing the return code. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01libflash/ipmi-hiomap: Use error codes rather than abort()Andrew Jeffery1-6/+10
Admittedly the situations are pretty dire, and usually indicate a programming failure on the BMC's part, but abort() seems a bit over the top. The technique was useful for development but shouldn't have made it into production. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01libflash/ipmi-hiomap: Restore window state on window/protocol resetAndrew Jeffery1-3/+39
The initial implementation of ipmi-hiomap left a bit to be desired when it came to event handling: it didn't completely restore the state of the system to what it was before events like a hiomap protocol or window reset take place. The result is the host cannot recover from e.g. the BMC being rebooted underneath it. Take the only step required in the event of window reset, or the final step after performing the handshake in the event of a protocol reset, and re-open the previously active window if there was one. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01libflash/ipmi-hiomap: Improve event handlingAndrew Jeffery1-4/+3
The host firmware side of the hiomap protocol has two input sources: 1. Requests to adjust the flash mappings from itself or the kernel 2. State change events received from the BMC The handling of BMC state change events (2.) is asynchronous in two ways: a. The BMC pushes the state change event to the host, which is recorded but not acted on b. When handling requests to adjust the flash mapping, skiboot first addresses any new BMC state changes before servicing the mapping request Further, the hiomap protocol sends a mix of ackable and stateful events, where ackable events are only relevant until skiboot's hiomap event handler (b. above) cleans them up, whereas stateful events persist until the BMC provides a subsequent state change event. As we handle the ackable events asynchronous to receiving notification (b. vs a. above), OR in the received event state rather than directly assign to ensure we don't lose events that we must not miss. As an example, without the OR we may lose ackable events if the daemon restarts and pushes a new state change event during initialisation, which will necessarily bear no relation to the previous state change event value. Similarly, don't close active windows in a. based on the event content, as we need the window type information to handle state restoration in b. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01p9dsu: Describe platform BMC register configurationAndrew Jeffery1-1/+9
Provide the p9dsu-specific BMC configuration values required for the host kernel to drive the VGA display correctly. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01p9dsu: Add HIOMAP-over-IPMI supportAndrew Jeffery1-0/+1
Boston uses the same netfn / command values as OpenBMC. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01libflash/ipmi-hiomap: Cleanup allocation on init failureAndrew Jeffery1-4/+12
Previously we were leaking the memory pointed by ctx if an IPMI error occurred during protocol initialisation. Make sure we free the memory if an error occurs. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-01nx: Don't abort on missing NX when using a QEMU machineBenjamin Herrenschmidt1-1/+2
These don't have an NX node (and probably never will) as they don't provide any coprocessor. However, the DARN instruction works so this abort is unnecessary. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-31skiboot v6.0.10 release notesStewart Smith1-0/+81
Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit b93b22df1a8b8ace4ffc080b28877fde7eaa3dde) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-31Run pollers in time_wait() when not bootingStewart Smith1-2/+2
This only bit us hard with hiomap in one scenario. Our OPAL API has been OPAL_POLL_EVENTS may be needed to make forward progress on ongoing operations, and the internal to skiboot API has been that time_wait() of a suitable time will run pollers (on at least one CPU) to help ensure forward progress can be made. In a perfect world, interrupts are used but they may a) be disabled, or b) the thing we're doing can't use interrupts because computers are generally terrible. Back in 3db397ea5892a (circa 2015), we changed skiboot so that we'd run pollers only on the boot CPU, and not if we held any locks. This was to reduce the chance of programming code that could deadlock, as well as to ensure that we didn't just thrash all the cachelines for running pollers all over a large system during boot, or hard spin on the same locks on all secondary CPUs. The problem arises if the OS we're booting makes an OPAL call early on, with interrupts disabled, that requires a poller to run to make forward progress. An example of this would be OPAL_WRITE_NVRAM early in Linux boot (where Linux sets up the partitions it wants) - something that occurs iff we've had to reformat NVRAM this boot (i.e. first boot or corrupted NVRAM). The hiomap implementation should arguably *not* rely on synchronous IPMI messages, but this is a future improvement (as was for mbox before it). The mbox-flash code solved this problem by spinning on check_timers(). More generically though, the approach of running the pollers when no longer booting means we behave more in line with what the API is meant to be, rather than have this odd case of "time_wait() for a condition that could also be tripped by an interrupt works fine unless the OS is up and running but hasn't set interrupts up yet". Fixes: 529bdca0bc546a7ae3ecbd2c3134b7260072d8b0 Fixes: 3db397ea5892a8b348cf412739996731884561b3 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-30hiomap: fix missing newline at end of 'Flushing writes' prlog()Stewart Smith1-1/+1
Fixes: 529bdca0bc546a7ae3ecbd2c3134b7260072d8b0 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-29travis/ci: rework Dockerfiles to produce build artifactsStewart Smith17-14/+17
ubuntu-latest was also missing clang, as ubuntu-latest is closer to ubuntu 18.04 than 16.04 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25hiomap: free ipmi message in callbackStewart Smith1-0/+3
Otherwise we'd slowly leak memory on each hiomap operation. Fixes: 529bdca0bc546a7ae3ecbd2c3134b7260072d8b0 Tested-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25Revert "TEMPORARY HACK: Disable verifying VERSION"Stewart Smith1-6/+1
This reverts commit f835684365273c5ff1b7c700ddc0f9c1a859363f. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25Quieten 'warnings' now that SIO is disabledStewart Smith2-3/+11
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25npu2-opencapi: Enable presence detection on ZZFrederic Barrat4-14/+1
Presence detection for opencapi adapters was broken for ZZ planars v3 and below. All ZZ systems currently used in the lab have had their planar upgraded, so we can now remove the override we had to force presence and activate presence detection. Which should improve boot time. Considering the state of opal support on ZZ, this is really only for lab usage on BML. The opencapi enablement team has okay'd the change. In the unlikely case somebody tries opencapi on an old ZZ, the presence detection through i2c will show that no adapter is present and skiboot won't try to access or train the link. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25cpu: Quieten OS endian switch messagesJoel Stanley1-2/+2
Users see these when loading an OS from Petitboot: [ 119.486794100,5] OPAL: Switch to big-endian OS [ 120.022302604,5] OPAL: Switch to little-endian OS Which is expected and doesn't provide any information the user can act on. Switch them to PR_INFO so they still appear in the log, but not on the serial console. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-25pflash: Add --skip option for readingAdriana Kobylak3-3/+29
Add a --skip=N option to pflash to skip N number of bytes when reading. This would allow users to print the VERSION partition without the STB header by specifying the --skip=4096 argument, and it's a more generic solution rather than making pflash depend on secure/trusted boot code. Signed-off-by: Adriana Kobylak <anoo@linux.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> [stewart: fix up pflash test] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23external/mambo: Check for qtrace_utils.tcl before sourcing itMadhavan Srinivasan1-1/+3
Commit cb835dbdf875 ('external/mambo: conditionally source qtrace script') added qtrace_utils.tcl sourcing in skiboot.tcl without a check to see whether it exists in the current directory. This broke running mambo from another directory using skiboot.tcl. Patch adds a check. Fixes: cb835dbdf875 ('external/mambo: conditionally source qtrace script') Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23platforms/astbmc/vesnin: Send list of PCI devices to BMC through IPMIArtem Senichev1-2/+101
Implements sending a list of installed PCI devices through IPMI protocol. Each PCI device description is sent as a standalone IPMI message. A list of devices can be gathered from separate messages using the session identifier. The session Id is an incremental counter that is updated at the start of synchronization session. Signed-off-by: Artem Senichev <a.senichev@yadro.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23lpc: Clear sync no-response field prior to device probeAndrew Jeffery1-1/+6
Artem Senichev reported[1] his P8 platform was failing to boot from a43e9a66aae9 ("astbmc: Fail SFC init if SIO is unavailable") with the following error: [ 110.097168975,3] PLAT: Failed to open PNOR flash controller I reproduced this behaviour on a Palmetto; we need to ensure the state of the no-response error bit is clear before proceding with the presence test. The fix appears to resolve the failure to open the PNOR flash controller on Palmetto and doesn't change the expected behaviour on Witherspoon. [1] https://github.com/open-power/skiboot/issues/197 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Tested-by: Artem Senichev <a.senichev@yadro.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23core/device: NULL pointer dereference fixNicholas Piggin1-1/+4
This was caught with unmapped memory dereference page faults. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23core/flash: NULL pointer dereference fixesNicholas Piggin2-7/+14
These were caught with unmapped memory dereference page faults. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-10-23STOP API: Changes for SMF and SPR self savePrem Shanker Jha6-114/+886
Commit accomplishes following: - Implementation of new self restore region memory layout - Restore of SPRs pertaining to SMF - Self save of SPRs - Backward compatibility with old self restore layout Key_Cronus_Test=PM_REGRESS Change-Id: I11359e392102d32896251225907eb95a43ba6f78 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66212 Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66216 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>