blob: 373c49409d9477e4148cac0b02e48c69f1d93ef3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Functions for querying, manipulating and locking secure data spaces
* stored in the TPM NVRAM (mock versions).
*/
#include "2api.h"
#include "2secdata.h"
#include "secdata_tpm.h"
#include "tss_constants.h"
int secdata_kernel_locked = 0;
uint32_t secdata_firmware_write(struct vb2_context *ctx)
{
ctx->flags &= ~VB2_CONTEXT_SECDATA_FIRMWARE_CHANGED;
return TPM_SUCCESS;
}
uint32_t secdata_kernel_read(struct vb2_context *ctx)
{
vb2api_secdata_kernel_create(ctx);
return TPM_SUCCESS;
}
uint32_t secdata_kernel_write(struct vb2_context *ctx)
{
ctx->flags &= ~VB2_CONTEXT_SECDATA_KERNEL_CHANGED;
return TPM_SUCCESS;
}
uint32_t secdata_kernel_lock(struct vb2_context *ctx)
{
secdata_kernel_locked = 1;
return TPM_SUCCESS;
}
uint32_t secdata_fwmp_read(struct vb2_context *ctx)
{
ctx->flags |= VB2_CONTEXT_NO_SECDATA_FWMP;
return TPM_SUCCESS;
}
|