diff options
| author | Andrew Scull <ascull@google.com> | 2018-02-22 11:09:51 -0800 |
|---|---|---|
| committer | Andrew Scull <ascull@google.com> | 2018-07-10 09:52:48 +0000 |
| commit | 3fc6cfe7fb41ba2c32bad0c71c140795cee2afad (patch) | |
| tree | d853bab29e91fce814d906ca84bd16967f361453 /libnos/debug.cpp | |
| parent | da210ea117fc8fb46d60be3f06768820fbe4fa12 (diff) | |
| download | platform_external_nos_host_generic-3fc6cfe7fb41ba2c32bad0c71c140795cee2afad.tar.gz platform_external_nos_host_generic-3fc6cfe7fb41ba2c32bad0c71c140795cee2afad.tar.bz2 platform_external_nos_host_generic-3fc6cfe7fb41ba2c32bad0c71c140795cee2afad.zip | |
Transport protocol v1 -- master
This adds CRC-16 checksums for the call_application() function. The
command from the master includes and additional packet containing the
CRC which the slave can verify. The status from the slave after an app
has processed the command included the CRC of the reply data and the
status message itself.
The protocol is backward compatible by detecting the v0 protocol
from the status response and ignoring any CRCs.
In the event of a CRC failure when reading the status or response data,
the read operation is retried 3 times. In the event of a CRC failure of
the request, the transaction is restarted a maximum of 3 times.
Bug: 66104849
Bug: 80133226
Test: TransportTest
Test: Update Android and unlock, update Citadel and can still unlock,
reboot and unlock again
Change-Id: If0d37ee492ecddcc17c4dbde3ca992698a48a5e7
Diffstat (limited to 'libnos/debug.cpp')
| -rw-r--r-- | libnos/debug.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libnos/debug.cpp b/libnos/debug.cpp index b3db787..2bd49bd 100644 --- a/libnos/debug.cpp +++ b/libnos/debug.cpp @@ -32,6 +32,8 @@ std::string StatusCodeString(uint32_t code) { ErrorString_helper(APP_ERROR_TOO_MUCH) ErrorString_helper(APP_ERROR_IO) ErrorString_helper(APP_ERROR_RPC) + ErrorString_helper(APP_ERROR_CHECKSUM) + ErrorString_helper(APP_ERROR_BUSY) default: if (code >= APP_LINE_NUMBER_BASE && code < MAX_APP_STATUS) { return "APP_LINE_NUMBER " + std::to_string(code - APP_LINE_NUMBER_BASE); |
