Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRD: Centaur maint cmd complete attention
Change-Id: I6ee6f96ac149c75371cea179426dc6710d97abe9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47087 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47156 Tested-by: FSP CI Jenkins <fsp-CI-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>
- Loading branch information
Showing
6 changed files
with
319 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# IBM_PROLOG_BEGIN_TAG | ||
# This is an automatically generated prolog. | ||
# | ||
# $Source: src/usr/diag/prdf/common/plat/cen/cen_mba_actions.rule $ | ||
# | ||
# OpenPOWER HostBoot Project | ||
# | ||
# Contributors Listed Below - COPYRIGHT 2017 | ||
# [+] 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. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
# | ||
# IBM_PROLOG_END_TAG | ||
|
||
/** Analyze maintenance command complete */ | ||
actionclass maintenance_command_complete | ||
{ | ||
funccall("MaintCmdComplete"); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# IBM_PROLOG_BEGIN_TAG | ||
# This is an automatically generated prolog. | ||
# | ||
# $Source: src/usr/diag/prdf/common/plat/cen/cen_mba_regs.rule $ | ||
# | ||
# OpenPOWER HostBoot Project | ||
# | ||
# Contributors Listed Below - COPYRIGHT 2017 | ||
# [+] 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. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
# | ||
# IBM_PROLOG_END_TAG | ||
|
||
############################################################################ | ||
# Maintenance Command Registers | ||
############################################################################ | ||
|
||
register MBMCT | ||
{ | ||
name "MBA Maintenance Command Type Register"; | ||
scomaddr 0x0301060A; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
||
# NOTE: PRD doesn't use MBMCC directly and the bits are cleared by HW so I | ||
# see no reason to add it here. | ||
|
||
register MBMSR | ||
{ | ||
name "MBA Maintenance Command Status Register"; | ||
scomaddr 0x0301060C; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
||
register MBMACA | ||
{ | ||
name "MBA Maintenance Command Start Address Register"; | ||
scomaddr 0x0301060D; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
||
register MBMEA | ||
{ | ||
name "MBA Maintenance Command End Address Register"; | ||
scomaddr 0x0301060E; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
||
register MBASCTL | ||
{ | ||
name "MBA Memory Scrub/Read Control Register"; | ||
scomaddr 0x0301060F; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
||
register MBAECTL | ||
{ | ||
name "MBA Error Control Register"; | ||
scomaddr 0x03010610; | ||
capture group default; | ||
capture group MaintCmdRegs; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/diag/prdf/plat/mem/prdfCenMba.C $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2017 */ | ||
/* [+] 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. */ | ||
/* You may obtain a copy of the License at */ | ||
/* */ | ||
/* http://www.apache.org/licenses/LICENSE-2.0 */ | ||
/* */ | ||
/* Unless required by applicable law or agreed to in writing, software */ | ||
/* distributed under the License is distributed on an "AS IS" BASIS, */ | ||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ | ||
/* implied. See the License for the specific language governing */ | ||
/* permissions and limitations under the License. */ | ||
/* */ | ||
/* IBM_PROLOG_END_TAG */ | ||
|
||
// Framework includes | ||
#include <iipServiceDataCollector.h> | ||
#include <prdfExtensibleChip.H> | ||
#include <prdfPluginDef.H> | ||
#include <prdfPluginMap.H> | ||
|
||
// Platform includes | ||
#include <prdfCenMbaDataBundle.H> | ||
|
||
using namespace TARGETING; | ||
|
||
namespace PRDF | ||
{ | ||
|
||
using namespace PlatServices; | ||
|
||
namespace cen_mba | ||
{ | ||
|
||
//############################################################################## | ||
// | ||
// Special plugins | ||
// | ||
//############################################################################## | ||
|
||
/** | ||
* @brief Plugin that initializes the data bundle. | ||
* @param i_mbaChip An MBA chip. | ||
* @return SUCCESS | ||
*/ | ||
int32_t Initialize( ExtensibleChip * i_mbaChip ) | ||
{ | ||
i_mbaChip->getDataBundle() = new MbaDataBundle( i_mbaChip ); | ||
return SUCCESS; | ||
} | ||
PRDF_PLUGIN_DEFINE( cen_mba, Initialize ); | ||
|
||
//############################################################################## | ||
// | ||
// MBASPA | ||
// | ||
//############################################################################## | ||
|
||
/** | ||
* @brief MBASPA[0,8] - Maintenance Command Complete. | ||
* @param i_mbaChip An MBA chip. | ||
* @param io_sc The step code data struct. | ||
* @return SUCCESS | ||
*/ | ||
int32_t MaintCmdComplete( ExtensibleChip * i_mbaChip, | ||
STEP_CODE_DATA_STRUCT & io_sc ) | ||
{ | ||
#define PRDF_FUNC "[cen_mba::MaintCmdComplete] " | ||
|
||
// Tell the TD controller there was a command complete attention. | ||
MbaDataBundle * db = getMbaDataBundle( i_mbaChip ); | ||
if ( SUCCESS != db->getTdCtlr()->handleCmdComplete(io_sc) ) | ||
{ | ||
// Something failed. It is possible the command complete attention has | ||
// not been cleared. Make the rule code do it. | ||
return SUCCESS; | ||
} | ||
else | ||
{ | ||
// Everything was successful. Whether we started a new command or told | ||
// MDIA to do it, the command complete bit has already been cleared. | ||
// Don't do it again. | ||
return PRD_NO_CLEAR_FIR_BITS; | ||
} | ||
|
||
#undef PRDF_FUNC | ||
} | ||
PRDF_PLUGIN_DEFINE( cen_mba, MaintCmdComplete ); | ||
|
||
//------------------------------------------------------------------------------ | ||
|
||
} // end namespace cen_mba | ||
|
||
} // end namespace PRDF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/diag/prdf/plat/mem/prdfCenMbaDataBundle.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2017 */ | ||
/* [+] 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. */ | ||
/* You may obtain a copy of the License at */ | ||
/* */ | ||
/* http://www.apache.org/licenses/LICENSE-2.0 */ | ||
/* */ | ||
/* Unless required by applicable law or agreed to in writing, software */ | ||
/* distributed under the License is distributed on an "AS IS" BASIS, */ | ||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ | ||
/* implied. See the License for the specific language governing */ | ||
/* permissions and limitations under the License. */ | ||
/* */ | ||
/* IBM_PROLOG_END_TAG */ | ||
|
||
#ifndef __prdfCenMbaDataBundle_H | ||
#define __prdfCenMbaDataBundle_H | ||
|
||
// Framework includes | ||
#include <prdfExtensibleChip.H> | ||
|
||
// Platform includes | ||
#include <prdfMemTdCtlr.H> | ||
#include <prdfPlatServices.H> | ||
|
||
namespace PRDF | ||
{ | ||
|
||
/** @brief Centaur MBA data bundle. */ | ||
class MbaDataBundle : public DataBundle | ||
{ | ||
public: // functions | ||
|
||
/** | ||
* @brief Constructor. | ||
* @param i_mbaChip The MBA chip. | ||
*/ | ||
explicit MbaDataBundle( ExtensibleChip * i_mbaChip ) : | ||
iv_chip(i_mbaChip) | ||
{} | ||
|
||
/** @brief Destructor. */ | ||
~MbaDataBundle() | ||
{ | ||
delete iv_tdCtlr; iv_tdCtlr = nullptr; | ||
} | ||
|
||
// Don't allow copy or assignment. | ||
MbaDataBundle( const MbaDataBundle & ) = delete; | ||
const MbaDataBundle & operator=( const MbaDataBundle & ) = delete; | ||
|
||
/** @return The Targeted Diagnostics controller. */ | ||
MemTdCtlr<TARGETING::TYPE_MBA> * getTdCtlr() | ||
{ | ||
if ( nullptr == iv_tdCtlr ) | ||
{ | ||
iv_tdCtlr = new MemTdCtlr<TARGETING::TYPE_MBA>{iv_chip}; | ||
} | ||
|
||
return iv_tdCtlr; | ||
} | ||
|
||
private: // instance variables | ||
|
||
/** The MBA chip associated with this data bundle. */ | ||
ExtensibleChip * const iv_chip; | ||
|
||
/** The Targeted Diagnostics controller. */ | ||
MemTdCtlr<TARGETING::TYPE_MBA> * iv_tdCtlr = nullptr; | ||
}; | ||
|
||
/** | ||
* @brief Wrapper function for the MbaDataBundle. | ||
* @param i_mbaChip The MBA chip. | ||
* @return This MBA's data bundle. | ||
*/ | ||
inline MbaDataBundle * getMbaDataBundle( ExtensibleChip * i_mbaChip ) | ||
{ | ||
return static_cast<MbaDataBundle *>(i_mbaChip->getDataBundle()); | ||
} | ||
|
||
} // end namespace PRDF | ||
|
||
#endif // __prdfCenMbaDataBundle_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters