Skip to content

Commit

Permalink
event_log: move definition of ev_log_hash_t to code
Browse files Browse the repository at this point in the history
It used to be defined in boot.h, even though it isn't expected to be
ever needed anywhere but in code for handling event log internally.

Signed-off-by: Krystian Hebel <[email protected]>
  • Loading branch information
krystian-hebel committed Feb 26, 2024
1 parent 202a44b commit fb60951
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 10 additions & 1 deletion event_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,19 @@ typedef struct __packed {
/* u8 event[]; */
} tpm12_event_t;

/* The same as TPML_DIGEST_VALUES but little endian, as event log expects it */
typedef struct __packed {
u32 count;
u16 sha1_id;
u8 sha1_hash[20];
u16 sha256_id;
u8 sha256_hash[32];
} ev_log_hash_t;

typedef struct __packed {
u32 pcr;
u32 event_type;
ev_log_hash_t digests; /* defined in boot.h */
ev_log_hash_t digests;
u32 event_size;
/* u8 event[]; */
} tpm20_event_t;
Expand Down
9 changes: 0 additions & 9 deletions include/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ typedef struct __packed skl_info {
} skl_info_t;
extern const skl_info_t skl_info;

/* The same as TPML_DIGEST_VALUES but little endian, as event log expects it */
typedef struct __packed ev_log_hash {
u32 count;
u16 sha1_id;
u8 sha1_hash[20];
u16 sha256_id;
u8 sha256_hash[32];
} ev_log_hash_t;

/* Fences */
#define mb() asm volatile("mfence" : : : "memory")
#define rmb() asm volatile("lfence" : : : "memory")
Expand Down

0 comments on commit fb60951

Please sign in to comment.