diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-06-25 16:43:53 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-12 14:03:33 -0500 |
commit | d8fdb9f6399d602c3314fe8a0a6578364e886120 (patch) | |
tree | f4cf27fee9911626b62fbee5f9d7744520cd0f07 /src/usr/hwas/hwasPlat.C | |
parent | 23c61636fe51145db2d7554ea8022aa4d58179b6 (diff) | |
download | talos-hostboot-d8fdb9f6399d602c3314fe8a0a6578364e886120.tar.gz talos-hostboot-d8fdb9f6399d602c3314fe8a0a6578364e886120.zip |
rework gard interfaces to handle new hwsv functions
the FSP gard records will now be stored in the system model,
so the gard functions change to support new platform specific
functions.
Change-Id: I9a847a3defa7e613d128b1077763640e124360a8
RTC: 73818
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5806
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: SHELDON R. BAILEY <baileysh@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/hwasPlat.C')
-rw-r--r-- | src/usr/hwas/hwasPlat.C | 71 |
1 files changed, 1 insertions, 70 deletions
diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C index 2095277ec..21dd4a086 100644 --- a/src/usr/hwas/hwasPlat.C +++ b/src/usr/hwas/hwasPlat.C @@ -429,76 +429,6 @@ errlHndl_t hwasChangeDetection() return errl; } // hwasChangeDetection - -GardAddress::GardAddress(errlHndl_t &o_errl) -{ - DeconfigGard::GardRecord *l_addr = HWAS::theDeconfigGard().iv_pGardRecords; - HWAS_INF("GardAddress ctor: iv_pGardRecords %p", l_addr); - - do - { - // if this is the first time thru here, get the PNOR address. - if (l_addr == NULL) - { - PNOR::SectionInfo_t l_section; - o_errl = PNOR::getSectionInfo(PNOR::GUARD_DATA, PNOR::CURRENT_SIDE, - l_section); - if (o_errl) - { - HWAS_ERR("PNOR::getSectionInfo failed!!!"); - // no support for GARD in this configuration. - break; - } - - l_addr = reinterpret_cast<DeconfigGard::GardRecord *> - (l_section.vaddr); - HWAS_DBG("PNOR vaddr=%p size=%d", - l_section.vaddr, l_section.size); - - // tell the DeconfigGard what the address - HWAS::theDeconfigGard().iv_pGardRecords = l_addr; - - // and let him compute and save maxRecords and nextRecordId - HWAS::theDeconfigGard()._GardRecordIdSetup(l_section.size); - - HWAS_INF("GardAddress iv_pGardRecords=%p", l_addr); - } - } - while (0); -} - - -void GardAddress::flush() -{ - // flush PNOR iff we wrote - if (!iv_addr.empty()) - { - for (std::vector<void *>::const_iterator iter = iv_addr.begin(); - iter != iv_addr.end(); - ++iter) - { - HWAS_DBG("flushing GARD in PNOR: addr=%p", *iter); - int l_rc = mm_remove_pages(FLUSH, (void *) *iter, - sizeof(DeconfigGard::GardRecord)); - if (l_rc) - { - HWAS_ERR("mm_remove_pages(FLUSH,%p,%d) returned %d", - *iter, sizeof(DeconfigGard::GardRecord),l_rc); - } - } - - // all done - just get rid of them all - iv_addr.clear(); - } -} - - -GardAddress::~GardAddress() -{ - flush(); -} - - //****************************************************************************** // platCheckMinimumHardware() // Don't forget to add a procedure callout and update the common plid @@ -509,4 +439,5 @@ void platCheckMinimumHardware(uint32_t & io_plid) // nothing to do yet... } + } // namespace HWAS |