diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-02-01 12:14:23 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-02-01 17:58:10 -0500 |
commit | 4046ab053d85e0a531532f1a40894efb9361c83c (patch) | |
tree | a7d8ba193e5d58b03bd7dedbdc893c2353d8d482 /src/usr/dump/dumpCollect.C | |
parent | 5320c4c323d2be26decc21d31aaafd010246fd07 (diff) | |
download | talos-hostboot-4046ab053d85e0a531532f1a40894efb9361c83c.tar.gz talos-hostboot-4046ab053d85e0a531532f1a40894efb9361c83c.zip |
On MPIPLs open up TCE windows for FSP to extract dump information
When the system is rebooting in a MPIPL, in istep 14.8
host_mpipl_service, if TCEs are enabled, a Read-Only TCE window
will be opened for the FSP to read information about the dump.
Change-Id: I1a32c9d4fe0027e795c14c50dfbd8782609b17e9
Backport: release-fips910
CQ:SW415585
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53204
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
Diffstat (limited to 'src/usr/dump/dumpCollect.C')
-rw-r--r-- | src/usr/dump/dumpCollect.C | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/src/usr/dump/dumpCollect.C b/src/usr/dump/dumpCollect.C index 816963cf8..1e9ed819e 100644 --- a/src/usr/dump/dumpCollect.C +++ b/src/usr/dump/dumpCollect.C @@ -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. */ @@ -36,6 +38,7 @@ #include <util/align.H> #include <sys/mm.h> #include <dump/dumpif.H> +#include <util/utiltce.H> #include <sys/msg.h> // message Q's #include <mbox/mbox_queues.H> // @@ -833,7 +836,44 @@ errlHndl_t copySrcToDest(dumpEntry *srcTableEntry, uint64_t l_mdrt_phys = mm_virt_to_phys( reinterpret_cast<void*>(resultsTableAddr)); - msg->data[0] = l_mdrt_phys; + + // If TCEs are enabled setup TCEs in TCE Table to allow + // the FSP to read this memory + if (TCE::utilUseTcesForDmas()) + { + // Align Physical addr down for TCE requirement + uint64_t mdrt_phyp_aligned = + ALIGN_PAGE_DOWN(l_mdrt_phys); + + uint64_t offset = l_mdrt_phys - mdrt_phyp_aligned; + + TRACFCOMP( g_trac_dump,"Setup TCEs for FSP to use for " + "l_mdrt_phys=0x%.16llX (virt=0x%.16llX, " + "aligned_phys=0x%.16llX, offset=0x%X)", + l_mdrt_phys, resultsTableAddr, + mdrt_phyp_aligned, offset); + + uint32_t token = 0; + l_err = TCE::utilAllocateTces(mdrt_phyp_aligned, + resultsTableSize+offset, + token, + false); //Read-Only + + if (l_err) + { + // Got an errorlog back from utilAllocateTces + TRACFCOMP(g_trac_dump, "HBDumpGetHostData utilAllocateTces failed rc=0x%X", l_err->reasonCode()); + } + else + { + // Put the token with the offset into the msg + msg->data[0] = token + offset; + } + } + else + { + msg->data[0] = l_mdrt_phys; + } // Number of bytes in the results table msg->data[1] = resultsTableSize; @@ -842,7 +882,8 @@ errlHndl_t copySrcToDest(dumpEntry *srcTableEntry, msg->extra_data = NULL; } - else + + if (l_err) { TRACFCOMP( g_trac_dump, INFO_MRK"Got an error trying to send msg. %.8X,", |