summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2012-02-17 15:50:22 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-06 10:18:58 -0600
commitf538d4cbe355a98be2675468da6f3a24078893e8 (patch)
tree2eca68492641c61f8714f6d7ed790ece29a1e969 /src/include
parent18036e00119f1b3757678331173a02eb71b5d179 (diff)
downloadtalos-hostboot-f538d4cbe355a98be2675468da6f3a24078893e8.tar.gz
talos-hostboot-f538d4cbe355a98be2675468da6f3a24078893e8.zip
Base Mailbox device driver read/write function
Change-Id: I71cee7950d4dff6279422b6ee7fbcc94dcfaf8df Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/679 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/devicefw/userif.H13
-rw-r--r--src/include/usr/hbotcompid.H9
-rw-r--r--src/include/usr/mbox/mbox_reasoncodes.H46
-rw-r--r--src/include/usr/mbox/mboxif.H41
4 files changed, 101 insertions, 8 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 336bce720..8d95db3a9 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -63,12 +63,6 @@ namespace DeviceFW
#define DEVICE_PRESENT_ADDRESS() \
DeviceFW::PRESENT
- /** Construct the device addressing parameters for FSI device ops.
- * @param[in] i_address - FSI address to operate on.
- */
- #define DEVICE_FSI_ADDRESS(i_address) \
- DeviceFW::FSI, static_cast<uint64_t>((i_address))
-
/**
* Construct a PNOR DD address
* address = 0000_0000_0000_000c_aaaa_aaaa_aaaa_aaaa
@@ -94,6 +88,13 @@ namespace DeviceFW
#define DEVICE_SPD_ADDRESS( i_keyword )\
DeviceFW::SPD, static_cast<uint64_t>(( i_keyword ))
+ /**
+ * Construct the device addressing parameters for the MAILBOX device.
+ * @param[out] o_status - Set with all available status bits
+ * from MBOX::MboxReadStatus
+ */
+ #define DEVICE_MBOX_ADDRESS(o_status) \
+ DeviceFW::MAILBOX, static_cast<uint64_t*>((o_status))
/**
* @brief Perform a hardware read operation.
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 0c36827a3..6e812ea5b 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -170,7 +170,6 @@ const compId_t INTR_COMP_ID = 0x0F00;
const char INTR_COMP_NAME[] = "intr";
//@}
-
/** @name SPD
* EEPROM device driver component
*/
@@ -179,6 +178,13 @@ const compId_t SPD_COMP_ID = 0x1000;
const char SPD_COMP_NAME[] = "spd";
//@}
+/** @name MBOX
+ * MBOX component
+ */
+//@{
+const compId_t MBOX_COMP_ID = 0x1100;
+const char MBOX_COMP_NAME[] = "mbox";
+//@}
/** @name RESERVED
* Reserved component ID. x3100 is the component ID
@@ -189,7 +195,6 @@ const char SPD_COMP_NAME[] = "spd";
//@{
const compId_t RESERVED_COMP_ID = 0x3100;
const char RESERVED_COMP_NAME[] = "reserved";
-//@}
// ----------------------------------------------------------
// CXXTEST Unit Test, reserve compid near the end...
diff --git a/src/include/usr/mbox/mbox_reasoncodes.H b/src/include/usr/mbox/mbox_reasoncodes.H
new file mode 100644
index 000000000..126eb2f75
--- /dev/null
+++ b/src/include/usr/mbox/mbox_reasoncodes.H
@@ -0,0 +1,46 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/include/usr/mbox/mbox_reasoncodes.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
+#ifndef __MBOX_REASONCODES_H
+#define __MBOX_REASONCODES_H
+
+#include <hbotcompid.H>
+
+namespace MBOX
+{
+ enum MBOXModuleId
+ {
+ MOD_MBOXDD_INVALID = 0x00, /**< Zero is an invalid module id */
+ MOD_MBOXDD_READ = 0x01,
+ MOD_MBOXDD_WRITE = 0x02,
+ };
+
+ enum MBOXReasonCode
+ {
+ RC_INVALID_LENGTH = MBOX_COMP_ID | 0x01,
+ RC_INVALID_MESSAGE_TYPE = MBOX_COMP_ID | 0x02,
+ RC_NO_PERM_TO_SEND = MBOX_COMP_ID | 0x03,
+ RC_MSG_PENDING = MBOX_COMP_ID | 0x04,
+ };
+};
+
+#endif
diff --git a/src/include/usr/mbox/mboxif.H b/src/include/usr/mbox/mboxif.H
new file mode 100644
index 000000000..214f73c37
--- /dev/null
+++ b/src/include/usr/mbox/mboxif.H
@@ -0,0 +1,41 @@
+// 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
+#ifndef __MBOX_MBOXIF_H
+#define __MBOX_MBOXIF_H
+
+namespace MBOX
+{
+ static const uint32_t MBOX_MAX_DATA_BYTES = 64; //16 32-bit Data Registers
+
+ enum MboxReadStatus {
+ MBOX_ABORT_LAST_MSG = 0x00000040, /* Cancel Timed Out Operation */
+ MBOX_DOORBELL_ERROR = 0x00000010, /* Error Set In Error Register */
+ MBOX_XDN_ACK = 0x00000004, /* LBUS Data Acknowledgment */
+ MBOX_DATA_PENDING = 0x00000001, /* PIB Data Pending */
+ MBOX_ILLEGAL_OP = 0x08000000, /* Illegal Operation Attempted */
+ MBOX_DATA_WRITE_ERR = 0x04000000, /* Write Full LBUS Mailbox Error */
+ MBOX_DATA_READ_ERR = 0x02000000, /* Read Empty LBUS Mailbox Error */
+ MBOX_PARITY_ERR = 0x01000000, /* LBUS RAM Parity Error Detected */
+ };
+};
+#endif
OpenPOWER on IntegriCloud