firmware_uefi/platform/
logger.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Interfaces required to support UEFI event logging.
5
6use std::fmt::Debug;
7
8#[derive(Debug)]
9pub enum UefiEvent {
10    BootSuccess(BootInfo),
11    BootFailure(BootInfo),
12    NoBootDevice,
13}
14
15#[derive(Debug)]
16pub struct BootInfo {
17    pub secure_boot_succeeded: bool,
18}
19
20/// Interface to log UEFI events.
21pub trait UefiLogger: Send {
22    fn log_event(&self, event: UefiEvent);
23}