mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-12 19:25:06 +00:00
tpm2: rev155: Have NvWrite return BOOL
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
7712e5dacc
commit
1bbedefe5d
@ -172,7 +172,7 @@ NvRead(
|
||||
/* 8.5.3.6 NvWrite() */
|
||||
/* This function is used to post reserved data for writing to NV memory. Before the TPM completes
|
||||
the operation, the value will be written. */
|
||||
void
|
||||
BOOL
|
||||
NvWrite(
|
||||
UINT32 nvOffset, // IN: location in NV to receive data
|
||||
UINT32 size, // IN: size of the data to move
|
||||
@ -180,11 +180,13 @@ NvWrite(
|
||||
)
|
||||
{
|
||||
// Input type should be valid
|
||||
pAssert(nvOffset + size <= NV_MEMORY_SIZE);
|
||||
_plat__NvMemoryWrite(nvOffset, size, inBuffer);
|
||||
// Set the flag that a NV write happened
|
||||
SET_NV_UPDATE(UT_NV);
|
||||
return;
|
||||
if(nvOffset + size <= NV_MEMORY_SIZE)
|
||||
{
|
||||
// Set the flag that a NV write happened
|
||||
SET_NV_UPDATE(UT_NV);
|
||||
return _plat__NvMemoryWrite(nvOffset, size, inBuffer);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#if 0 // libtpms added being (for Coverity)
|
||||
/* 8.5.3.7 NvUpdatePersistent() */
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
/* */
|
||||
/* Written by Ken Goldman */
|
||||
/* IBM Thomas J. Watson Research Center */
|
||||
/* $Id: NVReserved_fp.h 809 2016-11-16 18:31:54Z kgoldman $ */
|
||||
/* $Id: NVReserved_fp.h 1476 2019-06-10 19:32:03Z kgoldman $ */
|
||||
/* */
|
||||
/* Licenses and Notices */
|
||||
/* */
|
||||
@ -55,7 +55,7 @@
|
||||
/* arising in any way out of use or reliance upon this specification or any */
|
||||
/* information herein. */
|
||||
/* */
|
||||
/* (c) Copyright IBM Corp. and others, 2016 */
|
||||
/* (c) Copyright IBM Corp. and others, 2016 - 2019 */
|
||||
/* */
|
||||
/********************************************************************************/
|
||||
|
||||
@ -86,7 +86,7 @@ NvRead(
|
||||
UINT32 nvOffset, // IN: offset in NV of value
|
||||
UINT32 size // IN: size of the value to read
|
||||
);
|
||||
void
|
||||
BOOL
|
||||
NvWrite(
|
||||
UINT32 nvOffset, // IN: location in NV to receive data
|
||||
UINT32 size, // IN: size of the data to move
|
||||
|
||||
Loading…
Reference in New Issue
Block a user