Age | Commit message (Collapse) | Author | Files | Lines |
|
Previous updates to the opal-prd firmare interface have
1) added the message size into struct opal_prd_msg
2) split opal_prd_msg into a separate header struct
3) exposed the PRD ranges through the device-tree
This update to the opal-prd binary will accommodate these interface
changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This utility is designed to run completely in userland linux and make use of
OPAL APIs (exposed to userland via the linux MTD abstraction) to read, parse,
display and optionally clear firmware GUARD partition information.
The main intended use case is to have the tool run on the OpenPOWER machine
and automatically detect the flash device containing the gard data and display
information about the running system.
The tool can also read a flash imagine contained in a specified file. The tool
can also be used to parse just guard data not contained in a flash image but
rather dumped to a file. The tool understands ECC and does its best to detect
this automatically.
There are three commands:
- list: lists all the records
- show: show more information about a specific record
- clear: clear/erase a specific record or the entire flash.
The tool makes some assumptions:
- gard data is terminated by an entry containing all FF bytes. In the case
of the tool detecting ECC it will always read with ECC correction so the
final all FF record will still need to contain ECC bytes.
- The GUARD partition will not have gaps, the clear code does shuffle entires
up and set the last one to all FF bytes.
Note: This tool has been named 'gard' because this is the traditional name for
hardware that has been detected as faulty and has been 'gard'ed. It turns out
that in the flash the partition is named 'GUARD'.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
[stewart@linux.vnet.ibm.com: add correct (C) header to gard.c]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
With the change to the official switch_endian system call, we lost
preservation of the counter across the system call.
This change uses the LR instead. It's preserved across the system call,
and is going to be overwritten by the branch-and-link instruction
anyway.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Only source mambo_utils.tcl if we can find it. This allows using skiboot.tcl
from another directory, which is useful for automated testing.
We need to open code the body of "ton" and "c" obviously, in case we
didn't find skiboot.tcl.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When the simulation runs to completion, exit mambo. In addition to the
previous patch this allows "halt" on the Linux command line to stop the
simulation and exit mambo.
Note that this only takes effect if the "mysim go" is left to run until
the simulation is stopped. If the user interrupts the simulation, eg.
with Ctrl-C, to inspect state, then the exit has no effect.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The "fast endian switch" syscall was never fully supported - this change
moves to the official switch-endian syscall, using __NR_switch_endian
We also form the little-endian instructions using this prepreocessor
define.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
memboot uses bmc system memory instead of a real flash chip. This
patch adds a flash backend for bmc system memory to allow use of the
memboot tool (in external/memboot) to boot the system.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This change unifies the printf/fprintf/warn/err/perror calls into:
pr_log(level, fmt, ...).
While doing this, add prefixes to each message, to signify the
functionality that raised the log message.
We also add syslog initialisation, so that we can log to the system-wide
syslog facility.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Rather than calling system("modprobe ...") in different locations, this
change introduces an insert_module() helper function.
We use this for the existing i2c modprobe, and add one for the ipmi
devintf module too.
We won't need the i2c-opal module, as it should be automatically
loaded by the platform device.
Signed-off-by: Jeremy Kerr <jk@ozlabs.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>
|
|
The start of the partition was not used when sending the size to the
mtd_{read,write} calls. This meant they were unconditionally reading and
writing to the start of the flash, instead of the partition.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
The PNOR operations will now return the number of bytes successfully
written, which may be less than the number of bytes requested, similar
to read(2) and write(2).
The hostboot interface is updated with this information. The signature
does not change.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Provide detailed feedback when encountering errors in the PNOR code.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
The HBRT code will check for NULL callbacks, so don't provide them in
the hinterface table.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
This change adds an application in external/opal-prd, implementing the
userspace portion of a PRD stack.
This code is responsible for loading the HBRT code from reserved memory,
and provding hostboot runtime functionality through a set of
callbacks.
Because we may be running little-endian (and expect the HBRT code to be
big-endian), we need to thunk the endianness between calls through the
HBRT interface.
Includes multiple contributions from:
Joel Stanley <joel@jms.id.au>
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Benjamin Herrenschmidt <benh@kernel.crashing.org
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[stewart@linux.vnet.ibm.com: squash trailing whitespace]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-By: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add ecc parmenter to ffs_part_info() to indicate if the partition is ECC
protected or not. Fix all call sites.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Rather than hard coding /tmp/zImage.epapr, get the zImage from an environment
variable.
This is a) cleaner, and b) allows running multiple copies of the
simulator against different kernels simultaneously.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a backend for bmc based machines running AMI firmware
supporting the OEM extended sel commands. Errors are logged in pel
format to the bmc.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
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>
|
|
We need the core to do proper endian among others since that
code is compiled in run-trace
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Endian breakage, build breakage, ...
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The memboot tool is a small utility designed to be run on the ASPEED
BMC used in some OpenPower systems. It allows you to boot the P8 host
from the main system memory of the BMC rather than from the flash
memory.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We share code, it's easier to maintain it this way
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|