| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 20f685a3627a2a522c465716377561a8fbcc608f.
We've hit problems on Zaius machines and the needed petitboot changes
haven't made it upstream yet.
Let's revert for the time being while we sort everything out.
We probably have to keep both around for a few years.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dtc tool complaining about below warning as usage of linux,stdout-path
property under /chosen node is deprecated.
dts: Warning
(chosen_node_stdout_path): Use 'stdout-path' instead of 'linux,stdout-path'
So this patch fix this by using stdout-path property on all the systems
and keep linux,stdout-path only on P8 and before. This property refers to
a node which represents the device to be used for boot console output.
Verified boot on both P8 and P9 systems with new and older kernels.
And also verified dtc warnings got fixed in both P8 and P9.
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
[stewart: simplify logic]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
When using the aspeed SUART, we see a condition where the UART sends
continuous character timeout interrupts. This change adds a (heavily
commented) dummy read from the RBR to clear the interrupt condition on
init.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The pattern of calling cpu_relax() inside a polling loop does
not suit the powerpc SMT priority instructions. Prefrred is to
set a low priority then spin until break condition is reached,
then restore priority.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[stewart@linux.vnet.ibm.com: fixup lpc-uart wait_tx_room() and unit test]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
This moves the parsing of the BMC and LPC details to the start of the
HDAT parsing. This allows us to enable the Skiboot log console earlier
so we can get debug output while parsing the rest of the HDAT.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Gcc 4.8 would warn:
hw/lpc-uart.c: In function 'uart_setup_os_passthrough':
hw/lpc-uart.c:428:2: error: missing initializer for field 'reset' of 'struct lpc_client' [-Werror=missing-field-initializers]
Fixes: a2940770ca6da2c58081f8207aded197e45f6cd6
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each LPC interrupt can be routed to one of 4 lines to the PSI
bridge which represent 4 different system interrupts. This
allows LPC clients to request as specific target (Linux or OPAL)
and makes the LPC core pick a route and configure it appropriately.
The UART is updated to properly forward interrupts to Linux
if necessary
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
This was broken on Rhesus. Also add an nvram way of
overriding the policy
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Flushing the OPAL console is now handled by a driver specific OPAL call
handler so this can be removed.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new structure that contains the implementations of the various
OPAL console handlers. This is intended to replace the existing ad-hoc
mechanism where the OPAL call handlers are overwritten in the OPAL
console driver's init function.
Currently this just moves the site where the OPAL call handlers are
overwritten to inside of console.c, but it is intended to give us a
mechanism for implementing features such as pointer validation for the
OPAL console calls without having to manually update each driver.
This also helps to clarify differences between the internal (skiboot)
console and the external (OPAL) console.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds a separate structure to house the operations for the OPAL console.
This is used to define a new API for dealing with the OPAL console in
the next patch.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The creation of /ibm,skiboot/console/serial@<xyz> nodes is pretty much
identical across the various OPAL console drivers. This patch moves it
into a helper function as a cleanup.
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add more generic support for MMIO based UARTs, simplify code,
use common initialization, and clean up the device-tree
representation as well.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The UART is a simulated ns16550 with memory mapped registers.
A /simics dt node is detected and a SIMICS_QUIRK is added to chip quirks
similar to MAMBO_CALLOUTS. It can contain an ns16550 dt node with a property
console-bar.
The LPC UART code is reused and this will work without an LPC bus in the model.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
uart consoles only flush output when polled. The Linux kernel calls
these pollers frequently, except when in a panic state. As such, panic
messages are not fully printed unless the system is configured to reboot
after panic.
This patch adds a new call to the OPAL API to flush the buffer. If the
system has a uart console (i.e. BMC machines), it will incrementally
flush the buffer, returning if there is more to be flushed or not. If
the system has a different console, the function will have no effect.
This will allow the Linux kernel to ensure that panic message have been
fully printed out.
The existing synchronous flushing mechanism used in OPAL's shutdown and
reboot routines has been refactored into a helper that repeatedly calls
the new partial flush function.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Completely flush the output buffer of the console driver before
power down and reboot. Implements the flushing function for uart
consoles, which includes the astbmc and rhesus platforms.
Adds a new function, flush(), to the con_ops struct that allows
each console driver to specify how their output buffers are flushed.
In the cec_power_down and cec_reboot functions, the flush function
of the driver is called if it exists.
This fixes an issue where some console output is sometimes lost before
power down or reboot in uart consoles. If this issue is also prevalent
in other console types then it can be fixed later by adding a .flush
to that driver's con_ops.
Signed-off-by: Russell Currey <ruscur@russell.cc>
[stewart@linux.vnet.ibm.com: reduce diff size, change flush function name]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
hw/lpc-uart.c:77:25: warning: incorrect type in assignment (different base types)
hw/lpc-uart.c:77:25: expected restricted beint16_t [assigned] [usertype] in_count
hw/lpc-uart.c:77:25: got unsigned char [unsigned] [usertype] in_count
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completely flush the output buffer of the console driver before
power down and reboot. Implements the flushing function for uart
consoles, which includes the astbmc and rhesus platforms.
Adds a new function, flush(), to the con_ops struct that allows
each console driver to specify how their output buffers are flushed.
In the cec_power_down and cec_reboot functions, the flush function
of the driver is called if it exists.
This fixes an issue where some console output is sometimes lost before
power down or reboot in uart consoles. If this issue is also prevalent
in other console types then it can be fixed later by adding a .flush
to that driver's con_ops.
Signed-off-by: Russell Currey <ruscur@russell.cc>
[stewart@linux.vnet.ibm.com: reduce diff size, change flush function name]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
There are now no users of the call_out parameter and future users should
use the log_append_msg() and log_append_data() functions, so remove all
references to call_out.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
his primarily checks whether the caller already holds the corresponding
locks to avoid re-entrancy in some of the deep error path such as when
XSCOM itself triggers an error log. It will be extended in the case of
LPC to also handle known HW error states.
We use them to avoid queuing/polling in the BT driver and to discard
characters in the UART driver.
Note: This will not normally involve a loss of log to the UART as the
UART driver is also protected by the console suspend mechanism. So
this is a safety mechanism only.
This fixes issues where the generation of error logs inside the LPC or
XSCOM drivers could cause a re-entrancy (via the BT interface)
causing deadlocks. Now, the error logs IPMI messages will be queued up
and delivered later on the next poll handler.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
Now that opal.h includes opal-api.h, there are a bunch of files that
include both but don't need to.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
This is probably not the best collection of things in the world,
but it means that opal.h is much closer to being directly usable
by an OS.
This triggers a bunch of #include fixes throughout the tree.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit cf6f4e8912d29fb89ce85c84834607065ad595a5 introduced a platform
independent frontend for error logging. However it failed to move the
generic parts of the fsp-elog.h header into the platform independent
one, instead relying on the fact that up until now fsp-elog.h was
included whenever a function needed to log errors.
This patch moves the platform independent defines into the frontend
header file (errorlog.h) and removes the include of the platform
specific header in generic code paths.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
|
|
| |
That got lost during a rebase ... oops.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
|
|
| |
I accidentally typed uint8_t instead of uint32_t... thanks Joel.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
|
|
| |
And use PR_DEBUG for everything
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some boards are missing an EC for interrupts (or might not have
the FPGA properly flashed). In that case the serial interrupt isn't
working.
We attempt to detect this by enabling all interrupts by default and
when the first one occurs, we mark interrupts as "functional".
Until they are detected as such, we keep all output flushes fully
synchronous.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
| |
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
When THRE is 1, we can write up to 16 bytes, so let's make good
use of it
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|