diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-09-13 14:45:24 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-09-13 19:00:22 +1000 |
commit | 6971e07dd7b17e4ea8aa93a09c6c474ef5b95528 (patch) | |
tree | 11bd7083fc18dc2438b32c8832657978db3bda28 | |
parent | b841d26d11a637b92ca397921fd7facbb8609dfa (diff) | |
download | skiboot-6971e07dd7b17e4ea8aa93a09c6c474ef5b95528.zip skiboot-6971e07dd7b17e4ea8aa93a09c6c474ef5b95528.tar.gz skiboot-6971e07dd7b17e4ea8aa93a09c6c474ef5b95528.tar.bz2 |
xscom: Initialize the data to a known value in xscom_read
In case of error, don't leave the data random. It helps debugging when
the user fails to check the error code. This happens due to a bug in the
PRD wrapper app.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from commit be4843f47baa5f1b36c2c6e7ad6bc4743a8bc43f)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/xscom.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -400,6 +400,13 @@ int xscom_read(uint32_t partid, uint64_t pcb_addr, uint64_t *val) uint32_t gcid; int rc; + /* Due to a bug in some versions of the PRD wrapper app, errors + * might not be properly forwarded to PRD, in which case the data + * set here will be used. Rather than a random value let's thus + * initialize the data to a known clean state. + */ + *val = 0xdeadbeefdeadbeefull; + /* Handle part ID decoding */ switch(partid >> 28) { case 0: /* Normal processor chip */ |