diff options
author | Martin Peschke <mpeschke@de.ibm.com> | 2017-03-01 18:21:45 +0100 |
---|---|---|
committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 17:12:29 -0500 |
commit | 49bddd5d800694edade0ff6b3194f2d50fda1381 (patch) | |
tree | aebdaa8d87b50dd5250e17c591ead6ae6e0eae2d /import | |
parent | 1aa0b0e4b6b67020954cd27e155aeab8a1c0b560 (diff) | |
download | talos-hcode-49bddd5d800694edade0ff6b3194f2d50fda1381.tar.gz talos-hcode-49bddd5d800694edade0ff6b3194f2d50fda1381.zip |
p9_tor: fix some random bytes in TOR image
There are 4 padding bytes needed for an 8 byte alignment at the end
of the TOR slot array for PERV common rings, which sometimes
exhibited non-zero content. These could have been mistaken as
valid offsets pointing to rings that didn't exist in the image,
if a users assumed a 16th PERV common ring, which might be added
in the future.
The original code used an array and a loop - which didn't account
for padding bytes - to zero all slots. A following memcpy() - which
accounted for padding bytes - copied bytes beyound the array boundary.
This code was a total mess anyway, and hence it is replaced by single
memset(), which uses a corrected size value.
This problem was only found in the function used for ring slots.
Nevertheless, similar code has been cleaned up for two other
use cases.
Change-Id: I1c81518ff81a6af735240090cdbc7735f60f3edb
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37287
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@de.ibm.com>
Diffstat (limited to 'import')
-rw-r--r-- | import/chips/p9/utils/imageProcs/p9_tor.H | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/import/chips/p9/utils/imageProcs/p9_tor.H b/import/chips/p9/utils/imageProcs/p9_tor.H index 99ca5d56..364f4146 100644 --- a/import/chips/p9/utils/imageProcs/p9_tor.H +++ b/import/chips/p9/utils/imageProcs/p9_tor.H @@ -56,6 +56,12 @@ typedef struct uint32_t TorPpeBlockSize; } TorPpeBlock_t; +typedef struct +{ + uint32_t commonOffset; + uint32_t instanceOffset; +} TorCpltBlock_t; + typedef uint16_t TorRingOffset_t; // Ring offset value in TOR offset slot #define TOR_SUCCESS 0 |