Skip to content

Commit

Permalink
td-shim: init event log memory with 0xff
Browse files Browse the repository at this point in the history
Align with `EDK2` implementation, to help OS to find the last event
log entry.

Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 authored and jyao1 committed Oct 12, 2023
1 parent 4da7dfc commit d384e1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions td-shim/src/bin/td-shim/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ pub extern "win64" fn _start(
// Set up the TD event log buffer.
// Safe because it's used to initialize the EventLog subsystem which ensures safety.
let event_log_buf = mem.get_dynamic_mem_slice_mut(memslice::SliceType::EventLog);
// Initialize event log memory with 0xff which help OS to know the last entry.
event_log_buf.fill(0xff);
let mut td_event_log = CcEventLogWriter::new(event_log_buf, Box::new(td::extend_rtmr))
.expect("Failed to create and initialize the event log");

Expand Down

0 comments on commit d384e1e

Please sign in to comment.