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 <sjitindarsingh@gmail.com>
Change-Id: I7c7bbef6e5d31d1372ec3a755877cacc6c135cce
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 @@
 		      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,