summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2017-04-26 14:38:46 +1000
committerSuraj Jitindar Singh <sjitindarsingh@gmail.com>2017-05-03 15:48:27 +1000
commit5a26e025a5d576e8c45d25595484008cb2d09172 (patch)
tree5dad4f894363ac6e68077b24487f38ffa0b608a0 /Documentation
parentfaeb88c02e32d5328380d5869772c1d7ba9b3f8a (diff)
downloadphosphor-mboxd-5a26e025a5d576e8c45d25595484008cb2d09172.tar.gz
phosphor-mboxd-5a26e025a5d576e8c45d25595484008cb2d09172.zip
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
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/mbox_protocol.md15
1 files changed, 13 insertions, 2 deletions
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 @@ WINDOW_ERROR - Command not valid for active window or no active window
### 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
OpenPOWER on IntegriCloud