Age | Commit message (Collapse) | Author | Files | Lines |
|
FSP implements the IPMI commands support that can be accessed over
the mailbox interface from the host. The host needs to provide and
receive the message/data bytes of the IPMI command in the TCE space
in the KCS (Keyboard Controller Style) format.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Acked-By: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Whenever FSP makes any changes to backup topology as part of either
routine hardware maintenance or fixing failed backup topology configuration,
it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable
the backup topology. OPAL layer should keep itself up-to-date with accurate
details of current topology configurations. This will help OPAL layer to
successfully handle any TOD failover in future.
The FSP can only request that the currently inactive (backup) topology be
disabled or enabled. If the requested topology is currently the active
topology, then fail this request with a 0xB8 (TOD topology in use) status
as return code.
For disable request, set the backup topology status as disabled.
For enable request, scan all the available chips and find the new backup
master chip by looking at TOD status register of each chip.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In pnor_init(), there are chances of pointer bl being read before
assignment. Fix it by initializing it to NULL.
Fixes Coverity defect#97868.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This adds a driver for standard CMOS RTC chips and use it from
the QEMU platform.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This adds support for running under qemu "powernv" platform, which
is currently available via the qemu repository at:
https://github.com/ozbenh/qemu branch "powernv"
qemu can't yet create DT entries for ISA devices so we hard wire the UART
and RTC devices in the device-tree like we do with other platforms.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Complex merge fixups
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This adds support for the HW SerIRQ deserializer of the P8 LPC
bridge which is properly wired up on Naples. It also adds support
for detecting and reporting LPC error interrupts on all P8s.
On most platforms (Rhesus is the exception here due to the way it
lets Linux handle the UART interrupts directly), we modify the
device-tree to properly represent the LPC controller as a cascaded
interrupt-controller and the "interrupts" property of LPC devices
to contain the actual LPC interrupt number for the device.
We add a mechanism for drivers to register specific LPC interrupts,
and a "workaround" for pre-Naples P8 which platforms can use to call
all of them for when the external FPGA based deserializer is used.
There's also a callback on LPC resets which isn't used yet, we need
a bit more work on the general LPC error handling, but it can be
done a separate patches.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Based on instructions from the HW folks
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Found by llvm scan-build.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Call prd_init() on astbmc/firestone platform
in order to enable PRD in host kernel.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Converted all the libflash calls to use the blocklevel interface, modified all
callers to libflash to use the blocklevel interface.
This patch should introduce next to no functional change.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Increases boot-code-coverage (for Mambo):
Lines: 2043 to 2168 (8.3% to 8.8%)
Functions: 283 to 298 (14.7% to 15.4%)
Branches: 792 to 816 (6.4% to 6.5%)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
By adding an explicit mambo platform we can do tricks like a fake
NVRAM, actually get RTC from mambo and generally be a bit better
in a simulator
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
With many PCI cards, we'd hit a race where calls to
firenze_add_pcidev_to_fsp_inventory would step on each other leading to
memory corruption and finally an assert() in the allocator being hit
during boot.
Observed with 33+ devices.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Dan Horák <dan@danny.cz>
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>
|
|
platforms/astbmc/pnor.c:43:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
if (rc) {
^~
platforms/astbmc/pnor.c:58:6: note: uninitialized use occurs here
if (pnor_chip)
^~~~~~~~~
platforms/astbmc/pnor.c:43:2: note: remove the 'if' if its condition is always false
if (rc) {
^~~~~~~~~
platforms/astbmc/pnor.c:30:30: note: initialize the variable 'pnor_chip' to silence this warning
struct flash_chip *pnor_chip;
^
= NULL
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
platforms/rhesus/rhesus.c:126:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
if (rc) {
^~
platforms/rhesus/rhesus.c:141:6: note: uninitialized use occurs here
if (pnor_chip)
^~~~~~~~~
platforms/rhesus/rhesus.c:126:2: note: remove the 'if' if its condition is always false
if (rc) {
^~~~~~~~~
platforms/rhesus/rhesus.c:121:30: note: initialize the variable 'pnor_chip' to silence this warning
struct flash_chip *pnor_chip;
^
= NULL
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
On Firenze, we called hservices_lid_preload in firenze_init() but
hservices_lid_preload() is called from ibm_fsp_init(), so we ended
up doing the load twice.
This added approximately 0.2 seconds to boot time.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Implement start_preload_resource and resource_loaded platform functions
for astbmc machines (palmetto, habanero, firestone).
This means we start loading kernel and initramfs from flash much earlier
in boot, doing things like PCI init concurrently so that by the time
we go to boot the payload, it's already loaded.
Implementation is a simple queue with a job running on another CPU doing
the libflash calls.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
commit 132e593400f9 ("core: add a platform op to read sensors") missed
out this platform.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
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>
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>
|