Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event log for TPM2.0 #4

Merged
merged 2 commits into from Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions xen/arch/x86/include/asm/intel_txt.h
Expand Up @@ -215,6 +215,39 @@ struct txt_sinit_mle_data {
/* Ext Data Elements */
} __packed;

/* Types of extended data. */
#define TXT_HEAP_EXTDATA_TYPE_END 0
#define TXT_HEAP_EXTDATA_TYPE_BIOS_SPEC_VER 1
#define TXT_HEAP_EXTDATA_TYPE_ACM 2
#define TXT_HEAP_EXTDATA_TYPE_STM 3
#define TXT_HEAP_EXTDATA_TYPE_CUSTOM 4
#define TXT_HEAP_EXTDATA_TYPE_MADT 6
#define TXT_HEAP_EXTDATA_TYPE_EVENT_LOG_POINTER2_1 8
#define TXT_HEAP_EXTDATA_TYPE_MCFG 9
#define TXT_HEAP_EXTDATA_TYPE_TPR_REQ 13
#define TXT_HEAP_EXTDATA_TYPE_DTPR 14
#define TXT_HEAP_EXTDATA_TYPE_CEDT 15

/*
* Self-describing data structure that is used for extensions to TXT heap
* tables.
*/
struct txt_ext_data_element {
uint32_t type; /* One of TXT_HEAP_EXTDATA_TYPE_*. */
uint32_t size;
uint8_t data[0]; /* size bytes. */
} __packed;

/*
* Extended data describing TPM 2.0 log.
*/
struct heap_event_log_pointer_element2_1 {
uint64_t physical_address;
uint32_t allocated_event_container_size;
uint32_t first_record_offset;
uint32_t next_record_offset;
} __packed;

/*
* Functions to extract data from the Intel TXT Heap Memory. The layout
* of the heap is as follows:
Expand Down