Age | Commit message (Collapse) | Author | Files | Lines |
|
We didn't keep it in sync with palmetto and habanero
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We didn't keep it in sync with palmetto and habanero
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-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 patch introduces an initial framework to define a sensor_read
operation per platform. It also proposes a few helper routines to
work on the sensor 'handler' which identifies a sensor and attribute
in the OPAL_SENSOR_READ call.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This moves away from using fsp_sync_msg in fsp_fetch_data and instead
using the platform hooks for start_preload_resource() to actually queue
up a load and having the plumbing for checking if a resource is loaded yet.
This gets rid of the "pollers called with locks held" warning we got
heaps of previously. You can now boot some FSP systems without getting
this warning at all.
This also sets the stage for starting load of LIDs much earlier to when
they're needed, improving boot time.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
No functional changes in what happens, just have two calls, one for
queueing preload the other for waiting until it has loaded.
future patches will introduce platform specific queueing.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This patch creates a parent LED device node called 'led' under the root
'opal' device node. This also creates child device nodes under 'led'
corresponding to all individual LEDs on the system whether it is an enclosure
type or a descendant type with their location code as name. The location code
information will be used by the host to enlist and access all the individual
LEDs present on the system. The child LED device nodes also have the properties
'led-types' and 'led-loc' representing what kind of LEDs present on the same
loation code and whether it is an enclosure type LED or a descendant type LED.
Sample device tree output:
ibm,opal {
..
..
led {
compatible = "ibm,opal-v3-led";
phandle = <0x1000006b>;
linux,phandle = <0x1000006b>;
U78C9.001.RST0027-P1-C1 {
led-types = "identify", "fault";
led-loc = "descendent";
phandle = <0x1000006f>;
linux,phandle = <0x1000006f>;
};
<snip>
};
};
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
[stewart@linux.vnet.ibm.com: Move create_led_device_nodes to FSP platform.exit]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Rather than using the hardcoded FRU ID, parse it from the device tree.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
We're missing callbacks for elog_commit and exit.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
The sensor nodes should have the compatible properties, not the "bmc" and
"sensors" nodes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
We set the IPMI firmware progress sensor to indicate the boot progress
of the system. The x86-centric IPMI names don't fit perfectly into what
skiboot does, but they do give some indication of the system state.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
This change adds Processor Recovery Diagnostics (PRD) code to skiboot
firmware. This allows certain hardware RAS events to be handled by a
userspace application.
The core of the PRD code is a messaging interface to the kernel (and
onwards to userspace). PRD events are logged with the prd.c code, and
sent to the kernel as opal_msg messages. For responses to these
messages, the kernel will reply using a new OPAL call, opal_prd_msg.
Only one message is outstanding at a time; we collect events from
hardware interrupts (hooked up by subsequent patches), and set
per-processor event bits. Once an event has been consumed by the
kernel, we clear that event from out pending set, and send any further
pending events.
Certain events (hardware attentions from the psi layer) need to be
masked at interrupt time. For these, we have an acknowledgement facility
to clear the mask once the userspace PRD application has cleared the
source of the error.
Includes multiple contributions from:
Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We don't want to call hservices_init on machines that use the PRD, as
they expect to relocate the hbrt code later. This change moves the
hservices_init call out of the common path, and into the firenze
platform init.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
HostBoot now creates the necessary nodes
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Move lid caching from skiboot init to platform initialization code,
just after the OPL sequence.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Since we want to prevent conflicts between PNOR and NVRAM, this change
moves the flash-nvram handling out of flash-nvram.c and into the generic
flash module. This way, the OPAL_FLASH_{READ,WRITE,ERASE} API won't
conflict with the OPAL_*_NVRAM api.
To do this, we use the flash_register function to look for an "NVRAM"
partition. If one is found, it is automatically registered as the system
NVRAM backend.
We also change the rhesus and astmbc platforms to use the common flash
code.
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>
|
|
Since we have a flash device registered as the system flash, use this as
a generic load_resource backend.
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>
|
|
This adds a subid to load_resource() so that sub-partitions can be accessed
inside a PNOR partition. These sub-partitions follow the format used by the
hostboot SBE image.
The subid will match on the EC field of the SBE table of contents. If it's
found, only that sub-partition is returned to the caller.
Current partitions (kernel and ramfs) don't support sub-partitions. If caller
tries to access a sub-partition within these, we fail the call.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add support for an ipmi watchdog timer. During skiboot initialisation
this patch will cause the system to be reset if opal_run_pollers()
isn't called for more than 60 seconds.
Once the payload is started the watchdog timer will be reset and a
pre-timeout interrupt set. The payload should then receive the
interrupt and call into skiboot which will disable the watchdog timer.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
For OEM events including graceful power down and BMC PNOR access we want
to receive notification whenever a message is ready to be read from the
BMC. This requires the Event Message Buffer flag to be enabled.
This is the equivalent of doing mc setenables event_msg=on with
ipmitool, except the message must come from the BT interface in order to
have permission to modify the flags.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Commit 16c80346 change included some reverts of previous commits, which
we need. This change reverts those reverts, leaving the original intent
of that change.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Was mentioned in linux as possibly being used by some external test
modules. It's harmless to make this official behaviour.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
To date BMC platforms have had their payload built in to the skiboot
binary. This patch adds the option of loading from a flash partition
instead.
This has been tested on palmetto with a separate skiboot and
kernel+rootfs partition. In the future we may have separate kernel and
rootfs, which should just work. For now this is what we see when booting:
[10648940943,5] INIT: Kernel loaded, size: 15728640 bytes (0 = unknown
preload)
[10649094578,5] INIT: 32-bit kernel entry at 0x2001015c
[10649170607,3] PLAT: No ROOTFS partition in PNOR
If the partition named cannot be found, the core loading logic will fall
back to using the built-in payload. In this case, the user gets the
following messages:
[2214557191,3] PLAT: No KERNEL partition in PNOR.
[2220486159,5] INIT: platform kernel load failed.
[2221293286,5] Using built-in kernel.
[2265861935,5] INIT: Kernel loaded, size: 14706638 bytes (0 = unknown
preload).
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This reverts commit 7185393df6d7d806811b827fabce1d8ad3e05fff.
Now that we have the correct behaviour in the BMC, we can go back
to sending the correct ipmi command for rebooting the machine.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
There could be some processor chips not populated in the system.
So, if we are not able to get chip data of given chip id, we should
just move on to the next or return instead of aborting (bz 120562).
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Based on Habanero.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The strings should be "tyan,..." not "ibm,..."
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Fix the i2c device node name that should show the functionality and
use a dedicated 'target' name property to tell targets being controlled.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The pel logging code requires a system-id device tree property. This
should be passed to us from Hostboot but at present we don't seem to
get one. This patch adds a default value of "unavailable" if it
doesn't exist.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
This patch adds basic support for populating some fru data. Currently
we only support adding the skiboot version number to the product
information area.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Set up the device tree nodes of i2c masters and their busses, eventually
all this has to come from hostboot.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The BMC does not currently support the IPMI_RESET (03h) chassis power
control command. In order to have reboot working in the interim, send a
POWER_CYCLE (02h) instead.
This should be reverted once the BMC has support for 03h to ensure we
follow the specification.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The i2c bus frequency is now per port and we use more standard properties
this and the clock frequency of the master cell itself.
Also use "ibm,opal-i2c" as a compatible match to indicate that the DT node
is compatible with the OPAL APIs, whether it's a P8 i2c bus or something
else (we will eventually expose the centaur i2c's too for example).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
And start adding interfaces to lookup i2c busses.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We add engine 1 only for now. Eventually, HostBoot will provide
the device nodes and we'll filter what Linux can access.
We expose the VPD eeprom so that the Linux AT24 driver can pick it up
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Currently, in core/init.c we do a fsp-specific load procedure to grab
the kernel image.
We'd like to do two things: allow other types of resources, and have
paths for non-FSP platforms to perform loads.
This change adds a platform-specific load_resource hook, and moves the
currently loading code to fsp_load_resource. To allow other resource
types, we add an identifier to indicate the type of resouce to load.
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This patch adds two opal calls (opal_ipmi_send and opal_ipmi_recv)
to allow an operating system to send and receive arbitrary ipmi
messages to the BMC.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
OpenPOWER boxes don't have an FSP and therefore implement their own
method for passing log messages to a support processor. This patch
makes the logging method platform specific.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This means the Linux output no longer gets into our internal log,
which makes dumping of it from Linux a lot nicer. It will also allow
us to improve the way we do the bufferring for Linux and to exploit
eventually the TX interrupts. It will also allow us to implement
some form of timeouts for the OPAL console variant of it so we don't
get stuck of the BMC doesn't consume from the virtual UART.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
All the platforms basically do the same thing
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We don't need the debug level printouts by default, set to PR_DEBUG
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
No functional changes, when running with higher log level, you'll
get debug messages without recompiling!
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
For now identical to Palmetto.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We might have a different BMC in the future..
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This moves most of the palmetto platform code to a "common" file
to share with other platforms using AST BMC.
We also initialize IPMI later.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The bits in the control register are mostly write-1-to-clear, so
the rmw sequences in bt_setmask() and bt_clearmask() don't work.
Additionally, H_BUSY is weird as it's a write-1-to-toggle, so let's
write a "safe" function that sets it to the desired state based on
its previous state. (We can optimize that further later).
Also enable interrupt operations.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The AMI images use the virtual UART, not the SIO UART, so configuring
the SIO the way we do is incorrect. Additionally, they don't configure
the interrupts properly (bad polarity for VUART and bad number for iBT).
This reworks the inits to fix that up:
- All SIO interrupts are set to level low
- Check if VUART is enabled. If yes, configure and use it (and disable
SIO UART which hostboot might have left enabled).
- Else, reconfigure VUART LPC address and IRQ properly
- Configure iBT LPC address and IRQ properly
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|