From 09a3da7596822d721dee3e69a13adfdd67759588 Mon Sep 17 00:00:00 2001 From: Nick Bofferding Date: Wed, 20 Feb 2019 22:11:41 -0600 Subject: UCD Flash Update: Support I2C SMBUS operations for UCD flash update - Adds I2C SMBUS operations for UCD flash update - Creates UCD component ID + trace name - Creates stub for UCD flash update entry point Change-Id: Id75cdd137b5a4924998c04bdbdce9218610a4906 RTC: 201992 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72229 Reviewed-by: Ilya Smirnov Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Matthew Raybuck Reviewed-by: Daniel M. Crowell --- src/usr/isteps/istep21/call_update_ucd_flash.C | 11 ++++- src/usr/isteps/makefile | 3 +- src/usr/isteps/ucd/makefile | 32 ++++++++++++ src/usr/isteps/ucd/updateUcdFlash.C | 67 ++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 src/usr/isteps/ucd/makefile create mode 100644 src/usr/isteps/ucd/updateUcdFlash.C (limited to 'src/usr/isteps') diff --git a/src/usr/isteps/istep21/call_update_ucd_flash.C b/src/usr/isteps/istep21/call_update_ucd_flash.C index fa2d36896..78b59653f 100644 --- a/src/usr/isteps/istep21/call_update_ucd_flash.C +++ b/src/usr/isteps/istep21/call_update_ucd_flash.C @@ -31,7 +31,8 @@ #include #include #include - +#include +#include #include "call_update_ucd_flash.H" namespace POWER_SEQUENCER @@ -67,7 +68,15 @@ void call_update_ucd_flash(void) break; } + // Make sure TPM queue is flushed before doing any I2C operations + TRUSTEDBOOT::flushTpmQueue(); + // @TODO RTC 201990 add flash update algorithm and make trace TRACDBIN + // call into: + // + // errlHndl_t updateUcdFlash( + // TARGETING::Target* i_pUcd, + // const void* i_pFlashImage); for(const auto& lid : info.lidIds) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"LID ID=0x%08X, " diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile index e5aa9935d..dca7777f7 100644 --- a/src/usr/isteps/makefile +++ b/src/usr/isteps/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2011,2018 +# Contributors Listed Below - COPYRIGHT 2011,2019 # [+] International Business Machines Corp. # # @@ -51,6 +51,7 @@ SUBDIRS+=fab_iovalid.d SUBDIRS+=nest.d SUBDIRS+=io.d SUBDIRS+=nvdimm.d +SUBDIRS+=ucd.d #TODO: RTC 176018 EXTRAINCDIR += ${ROOTPATH}/src/import/ diff --git a/src/usr/isteps/ucd/makefile b/src/usr/isteps/ucd/makefile new file mode 100644 index 000000000..9ffe7a69b --- /dev/null +++ b/src/usr/isteps/ucd/makefile @@ -0,0 +1,32 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/isteps/ucd/makefile $ +# +# 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 + +ROOTPATH = ../../../.. + +MODULE = ucd + +OBJS += updateUcdFlash.o + +include ${ROOTPATH}/config.mk diff --git a/src/usr/isteps/ucd/updateUcdFlash.C b/src/usr/isteps/ucd/updateUcdFlash.C new file mode 100644 index 000000000..4e1e3b13d --- /dev/null +++ b/src/usr/isteps/ucd/updateUcdFlash.C @@ -0,0 +1,67 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/ucd/updateUcdFlash.C $ */ +/* */ +/* 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 */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace POWER_SEQUENCER +{ + +namespace TI // Texas Instruments +{ + +namespace UCD // UCD Series +{ + +trace_desc_t* g_trac_ucd = nullptr; +TRAC_INIT(&g_trac_ucd, UCD_COMP_NAME, 2*KILOBYTE); + +errlHndl_t updateUcdFlash( + TARGETING::Target* i_pUcd, + const void* i_pFlashImage) +{ + errlHndl_t pError=nullptr; + + // Stub for future additional support + + return pError; +} + +} // End namespace POWER_SEQUENCER + +} // End namespace TI + +} // End namespace UCD -- cgit v1.2.3