-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reading UCD flash update LIDs
- Added support to read a single LID container and securely verify it - Added new compile flag CONFIG_UCD_FLASH_UPDATES to enable/disable future TI UCD9090/UCD90120A flash updates - Created shell function to hold the UCD flash update logic Change-Id: I94f3e43558af5d7951febdf6ff0685c120d2db0e RTC: 201992 CMVC-Prereq: 1076388 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71945 Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Ilya Smirnov <ismirno@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: Daniel M. Crowell <dcrowell@us.ibm.com>
- Loading branch information
1 parent
02f3329
commit b61b496
Showing
9 changed files
with
327 additions
and
24 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
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
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,101 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/isteps/istep21/call_update_ucd_flash.C $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2015,2019 */ | ||
/* [+] 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 */ | ||
|
||
#include <errl/errlentry.H> | ||
#include <trace/interface.H> | ||
#include <initservice/initserviceif.H> | ||
#include <util/utilmclmgr.H> | ||
#include <errl/errlmanager.H> | ||
#include <hbotcompid.H> | ||
#include <config.h> | ||
#include <initservice/isteps_trace.H> | ||
|
||
#include "call_update_ucd_flash.H" | ||
|
||
namespace POWER_SEQUENCER | ||
{ | ||
|
||
namespace TI | ||
{ | ||
|
||
namespace UCD | ||
{ | ||
|
||
void call_update_ucd_flash(void) | ||
{ | ||
errlHndl_t pError = nullptr; | ||
|
||
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ENTER_MRK | ||
"call_update_ucd_flash"); | ||
|
||
do { | ||
|
||
// Update UCD flash images, if needed | ||
if (INITSERVICE::spBaseServicesEnabled()) | ||
{ | ||
// @TODO RTC 201991 | ||
// break early if no UCD devices | ||
|
||
// Load the UCD flash binary via the MCL in load only mode | ||
MCL::MasterContainerLidMgr mclManager(true); | ||
MCL::CompInfo info; | ||
pError = mclManager.processSingleComponent(MCL::g_UcdCompId,info); | ||
if(pError) | ||
{ | ||
break; | ||
} | ||
|
||
// @TODO RTC 201990 add flash update algorithm and make trace TRACDBIN | ||
for(const auto& lid : info.lidIds) | ||
{ | ||
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"LID ID=0x%08X, " | ||
"size=%d, vAddr=%p", | ||
lid.id, lid.size, lid.vAddr); | ||
TRACFBIN(ISTEPS_TRACE::g_trac_isteps_trace,"LID",lid.vAddr,64); | ||
} | ||
|
||
// Destructor automatically unloads the UCD flash binary | ||
} | ||
|
||
} while(0); | ||
|
||
if(pError) | ||
{ | ||
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ERR_MRK | ||
"call_update_ucd_flash failed"); | ||
errlCommit(pError, ISTEP_COMP_ID); | ||
} | ||
|
||
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, EXIT_MRK | ||
"call_update_ucd_flash" ); | ||
} | ||
|
||
} // End UCD namespace | ||
|
||
} // End TI namespace | ||
|
||
} // End POWER_SEQUENCER namespace | ||
|
||
|
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,49 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/isteps/istep21/call_update_ucd_flash.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2019 */ | ||
/* [+] 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 __CALL_UPDATE_UCD_FLASH_H | ||
#define __CALL_UPDATE_UCD_FLASH_H | ||
|
||
namespace POWER_SEQUENCER | ||
{ | ||
|
||
namespace TI // Texas Instruments devices | ||
{ | ||
|
||
namespace UCD // UCD* series | ||
{ | ||
/** | ||
* @brief Updates the data flash of applicable Texas Instruments UCD | ||
* power sequencer ASICs. | ||
*/ | ||
void call_update_ucd_flash(); | ||
|
||
} // End UCD namespace | ||
|
||
} // End TI namespace | ||
|
||
} // End POWER_SEQUENCER namespace | ||
|
||
#endif |
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,4 @@ | ||
config UCD_FLASH_UPDATES | ||
default n | ||
help | ||
Enable UCD power sequencer flash updates |
Oops, something went wrong.