diff options
author | Chris Engel <cjengel@us.ibm.com> | 2015-10-16 13:21:21 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-11-18 12:32:46 -0600 |
commit | 37ad6f7b1a53aaaf063c0cca2baf42da92571139 (patch) | |
tree | 1a5fe9fdfebe4a876cd70447ea94e22ea34519f4 /src/usr/secureboot/trusted/base | |
parent | f5bf9deb1368c6cddc69ca2d20db98939570350c (diff) | |
download | talos-hostboot-37ad6f7b1a53aaaf063c0cca2baf42da92571139.tar.gz talos-hostboot-37ad6f7b1a53aaaf063c0cca2baf42da92571139.zip |
Trustedboot: Move data to Hostboot base and add pcrExtend stub function
Change-Id: Id488af88c7f1796606434a062a9001f31f413ac0
RTC: 125288
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21475
Tested-by: Jenkins Server
Reviewed-by: Timothy R. Block <block@us.ibm.com>
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Tested-by: FSP CI Jenkins
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot/trusted/base')
-rw-r--r-- | src/usr/secureboot/trusted/base/trustedboot_base.C | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/usr/secureboot/trusted/base/trustedboot_base.C b/src/usr/secureboot/trusted/base/trustedboot_base.C new file mode 100644 index 000000000..95a55fdc2 --- /dev/null +++ b/src/usr/secureboot/trusted/base/trustedboot_base.C @@ -0,0 +1,84 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/secureboot/trusted/base/trustedboot_base.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] 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 */ +/** + * @file trustedboot_base.C + * + * @brief Trusted boot base interfaces + */ + +// ---------------------------------------------- +// Includes +// ---------------------------------------------- +#include <string.h> +#include <sys/time.h> +#include <trace/interface.H> +#include <errl/errlentry.H> +#include <errl/errlmanager.H> +#include <errl/errludtarget.H> +#include <errl/errludstring.H> +#include <secureboot/trustedbootif.H> +#include "../trustedboot.H" +#include <secureboot/trustedboot_reasoncodes.H> + +// ---------------------------------------------- +// Trace definitions +// ---------------------------------------------- +trace_desc_t* g_trac_trustedboot = NULL; +TRAC_INIT( & g_trac_trustedboot, "TRBOOT", KILOBYTE ); + +// Easy macro replace for unit testing +//#define TRACUCOMP(args...) TRACFCOMP(args) +#define TRACUCOMP(args...) + +namespace TRUSTEDBOOT +{ + +/// Global object to store TPM status +SystemTpms systemTpms; + +SystemTpms::SystemTpms() +{ +} + +TpmTarget::TpmTarget() +{ + memset(this, 0, sizeof(TpmTarget)); + mutex_init(&tpmMutex); +} + +errlHndl_t pcrExtend(TPM_Pcr i_pcr, + uint8_t* i_digest, + size_t i_digestSize, + const char* i_logMsg) +{ + errlHndl_t err = NULL; +#ifdef CONFIG_TPMDD + /// @todo RTC:125288 Add call to extend the PCR + +#endif + return err; +} + +} // end TRUSTEDBOOT |