Skip to content

Commit

Permalink
Update HDAT flags to indicate memory dump
Browse files Browse the repository at this point in the history
On all OpenPOWER MPIPLs there is a memory dump
present.  Update HDAT flags to inidicate so

Change-Id: I3cc124a7c041c96d6c1b7af960271f149d7e1719
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/90637
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
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>
Reviewed-by: Jayashankar Padath <jayashankar.padath@in.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sannerd authored and dcrowell77 committed Mar 4, 2020
1 parent 01b7ddf commit c16b087
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 18 deletions.
25 changes: 21 additions & 4 deletions src/usr/hdat/hdatiplparms.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* Contributors Listed Below - COPYRIGHT 2016,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -966,17 +966,34 @@ void hdatGetMnfgFlags(hdatManf_t &o_hdatManfFlags)
*/
void hdatGetPlatformDumpData(hdatDump_t &o_hdatDump)
{

o_hdatDump.hdatReserved2 = 0;
o_hdatDump.hdatHypDumpPolicy = 0;
memset(o_hdatDump.hdatReserved3, 0 , sizeof(o_hdatDump.hdatReserved3));
o_hdatDump.hdatMaxHdwSize = 0;
o_hdatDump.hdatActHdwSize = 0;
o_hdatDump.hdatMaxSpSize = 0;

o_hdatDump.hdatFlags = 0;
o_hdatDump.hdatFlags = 0x0;

//For the current OpenPOWER P9 systems (where hostboot
// builds the HDAT) anytime we do an MPIPL there
//will a memory dump. Use the HDAT flags to indicate this
//Note that in the future there will be MPIPLs that
//are not dumps -- but will deal with that when the function
//has been added
// flags - set hdatRptPending, hdatMemDumpExists, hdatMemDumpReq:
TargetService& l_targetService = targetService();
Target* l_sys = nullptr;
l_targetService.getTopLevelTarget(l_sys);
if(l_sys->getAttr<ATTR_IS_MPIPL_HB>())
{
o_hdatDump.hdatRptPending = 0x1;
o_hdatDump.hdatMemDumpExists = 0x1;
o_hdatDump.hdatMemDumpReq = 0x1;
}

o_hdatDump.hdatDumpId = 0;
o_hdatDump.hdatActPlatformDumpSize = 0;
o_hdatDump.hdatActPlatformDumpSize = 0; // PHYP/OPAL can query from MDRT
o_hdatDump.hdatPlid = 0;

}
Expand Down
34 changes: 20 additions & 14 deletions src/usr/hdat/hdatiplparms.H
Expand Up @@ -191,21 +191,27 @@ struct hdatIplSpPvt_t
*/
struct hdatDump_t
{
union {uint16_t hdatFlags; // word view unioned with bit view
uint16_t hdatRptPending : 1, // 1 = A dump exists and is
// waiting to be extracted
hdatHdwDumpExists : 1, // 1 = Hardware dump exists
hdatMemDumpExists : 1, // 1 = Memory dump exists
hdatHdwDumpErrs : 1, // 1 = Errors occurred during
// hardware dump collection
hdatMemDumpErrs : 1, // 1 = Errors occurred during
union
{
uint16_t hdatFlags; // word view unioned with bit view
struct
{
uint16_t hdatRptPending : 1; // 1 = A dump exists and is
// waiting to be extracted
uint16_t hdatHdwDumpExists : 1; // 1 = Hardware dump exists
uint16_t hdatMemDumpExists : 1; // 1 = Memory dump exists
uint16_t hdatHdwDumpErrs : 1; // 1 = Errors occurred during
// hardware dump collection
uint16_t hdatMemDumpErrs : 1; // 1 = Errors occurred during
// memory dump collection
hdatHdwDumpReq : 1, // 1 = Hardware dump requested
hdatMemDumpReq : 1, // 1 = Memory dump requested
hdatUserReq : 1, // 1 = User requested the dump
hdatErrReq : 1, // 1 = Hardware or software
// error caused the dump
hdatReserved1 : 7;}; // Reserved for future use
uint16_t hdatHdwDumpReq : 1; // 1 = Hardware dump requested
uint16_t hdatMemDumpReq : 1; // 1 = Memory dump requested
uint16_t hdatUserReq : 1; // 1 = User requested the dump
uint16_t hdatErrReq : 1; // 1 = Hardware or software
// error caused the dump
uint16_t hdatReserved1 : 7; // Reserved for future use
} PACKED;
};
uint8_t hdatReserved2;
uint8_t hdatHypDumpPolicy;
uint32_t hdatDumpId;
Expand Down

0 comments on commit c16b087

Please sign in to comment.