summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorBill Hoffa <wghoffa@us.ibm.com>2018-01-09 08:16:44 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-01-25 17:44:20 -0500
commitcb444552aebafa54ceb0417c12d61cd48fbc65e0 (patch)
tree0668b3062d19ceea3cf3ca626a5a5fcbda1acd1d /src/include/kernel
parentde1c2d1d9e39215b8c7012a0dbfde029de6bec2d (diff)
downloadtalos-hostboot-cb444552aebafa54ceb0417c12d61cd48fbc65e0.tar.gz
talos-hostboot-cb444552aebafa54ceb0417c12d61cd48fbc65e0.zip
Multi-Drawer (IPC) Interrupt/Messaging Support
- Use doorbells instead of IPIs (no IPI support using LSI interupts in the XIVE intr architecture) - New message type from kernel to userspace so the kernel can notify the HB userspace Interrupt Resource Provider (INTRP) that an IPC message was sent to the particular HB instance (in P8 this happened automatically as that was part of the IPI architecture). - Re-enable testcase that validates that an IPC message can be successfully sent. Change-Id: Ic846f8dca45217205ed61d8381a573e995cb16f2 RTC: 150861 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52004 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/doorbell.H10
-rw-r--r--src/include/kernel/intmsghandler.H16
-rw-r--r--src/include/kernel/workitem.H7
3 files changed, 23 insertions, 10 deletions
diff --git a/src/include/kernel/doorbell.H b/src/include/kernel/doorbell.H
index 8275c4fc7..1d01ce119 100644
--- a/src/include/kernel/doorbell.H
+++ b/src/include/kernel/doorbell.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -50,11 +50,11 @@ void doorbell_send(uint64_t i_pir);
*/
void send_doorbell_wakeup(uint64_t i_pir);
-/* TODO RTC 150861
- * send_doorbell_ipc
+/** Send an IPC message using a doorbell
*
- * void send_doorbell_ipc(cpu_t *i_cpu, uint64_t pir);
-**/
+ * @param i_pir - PIR to send IPC message to
+ */
+void send_doorbell_ipc(uint64_t i_pir);
enum
{
diff --git a/src/include/kernel/intmsghandler.H b/src/include/kernel/intmsghandler.H
index 8f7c08559..9e5a001ed 100644
--- a/src/include/kernel/intmsghandler.H
+++ b/src/include/kernel/intmsghandler.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2016 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -73,8 +73,11 @@ class InterruptMsgHdlr : public MessageHandler
ACK_HYPERVISOR_INT_REG_OFFSET = 0x830,
INTP_BAR_VALUE = 0xFFFFE000, // upper 32 bits of IPCBAR
-
INTERPROC_XISR = 2, //IPI XISR is 2
+
+ MSG_KEY_THREAD_WKUP = 0x8000000000000000ul,
+ MSG_KEY_ADD_CPU_CORE = 0x4000000000000000ul,
+ MSG_KEY_IPC_MSG = 0x2000000000000000ul,
};
/**
@@ -156,6 +159,15 @@ class InterruptMsgHdlr : public MessageHandler
static void sendThreadWakeupMsg(uint64_t i_pir);
/**
+ * Send message to interrupt resource provider (intrrP) in userspace to
+ * indicate it was sent an IPC message. The intrrp will re-route the
+ * message to the appropriate handler.
+ *
+ * @param[in] i_pir - The PIR of the CPU to send doorbell to.
+ */
+ static void sendIpcMsg(uint64_t i_pir);
+
+ /**
* Issue the sbe/mailbox workaround (issue a mbox EOI to mailbox)
*
*/
diff --git a/src/include/kernel/workitem.H b/src/include/kernel/workitem.H
index 3a41cc526..6d2f4b6b1 100644
--- a/src/include/kernel/workitem.H
+++ b/src/include/kernel/workitem.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -54,7 +54,6 @@ class CpuWakeupDoorbellWorkItem : public KernelWorkItem
};
-/* TODO RTC 150861
//A work item to be created/executed during an IPC scenario
class IPCDoorbellWorkItem : public KernelWorkItem
@@ -62,7 +61,9 @@ class IPCDoorbellWorkItem : public KernelWorkItem
public:
//Implement operator() function
void operator() (void);
+
+ //No data to clean up, use default destructor
+ ~IPCDoorbellWorkItem() = default;
};
-**/
#endif
OpenPOWER on IntegriCloud