From e0b0971df339db785cbee4dd5ab0977aefece805 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 27 Feb 2015 17:11:06 +0800 Subject: 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 Vaidyanathan Srinivasan Signed-off-by: Jeremy Kerr Signed-off-by: Neelesh Gupta Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Stewart Smith --- platforms/astbmc/habanero.c | 2 ++ platforms/astbmc/palmetto.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'platforms') diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c index 0ec867f..8575be5 100644 --- a/platforms/astbmc/habanero.c +++ b/platforms/astbmc/habanero.c @@ -38,6 +38,8 @@ static bool habanero_probe(void) /* Lot of common early inits here */ astbmc_early_init(); + prd_init(); + return true; } diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c index 3435d0b..dee2b06 100644 --- a/platforms/astbmc/palmetto.c +++ b/platforms/astbmc/palmetto.c @@ -39,6 +39,8 @@ static bool palmetto_probe(void) /* Lot of common early inits here */ astbmc_early_init(); + prd_init(); + return true; } -- cgit v1.1