| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Today, when run on an IBM Power systems, opal-prd complains in syslog
with a set of messages similar to these :
opal-prd: CTRL: Starting PRD daemon
opal-prd: I2C: Found Chip: 00000000 engine 1 port 0
opal-prd: I2C: Found Chip: 00000010 engine 1 port 0
opal-prd: CTRL: Listening on control socket /run/opal-prd-control
opal-prd: FW: Can't open PRD device /dev/opal-prd: No such file or directory
opal-prd: FW: Error initialising PRD channel
opal-prd: CTRL: stopping PRD daemon
Which are difficult to interpret for a person not initiated to Power
firmware.
The patch below detects if the platform has support for PRD by looking
at the device tree property :
/sys/firmware/devicetree/base/ibm,opal/diagnostics/compatible
and stops opal-prd early in the main routine with an explicit
message for the user.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to test all the backends when eg. making changes to libflash, to
ensure that something hasn't gone wrong. To encourage developers to do
this, add a script to simplify it.
Patches welcome to detect the specific cross compilers binaries shipped
on your favourite distro.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding quiet rules to make our output a bit cleaner. Building now looks
like this:
$ make
LN libflash
LN common
LN ccan
CC pflash.o
CC version.o
LD common-arch_flash.o
CC pflash
You can see the full build ouput by doing a "make V=1".
By doing this, we build fractionally faster, exposing arace condition
between running the make_version.sh script and the link existing for it.
As we run it when creating the variable, there is no way to ensure it
exists first.
Solved this by not creating the symlink and simply running
make_version.sh from the root.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
pflash contained a copy of the include/ast.h header. It had grown stale,
so remove in and link in the common header.
Note that it's hard to test that we haven't broken tools in the
external/ directory these days; when making changes we need to test with
amd64, ppc64, ppc64le and arm to ensure that everything can build!
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| | |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Method for recording version is identical to pflash. Uses the current
skiboot version and any current repository state.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This will enable building the gard tool on any arch which may prove useful
for debug parsing of gard records in a binary file format
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to be able to compile for something that isn't the default for the
compiler one should be able to use CFLAGS and LDFLAGS on commandline.
ie build a 64bit binary with a compiler which builds by default 32bit or
the opposite endian for which the compiler is configured.
Currently the common/rules.mk ignores LDFLAGS when it shouldn't and pflash
sets LDFLAGS for something which only applies to the final link.
This patch addresses both those issues.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These systemd scripts start the opal-prd daemon and we have been
duplicating these in a few distributions already. skiboot seems
like a good place to keep a common reference.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
On some BMC firmware revisions, we need to copy over a pflash
binary and we need to ensure that the executable bit is set.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If I run gard on system flash as a non-root user, I get:
$ ./external/gard/gard list
$ echo $?
1
which isn't too helpful. This change adds a basic error message to the
open() failure.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On a system the PRD daemon was starting without a PNOR path, and it was
hard to diagnose what had happened. These messages should help in that
case.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Automatically start the simulator using the SKIBOOT_AUTORUN
environment variable.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add ability to add additional configuration information using the
SKIBOOT_SIMCONF environment variable.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Advertise the sim supports 256M and 1TB segments in device tree. If
we don't have this, Linux will default to 256MB segments.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add ability to load initrd using SKIBOOT_INITRD environment variable.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| | |
Only make PVR change when running on the POWER8 simulator.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use SIMHOST to determine the simulator type. This means we can
support past and future sims other than P8.
Signed-off-by: Michael Neuling <mikey@neuling.org>
[stewart@linux.vnet.ibm.com: support environments without SIMHOST]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make it possible to use an alternate skiboot.lid by setting the
SKIBOOT environment variable.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, a signature failure for the HBRT image prints a log message,
but doesn't actually abort the initialisation.
This change adds a failure path for this, as well as hbrt_init()
returning NULL.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| | |
Simple tests for the gard tool that can be expanded on over time
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unlike skiboot where individual functions can be tested, the external/
binaries can sometimes only be fully tested by observing the output of the
full binary as such this little framework designed to grab stdout and
stderr and compare to provided output files should prove useful.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|/
|
|
|
| |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Some BMC firmware versions don't ship pflash.
Support PFLASH_TO_COPY environment variable to a pflash binary
built for the BMC that will be copied over and used to pflash
the partition or whole pnor.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We've seen various IPMI timeouts during testing (mainly hit
by petitboot) but it seems that 5 seconds is the magic value
that matches everywhere.
This echoes what we use in petitboot, so at least being consistent
with ourselves is a good idea.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The IPMI device and pnor should be ready with the devices present and module
loaded before the host service interfaces. So, reorder the initialization code
in the daemon.
Suggested-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the gard tool detects that the GUARD partition has been corrupted it has
logic to attempt to recover the GUARD partition in a best effort attempt to
leave the GUARD partition in a state that will allow the machine to boot.
It has come to light that Hostboot is more sensitive to what must be in the
GUARD partition in order to be able to bring a machine up, as such, the
gard tool will now fill the entire partition with all 1's and ECC bytes, not
simply the first record as it currently does
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the gard tool is told to clear all the gard records it actually erases
the entire flash and inserts ECC bytes only for the size of the first gard
record.
The current method appears to have stopped working, Hostboot expects the
entire partition to have ECC bytes throughout the entire partition, and as
such the current method causes Hostboot to error and be unable to bring up
machines.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opal-prd client to accept run command and pass it as-is to hbrt.
Example:
opal-prd -d run test hbrt -t 1 -c "good cmd"
argv[0] = test
argv[1] = hbrt
argv[2] = -t
argv[3] = 1
argv[4] = -c
argv[5] = good cmd
Above argc/argv passed to hbrt->run_command() and result out string
sent to the console.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Patrick Williams <iawillia@us.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch adds the support to invoke manufacturing htmgt pass through
and attribute override command in HBRT. The command format would look
something as below:
# opal-prd --expert-mode htmgt-passthru 0x10 0x11 0x12
It will pass the arguments after 'passthru' in an array as input data to
hbrt->htmgt_pass_thru(). The HBRT will return the output data to a buffer
provided by 'opal-prd' of maximum length 4096 bytes.
# opal-prd override <file_name_of_binary_blob>
It will read the contents of the binary blob into a buffer and invoke
hbrt->apply_attr_override() with the buffer and size as the input to
the interface.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Patrick Williams <iawillia@us.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
| |
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|