summaryrefslogtreecommitdiffstats
path: root/windows.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-08-10 00:22:38 +0930
committerAndrew Jeffery <andrew@aj.id.au>2018-09-12 15:05:51 +0930
commit26558dbb00e439fb6ea18566361c0671ea6133f5 (patch)
tree0b26007acd18ee077cf572f6beca90fc2685bfbb /windows.h
parent55260cef8be6d7630087cf07f9d664fb0b40c7c4 (diff)
downloadphosphor-mboxbridge-26558dbb00e439fb6ea18566361c0671ea6133f5.tar.gz
phosphor-mboxbridge-26558dbb00e439fb6ea18566361c0671ea6133f5.zip
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out to their respective header files and include them as necessary. Finally the header file is renamed to better reflect its purpose. Change-Id: I48c409f57d96c844589cd865b24f197477dfe87c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'windows.h')
-rw-r--r--windows.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/windows.h b/windows.h
index 711f77f..1e90066 100644
--- a/windows.h
+++ b/windows.h
@@ -7,7 +7,29 @@
#define WINDOWS_NO_FLUSH false
#define WINDOWS_WITH_FLUSH true
-#include "mbox.h"
+struct mbox_context;
+
+/* Window Dirty/Erase bytemap masks */
+#define WINDOW_CLEAN 0x00
+#define WINDOW_DIRTY 0x01
+#define WINDOW_ERASED 0x02
+
+#define FLASH_OFFSET_UNINIT 0xFFFFFFFF
+
+struct window_context {
+ void *mem; /* Portion of Reserved Memory Region */
+ uint32_t flash_offset; /* Flash area the window maps (bytes) */
+ uint32_t size; /* Window Size (bytes) power-of-2 */
+ uint8_t *dirty_bmap; /* Bytemap of the dirty/erased state */
+ uint32_t age; /* Used for LRU eviction scheme */
+};
+
+struct window_list {
+ uint32_t num;
+ uint32_t max_age;
+ uint32_t default_size;
+ struct window_context *window;
+};
/* Initialisation Functions */
int windows_init(struct mbox_context *context);
OpenPOWER on IntegriCloud