diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-02-27 17:11:06 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-04 13:06:11 +1100 |
commit | e0b0971df339db785cbee4dd5ab0977aefece805 (patch) | |
tree | 53bf8230f317ae6dd3d5f95a6082750d3a79197c /doc | |
parent | 9fca7b3ed4297c4de6ab38a39480b3873ad9eab8 (diff) | |
download | skiboot-e0b0971df339db785cbee4dd5ab0977aefece805.zip skiboot-e0b0971df339db785cbee4dd5ab0977aefece805.tar.gz skiboot-e0b0971df339db785cbee4dd5ab0977aefece805.tar.bz2 |
hw/prd: Add firmware PRD handling subsystem
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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/opal-api/opal-messages.txt | 45 | ||||
-rw-r--r-- | doc/opal-api/opal-prd-msg-113.txt | 11 |
2 files changed, 56 insertions, 0 deletions
diff --git a/doc/opal-api/opal-messages.txt b/doc/opal-api/opal-messages.txt index 448e9c7..1091d8b 100644 --- a/doc/opal-api/opal-messages.txt +++ b/doc/opal-api/opal-messages.txt @@ -77,3 +77,48 @@ perform a shutdown in the future. The host OS can use the separate API OPAL_GET_DPO_STATUS to query OPAL for the number of seconds before a forced shutdown will occur. + +OPAL_MSG_PRD +------------ + +This message is a OPAL-to-HBRT notification, and contains a +struct opal_prd_msg: + + enum opal_prd_msg_type { + OPAL_PRD_MSG_TYPE_INIT = 0, /* HBRT --> OPAL */ + OPAL_PRD_MSG_TYPE_FINI, /* HBRT --> OPAL */ + OPAL_PRD_MSG_TYPE_ATTN, /* HBRT <-- OPAL */ + OPAL_PRD_MSG_TYPE_ATTN_ACK, /* HBRT --> OPAL */ + OPAL_PRD_MSG_TYPE_OCC_ERROR, /* HBRT <-- OPAL */ + OPAL_PRD_MSG_TYPE_OCC_RESET, /* HBRT <-- OPAL */ + }; + + struct opal_prd_msg { + uint8_t type; + uint8_t pad[3]; + __be32 token; + union { + struct { + __be64 version; + __be64 ipoll; + } init; + struct { + __be64 proc; + __be64 ipoll_status; + __be64 ipoll_mask; + } attn; + struct { + __be64 proc; + __be64 ipoll_ack; + } attn_ack; + struct { + __be64 chip; + } occ_error; + struct { + __be64 chip; + } occ_reset; + }; + }; + +Responses from the kernel use the same message format, but are passed +through the opal_prd_msg call. diff --git a/doc/opal-api/opal-prd-msg-113.txt b/doc/opal-api/opal-prd-msg-113.txt new file mode 100644 index 0000000..b41f17e --- /dev/null +++ b/doc/opal-api/opal-prd-msg-113.txt @@ -0,0 +1,11 @@ + +OPAL_PRD_MSG call +------------- + +The OPAL_PRD_MSG call is used to pass a struct opal_prd_msg from the HBRT +code into opal, and is paired with the OPAL_PRD_MSG message type. + +Parameters: + struct opal_msg *msg + +Passes an opal_msg, of type OPAL_PRD_MSG, from the OS to OPAL. |