Skip to content

Commit

Permalink
PRD: Fix MemMruMeld parser endianness issue
Browse files Browse the repository at this point in the history
Change-Id: If598246fc976680acfdfc0e0ab3787cfaa693db8
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48452
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48585
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
cnpalmer authored and zane131 committed Oct 20, 2017
1 parent d42c0d2 commit a3be072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C
Expand Up @@ -118,7 +118,8 @@ void addExtMemMruData( const MemoryMru & i_memMru, errlHndl_t io_errl )
BitStringBuffer bsb( sz_buf*8 );
uint32_t curPos = 0;

bsb.setFieldJustify( curPos, 32, extMemMru.mmMeld.u ); curPos+=32;
// TODO RTC 179854
bsb.setFieldJustify( curPos, 32, htonl(extMemMru.mmMeld.u) ); curPos+=32;
bsb.setFieldJustify( curPos, 8, extMemMru.cardType ); curPos+= 8;
bsb.setFieldJustify( curPos, 1, extMemMru.isBufDimm ); curPos+= 1;
bsb.setFieldJustify( curPos, 1, extMemMru.isX4Dram ); curPos+= 1;
Expand Down
5 changes: 4 additions & 1 deletion src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
Expand Up @@ -55,6 +55,7 @@
#include <prdfBitString.H>

#include <hwas/common/hwasCallout.H>
#include <netinet/in.h>

//------------------------------------------------------------------------------
// Data structures
Expand Down Expand Up @@ -791,7 +792,9 @@ bool parseExtMemMru( void * i_buffer, uint32_t i_buflen,

MemoryMruData::ExtendedData extMemMru;

extMemMru.mmMeld.u = bs.getFieldJustify( curPos, 32 ); curPos+=32;
// TODO RTC 179854
extMemMru.mmMeld.u = ntohl( bs.getFieldJustify( curPos, 32 ) );
curPos+=32;
extMemMru.cardType = bs.getFieldJustify( curPos, 8 ); curPos+= 8;
extMemMru.isBufDimm = bs.getFieldJustify( curPos, 1 ); curPos+= 1;
extMemMru.isX4Dram = bs.getFieldJustify( curPos, 1 ); curPos+= 1;
Expand Down

0 comments on commit a3be072

Please sign in to comment.