Skip to content

Commit

Permalink
dump: Copy data type field from MDST table to MDRT table
Browse files Browse the repository at this point in the history
In case of OPAL system MDST and MDDT contains entries from multiple sources
(OPAL, kernel, etc,). Post MPIPL OPAL needs a way to differentiate between
them. Hence copy type field from MDST table to MDRT table.

Change-Id: I3f196cdc58e7376d7743188d0a6b76c99799b5ad
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57600
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>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Vasant Hegde authored and dcrowell77 committed Apr 21, 2018
1 parent 9a3aa40 commit b90ed8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/include/usr/dump/dumpif.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
Expand Down Expand Up @@ -101,7 +103,8 @@ namespace DUMP
struct dumpEntry
{
uint64_t dataAddr;
uint32_t reserved;
uint16_t data_type; // Used by payload
uint16_t reserved;
uint32_t dataSize;
} PACKED;

Expand Down
9 changes: 9 additions & 0 deletions src/usr/dump/dumpCollect.C
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,15 @@ errlHndl_t copySrcToDest(dumpEntry *srcTableEntry,
resultsTableEntry->destAddr =
VmmManager::FORCE_PHYS_ADDR|curDestTableAddr;
resultsTableEntry->dataSize = sizeToCopy;
// Size field in source/destination table is of 4 bytes.
// So result table size field will never cross 4 bytes.
// Hence use top 2 bytes to copy data_type from source
// table to result table (see HDAT spec for details).
if (TARGETING::is_sapphire_load())
{
uint64_t data_type = srcTableEntry[curSourceIndex].data_type;
resultsTableEntry->dataSize |= (data_type << 48);
}
resultsTableEntry++;
l_resultCount++;
curResultIndex++;
Expand Down

0 comments on commit b90ed8f

Please sign in to comment.