docs: Stipulate that block size must be >= 4K and a power-of-2
Arguments and responses to most commands are given in block size which
is decided on during the version negotiation process when GET_MBOX_INFO
is called.
We require that block size is greater than 4K (12 bit). The lpc bus
address space is 28 bit and commands which return an lpc bus address have
a 16 bit variable space, this means we can correctly specify anywhere in
the lpc address space.
This also allows us to support flash sizes up to 256MB where we can
correctly specify any flash offset in the command arguments.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: Ia08979017a3c0ff229ce412948dc4c67d357e82b
diff --git a/Documentation/mbox_protocol.md b/Documentation/mbox_protocol.md
index c7e0ebc..0e2c687 100644
--- a/Documentation/mbox_protocol.md
+++ b/Documentation/mbox_protocol.md
@@ -368,8 +368,19 @@
### Commands in detail
-Note in V1 block size is hard coded to 4K, in V2 it is variable and must be
-queried with GET_MBOX_INFO.
+Block size refers to an agreed value which is used as a unit for the
+arguments of various commands and responses. Having a block size multiplier
+allows us to specify larger values with fewer command and response fields.
+
+In V1 block size is hard coded to 4K.
+In V2 it is variable and must be queried with the GET_MBOX_INFO command.
+Note that for simplicity block size must always be a power-of-2.
+Block size must also be greater than or equal to 4K. This is due to the
+fact that we have a 28-bit LPC address space and commands which return an
+LPC address do so in 16 bits, thus we need at least a 12-bit unit to ensure
+that we can specify the entire address space. This additionally allows us
+to specify flash addresses of at least 256MB.
+
Sizes and addresses are specified in either bytes - (bytes)
or blocks - (blocks)
Sizes and addresses specified in blocks must be converted to bytes by