path: root/mboxd_windows.h
diff options
authorSuraj Jitindar Singh <>2017-04-12 14:26:47 +1000
committerSuraj Jitindar Singh <>2017-04-12 14:42:34 +1000
commitc29172e1734012af7a9b97c5170b9da6a571e343 (patch)
tree5c25e8ba96c68ea0a7539fc19612ec06b8909455 /mboxd_windows.h
parent04e8ffda0daaf1e0dd034a91b421bab2b3eb9723 (diff)
mboxd: Make window size and number optional command line parameters
The window size and number command line parameters are used to control the number of windows and the size of each of the windows in the window cache which the reserved memory region is divided between. Most people won't care about tuning these or just won't know what they refer to. Additionally in the event we change how the window cache works or allow a non-constant window size then the meaning of these becomes unclear. Daemon implementations may also choose to just not implement a cache so making these required parameters may hurt portability. Make the window size and number command line parameters optional rather than required so that they can be largly ignored while people who really care about tuning them can still do so. The default for now is to have windows of size 1MB and to map the entire reserved memory region. That is: number of windows = size of memory region / size of windows This means that the size of the reserved memory region can be reduced and the daemon will adapt to this. Signed-off-by: Suraj Jitindar Singh <> Change-Id: I7c7bbef6e5d31d1372ec3a755877cacc6c135cce
Diffstat (limited to 'mboxd_windows.h')
1 files changed, 2 insertions, 3 deletions
diff --git a/mboxd_windows.h b/mboxd_windows.h
index 90e1d46..b81007d 100644
--- a/mboxd_windows.h
+++ b/mboxd_windows.h
@@ -22,8 +22,8 @@
#define WITH_FLUSH true
/* Initialisation Functions */
-void init_window_state(struct window_context *window, uint32_t size);
-int init_window_mem(struct mbox_context *context);
+int init_windows(struct mbox_context *context);
+void free_windows(struct mbox_context *context);
/* Write From Window Functions */
int write_from_window_v1(struct mbox_context *context,
uint32_t offset_bytes, uint32_t count_bytes);
@@ -31,7 +31,6 @@ int write_from_window(struct mbox_context *context, uint32_t offset,
uint32_t count, uint8_t type);
/* Window Management Functions */
void alloc_window_dirty_bytemap(struct mbox_context *context);
-void free_window_dirty_bytemap(struct mbox_context *context);
int set_window_bytemap(struct mbox_context *context, struct window_context *cur,
uint32_t offset, uint32_t size, uint8_t val);
void close_current_window(struct mbox_context *context, bool set_bmc_event,
OpenPOWER on IntegriCloud