aboutsummaryrefslogtreecommitdiff
path: root/hw/prd.c
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-05-26 14:37:05 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-08 17:24:10 +1000
commita0811f87b84e71c7314d0fd92c34e9715b400817 (patch)
tree4787af3a3f2dcf3f3267b3ed056a8d7ed5f992fb /hw/prd.c
parent9e888546f1ec322ac74b1e58b670d294ae3ea4fc (diff)
downloadskiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.zip
skiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.tar.gz
skiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.tar.bz2
SBE: Add passthrough command support
SBE sends passthrough command. We have to capture this interrupt and send event to HBRT via opal-prd (user space daemon). This patch adds minimal SBE code to capture SBE interrupt and send event to opal-prd. Next patch will add opal-prd (user space) support. CC: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/prd.c')
-rw-r--r--hw/prd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/prd.c b/hw/prd.c
index 96dc862..d076c19 100644
--- a/hw/prd.c
+++ b/hw/prd.c
@@ -28,6 +28,7 @@ enum events {
EVENT_ATTN = 1 << 0,
EVENT_OCC_ERROR = 1 << 1,
EVENT_OCC_RESET = 1 << 2,
+ EVENT_SBE_PASSTHROUGH = 1 << 3,
};
static uint8_t events[MAX_CHIPS];
@@ -109,6 +110,10 @@ static void prd_msg_consumed(void *data)
break;
case OPAL_PRD_MSG_TYPE_FIRMWARE_RESPONSE:
break;
+ case OPAL_PRD_MSG_TYPE_SBE_PASSTHROUGH:
+ proc = msg->sbe_passthrough.chip;
+ event = EVENT_SBE_PASSTHROUGH;
+ break;
default:
prlog(PR_ERR, "PRD: invalid msg consumed, type: 0x%x\n",
msg->hdr.type);
@@ -180,6 +185,9 @@ static void send_next_pending_event(void)
prd_msg->hdr.type = OPAL_PRD_MSG_TYPE_OCC_RESET;
prd_msg->occ_reset.chip = proc;
occ_msg_queue_occ_reset();
+ } else if (event & EVENT_SBE_PASSTHROUGH) {
+ prd_msg->hdr.type = OPAL_PRD_MSG_TYPE_SBE_PASSTHROUGH;
+ prd_msg->sbe_passthrough.chip = proc;
}
/*
@@ -266,6 +274,11 @@ void prd_occ_reset(uint32_t proc)
prd_event(proc, EVENT_OCC_RESET);
}
+void prd_sbe_passthrough(uint32_t proc)
+{
+ prd_event(proc, EVENT_SBE_PASSTHROUGH);
+}
+
/* incoming message handlers */
static int prd_msg_handle_attn_ack(struct opal_prd_msg *msg)
{