docs: Stipulate register 13 must be written last when writing a response
Writes to register 13 (Response Code) are what is used to generate an
interrupt to the host. On receiving this interrupt the host can start
processing the entire response message. Thus to ensure that the host
is processing the correct mbox response register 13 must be the last
to be written.
Stipulate in the protocol documentation that the last register to be
written by the BMC when writing a response must be the response code
into register 13.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: I2b4e14a81d7bbffc990cfb83321ab219e3df1d82
diff --git a/Documentation/mbox_protocol.md b/Documentation/mbox_protocol.md
index 0e2c687..3907742 100644
--- a/Documentation/mbox_protocol.md
+++ b/Documentation/mbox_protocol.md
@@ -137,6 +137,13 @@
Byte 15: BMC controlled status reg
```
+Note: when the BMC is writing a response to the mbox registers (as described
+above), the "Response Code" (Register 13) must be the last register written to.
+Writing register 13 will trigger an interrupt to the host indicating a complete
+response has been written. Triggering the interrupt by writing register 13
+prior to completing the response may lead to a data race, and must therefore
+be avoided.
+
## Low Level Protocol Flow
What we essentially have is a set of registers which either the host or BMC can