summaryrefslogtreecommitdiffstats
path: root/include/bcm5719_SHM.h
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-06-14 18:53:01 -0600
committerGitHub <noreply@github.com>2021-06-14 18:53:01 -0600
commita22057abb0394d86c382c488ac9b4fb7f52618df (patch)
treebee338fd27972083a389fb889719fb4ac6065fe6 /include/bcm5719_SHM.h
parentc99d0b237253fa1a8d7bd0e2db5843ae49949f5f (diff)
downloadbcm5719-ortega-a22057abb0394d86c382c488ac9b4fb7f52618df.tar.gz
bcm5719-ortega-a22057abb0394d86c382c488ac9b4fb7f52618df.zip
ape: Handle host driver events to improve FreeBSD compatibility. (#222)
This silences the following FreeBSD message: bge0: APE event 0x00020510 send timed out
Diffstat (limited to 'include/bcm5719_SHM.h')
-rw-r--r--include/bcm5719_SHM.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/include/bcm5719_SHM.h b/include/bcm5719_SHM.h
index b775fae..4ceceb9 100644
--- a/include/bcm5719_SHM.h
+++ b/include/bcm5719_SHM.h
@@ -10,7 +10,7 @@
///
////////////////////////////////////////////////////////////////////////////////
///
-/// @copyright Copyright (c) 2020, Evan Lojewski
+/// @copyright Copyright (c) 2021, Evan Lojewski
/// @cond
///
/// All rights reserved.
@@ -457,6 +457,31 @@ typedef register_container RegSHM4028_t {
#endif /* CXX_SIMULATOR */
} RegSHM4028_t;
+#define REG_SHM_DRIVER_BUFFER ((volatile BCM5719_SHM_H_uint32_t*)0xc0014030) /* Communication channel between the host driver and the APE. */
+/** @brief Register definition for @ref SHM_t.DriverBuffer. */
+typedef register_container RegSHMDriverBuffer_t {
+ /** @brief 32bit direct register access. */
+ BCM5719_SHM_H_uint32_t r32;
+#ifdef CXX_SIMULATOR
+ /** @brief Register name for use with the simulator. */
+ const char* getName(void) { return "DriverBuffer"; }
+
+ /** @brief Print register value. */
+ void print(void) { r32.print(); }
+
+ RegSHMDriverBuffer_t()
+ {
+ /** @brief constructor for @ref SHM_t.DriverBuffer. */
+ r32.setName("DriverBuffer");
+ }
+ RegSHMDriverBuffer_t& operator=(const RegSHMDriverBuffer_t& other)
+ {
+ r32 = other.r32;
+ return *this;
+ }
+#endif /* CXX_SIMULATOR */
+} RegSHMDriverBuffer_t;
+
#define REG_SHM_LOADER_COMMAND ((volatile BCM5719_SHM_H_uint32_t*)0xc0014038) /* Command sent when using the the APE loader. Zero once handled. */
#define SHM_LOADER_COMMAND_COMMAND_SHIFT 0u
#define SHM_LOADER_COMMAND_COMMAND_MASK 0xffffffffu
@@ -1590,7 +1615,10 @@ typedef struct SHM_t {
RegSHM4028_t _4028;
/** @brief Reserved bytes to pad out data structure. */
- BCM5719_SHM_H_uint32_t reserved_44[3];
+ BCM5719_SHM_H_uint32_t reserved_44[1];
+
+ /** @brief Communication channel between the host driver and the APE. */
+ RegSHMDriverBuffer_t DriverBuffer[2];
/** @brief Command sent when using the the APE loader. Zero once handled. */
RegSHMLoaderCommand_t LoaderCommand;
@@ -1736,10 +1764,14 @@ typedef struct SHM_t {
SegMessageBufferLength.r32.setComponentOffset(0x20);
_4024.r32.setComponentOffset(0x24);
_4028.r32.setComponentOffset(0x28);
- for(int i = 0; i < 3; i++)
+ for(int i = 0; i < 1; i++)
{
reserved_44[i].setComponentOffset(0x2c + (i * 4));
}
+ for(int i = 0; i < 2; i++)
+ {
+ DriverBuffer[i].r32.setComponentOffset(0x30 + (i * 4));
+ }
LoaderCommand.r32.setComponentOffset(0x38);
LoaderArg0.r32.setComponentOffset(0x3c);
LoaderArg1.r32.setComponentOffset(0x40);
@@ -1821,10 +1853,14 @@ typedef struct SHM_t {
SegMessageBufferLength.print();
_4024.print();
_4028.print();
- for(int i = 0; i < 3; i++)
+ for(int i = 0; i < 1; i++)
{
reserved_44[i].print();
}
+ for(int i = 0; i < 2; i++)
+ {
+ DriverBuffer[i].print();
+ }
LoaderCommand.print();
LoaderArg0.print();
LoaderArg1.print();
OpenPOWER on IntegriCloud