diff options
author | Andres Lugo-Reyes <aalugore@us.ibm.com> | 2016-10-24 18:02:08 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-12-20 00:22:27 -0500 |
commit | bdf8d5b8b6ab68f1882d18b1fad721f465b8aa74 (patch) | |
tree | b8b5eb683ec2c66ae89443516cc57a2d5a5fb8d5 /src/usr/htmgt/occError.C | |
parent | c4692b79f73b6867c76d22e608c4a831d69bdb03 (diff) | |
download | talos-hostboot-bdf8d5b8b6ab68f1882d18b1fad721f465b8aa74.tar.gz talos-hostboot-bdf8d5b8b6ab68f1882d18b1fad721f465b8aa74.zip |
P9 Updates for occ communication code
This commit contains updates for p9 OCC communication
code to no longer use the deprecated
ecmdDataBufferBase class.
Change-Id: I96b6be564a6edee1f66099583f030d3b519acb60
Depends-on: I6182163e569ac97f06e3ddfbb69deab90e849de3
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31876
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/occError.C')
-rw-r--r-- | src/usr/htmgt/occError.C | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/usr/htmgt/occError.C b/src/usr/htmgt/occError.C index 5dc733d99..a83d9b7f7 100644 --- a/src/usr/htmgt/occError.C +++ b/src/usr/htmgt/occError.C @@ -29,11 +29,10 @@ #include "occError.H" #include "htmgt_occcmd.H" -#include <ecmdDataBufferBase.H> #include <occ/occAccess.H> #include <console/consoleif.H> #include <targeting/targplatutil.H> - +#include <variable_buffer.H> namespace HTMGT { @@ -93,19 +92,20 @@ namespace HTMGT errlHndl_t l_errlHndl = NULL; // Read data from SRAM (length must be multiple of 8 bytes) - const uint16_t l_length = (i_length + 8) & 0xFFF8; - uint8_t l_sram_data[8 + l_length]; - ecmdDataBufferBase l_buffer(l_length*8); // convert to bits + const uint16_t l_length = (i_length) & 0xFFF8; + fapi2::variable_buffer l_buffer(l_length*8); //convert to bits // HBOCC is only defined for HTMGT #ifdef CONFIG_HTMGT - l_errlHndl = HBOCC::readSRAM(iv_target, i_address, l_buffer); + l_errlHndl = HBOCC::readSRAM( iv_target, + i_address, + reinterpret_cast<uint64_t*>(l_buffer.pointer()), + l_length ); #endif if (NULL == l_errlHndl) { - const uint32_t l_flatSize = l_buffer.flattenSize(); - l_buffer.flatten(l_sram_data, l_flatSize); - // Skip 8 byte ecmd header - const occErrlEntry_t *l_occElog=(occErrlEntry_t *)&l_sram_data[8]; + + const occErrlEntry_t * l_occElog= reinterpret_cast<occErrlEntry_t*> + (l_buffer.pointer()); TMGT_BIN("OCC ELOG", l_occElog, 256); |