aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2015-12-18 17:15:36 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-01-12 12:13:32 +1100
commitf2efc652cbad6b32e1f0295aac819f6062777e31 (patch)
treeded31817c9ce70d1fb454134a45ffdbb13cb97b2 /doc
parentd4b142823e28deed097cf79b25d8d1e60b6f4e67 (diff)
downloadskiboot-f2efc652cbad6b32e1f0295aac819f6062777e31.zip
skiboot-f2efc652cbad6b32e1f0295aac819f6062777e31.tar.gz
skiboot-f2efc652cbad6b32e1f0295aac819f6062777e31.tar.bz2
Add OPAL_CONSOLE_FLUSH to the OPAL API
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/opal-api/opal-console-read-write-1-2.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/opal-api/opal-console-read-write-1-2.txt b/doc/opal-api/opal-console-read-write-1-2.txt
index b8fbc12..26f9a16 100644
--- a/doc/opal-api/opal-console-read-write-1-2.txt
+++ b/doc/opal-api/opal-console-read-write-1-2.txt
@@ -1,11 +1,12 @@
OPAL Console calls
------------------
-There are three OPAL calls relating to the OPAL console:
+There are four OPAL calls relating to the OPAL console:
#define OPAL_CONSOLE_WRITE 1
#define OPAL_CONSOLE_READ 2
#define OPAL_CONSOLE_WRITE_BUFFER_SPACE 25
+#define OPAL_CONSOLE_FLUSH 117
The OPAL console calls can support multiple consoles. Each console MUST
be represented in the device tree.
@@ -64,3 +65,16 @@ Returns:
OPAL_CLOSED
Use OPAL_POLL_EVENTS for how to determine
+
+OPAL_CONSOLE_FLUSH
+------------------
+
+Parameters:
+ int64_t term_number
+
+Returns:
+ OPAL_SUCCESS
+ OPAL_UNSUPPORTED - the console does not implement a flush call
+ OPAL_PARAMETER - invalid term_number
+ OPAL_PARTIAL - more to flush, call again
+ OPAL_BUSY - nothing was flushed this call