diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/kernel/hbdescriptor.H | 5 | ||||
-rw-r--r-- | src/include/kernel/ipc.H | 41 | ||||
-rw-r--r-- | src/include/sys/msg.h | 3 | ||||
-rw-r--r-- | src/include/usr/intr/interrupt.H | 7 | ||||
-rw-r--r-- | src/include/usr/mbox/mbox_reasoncodes.H | 6 | ||||
-rw-r--r-- | src/include/usr/mbox/mboxif.H | 67 |
6 files changed, 97 insertions, 32 deletions
diff --git a/src/include/kernel/hbdescriptor.H b/src/include/kernel/hbdescriptor.H index e90861a48..e5c6a9c0f 100644 --- a/src/include/kernel/hbdescriptor.H +++ b/src/include/kernel/hbdescriptor.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -30,9 +30,12 @@ struct HB_TI_DataArea; +namespace KernelIpc { struct ipc_data_area_t; }; + struct HB_Descriptor { HB_TI_DataArea *TI_DataAreaPtr; // ptr to the TI data area structure + KernelIpc::ipc_data_area_t *IPC_DataAreaPtr; // ptr to the IPC data area }; #endif /* __KERNEL_HBDESCRIPTOR_H */ diff --git a/src/include/kernel/ipc.H b/src/include/kernel/ipc.H new file mode 100644 index 000000000..a67ea5463 --- /dev/null +++ b/src/include/kernel/ipc.H @@ -0,0 +1,41 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/kernel/ipc.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#if !defined(__IPC_H) +#define __IPC_H + +#include <sys/msg.h> + +namespace KernelIpc +{ +struct ipc_data_area_t +{ + uint64_t msg_queue_id; + msg_t msg_payload; + uint64_t hrmor_base; + uint32_t pir; +}; + +extern ipc_data_area_t ipc_data_area; +}; + +#endif diff --git a/src/include/sys/msg.h b/src/include/sys/msg.h index 9fadd8b70..b9ff8f513 100644 --- a/src/include/sys/msg.h +++ b/src/include/sys/msg.h @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* COPYRIGHT International Business Machines Corp. 2010,2013 */ /* */ /* p1 */ /* */ @@ -71,6 +71,7 @@ enum msg_root_queue_types_t { MSGQ_ROOT_VFS, MSGQ_ROOT_INTR, + MSGQ_TYPE_IPC = 0x08, //!< Value is OR'd with the physical node number }; /** @var msg_sys_types_t::MSG_MM_RP_READ diff --git a/src/include/usr/intr/interrupt.H b/src/include/usr/intr/interrupt.H index 2ac07cc15..cf129712a 100644 --- a/src/include/usr/intr/interrupt.H +++ b/src/include/usr/intr/interrupt.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -67,6 +67,7 @@ namespace INTR ISN_LCL_ERR = 4, ISN_HOST = 5, ISN_INTERPROC = 0xF0, //"special" as it isn't part of PSIHB + //Converts to INTERPROC_XISR when registered }; /** @@ -119,7 +120,9 @@ namespace INTR * * @note the interrupt type is currently the ISN value in the PSIHB * XIVR register - * @see i_intr_type for enumerations. + * @see ISNvalue_t for enumerations. + * The XISR value is calculated and registered for all chips + * presently capable of generaing interrupts. * * @note when an interrupt of type i_msg_type occurrs, the * interrupt presenter sends a sync message with type i_msg_type to diff --git a/src/include/usr/mbox/mbox_reasoncodes.H b/src/include/usr/mbox/mbox_reasoncodes.H index 424b0ad13..4760d1de1 100644 --- a/src/include/usr/mbox/mbox_reasoncodes.H +++ b/src/include/usr/mbox/mbox_reasoncodes.H @@ -39,7 +39,9 @@ namespace MBOX MOD_MBOXSRV_FSP_MSG = 0x07, // MailboxSp::handle_hbmbox_msg MOD_MBOXSRV_SENDMSG = 0x08, // MailboxSp::send_msg MOD_MBOXSRV_INIT = 0x09, // MailboxSp::_init - MOD_MBOXSRC_UNCLAIMED = 0x0A, // MailboxSp::invalidMsgResponder + MOD_MBOXSRC_UNCLAIMED = 0x0A, // MailboxSp::handleUnclaimed + MOD_MBOX_SEND = 0x0B, // MBOX::send + MOD_MBOXSRV_IPC_MSG = 0x0C, // MailboxSp::handleIPC }; enum MBOXReasonCode @@ -60,6 +62,8 @@ namespace MBOX RC_INVALID_DMA_LENGTH = MBOX_COMP_ID | 0x0E, RC_KERNEL_REG_FAILED = MBOX_COMP_ID | 0x0F, RC_MAILBOX_DISABLED = MBOX_COMP_ID | 0x10, + RC_IPC_INVALID_NODE = MBOX_COMP_ID | 0x11, + RC_MSG_SEND_ERROR = MBOX_COMP_ID | 0x12, }; diff --git a/src/include/usr/mbox/mboxif.H b/src/include/usr/mbox/mboxif.H index d427e5e28..a8609a31f 100644 --- a/src/include/usr/mbox/mboxif.H +++ b/src/include/usr/mbox/mboxif.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/mbox/mboxif.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/mbox/mboxif.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __MBOX_MBOXIF_H #define __MBOX_MBOXIF_H @@ -30,6 +29,11 @@ namespace MBOX { + enum + { + MBOX_NODE_FSP = -1, + }; + /** * Register a message queue to receive mailbox messages * @param[in] i_queueu_id, The queue identifier @@ -50,20 +54,29 @@ namespace MBOX * Send message asynchronously * @param[in] i_q_id id, of the FSP message queue to send the msg to. * @param[in] i_msg. The message to send. + * @param[in] i_node The destination node [0-7] for IPC messages, + * otherwise the default is FSP * * @return errlHndl_t on error. * - * @pre i_msg->extra_data == NULL If there is no extra data is associated - * with the message. + * @note extra_data payload is not supported for interprocessor + * communication(IPC) messages therefore the i_msg->extra_data field + * may be used as another user data field + * + * @pre For FSP mbox messages, i_msg->extra_data must be NULL If there is + * no payload associated with the message. * - * @pre i_msg->extra_data = malloc(size); i_msg->data[1] = size; + * @pre For FSP mbox messages, + * i_msg->extra_data = malloc(size); i_msg->data[1] = size; * Any extra data associated with i_msg was obtained from the heap * using malloc and i_msg->data[1] contains the length of that data. * * @post free(i_msg->extra_dat) was done (if no error) * @post msg_free(i_msg) was done (if no error) */ - errlHndl_t send(queue_id_t i_q_id, msg_t * i_msg); + errlHndl_t send(queue_id_t i_q_id, + msg_t * i_msg, + int i_node = MBOX_NODE_FSP); /** * Send message synchronously |