uefi_specs/hyperv/
debug_level.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Debug level mappings defined by Project Mu's MU_BASECORE package,
5//! used in the Hyper-V UEFI firmware.
6
7#![warn(missing_docs)]
8
9/// Initialization
10pub const DEBUG_INIT: u32 = 0x0000_0001;
11/// Warnings
12pub const DEBUG_WARN: u32 = 0x0000_0002;
13/// Load events
14pub const DEBUG_LOAD: u32 = 0x0000_0004;
15/// EFI File system
16pub const DEBUG_FS: u32 = 0x0000_0008;
17/// Alloc & Free (pool)
18pub const DEBUG_POOL: u32 = 0x0000_0010;
19/// Alloc & Free (page)
20pub const DEBUG_PAGE: u32 = 0x0000_0020;
21/// Informational debug messages
22pub const DEBUG_INFO: u32 = 0x0000_0040;
23/// PEI/DXE/SMM Dispatchers
24pub const DEBUG_DISPATCH: u32 = 0x0000_0080;
25/// Variable
26pub const DEBUG_VARIABLE: u32 = 0x0000_0100;
27/// Boot Manager
28pub const DEBUG_BM: u32 = 0x0000_0400;
29/// BlkIo Driver
30pub const DEBUG_BLKIO: u32 = 0x0000_1000;
31/// Network Io Driver
32pub const DEBUG_NET: u32 = 0x0000_4000;
33/// UNDI Driver
34pub const DEBUG_UNDI: u32 = 0x0001_0000;
35/// LoadFile
36pub const DEBUG_LOADFILE: u32 = 0x0002_0000;
37/// Event messages
38pub const DEBUG_EVENT: u32 = 0x0008_0000;
39/// Global Coherency Database changes
40pub const DEBUG_GCD: u32 = 0x0010_0000;
41/// Memory range cachability changes
42pub const DEBUG_CACHE: u32 = 0x0020_0000;
43/// Detailed debug messages that may significantly impact boot performance
44pub const DEBUG_VERBOSE: u32 = 0x0040_0000;
45/// Detailed debug and payload manageability messages related to modules such as Redfish, IPMI, MCTP etc.
46pub const DEBUG_MANAGEABILITY: u32 = 0x0080_0000;
47/// Error
48pub const DEBUG_ERROR: u32 = 0x8000_0000;
49
50/// Maps debug levels to their descriptive names.
51pub const DEBUG_FLAG_NAMES: &[(u32, &str)] = &[
52    (DEBUG_INIT, "INIT"),
53    (DEBUG_WARN, "WARNING"),
54    (DEBUG_LOAD, "LOAD"),
55    (DEBUG_FS, "FILESYSTEM"),
56    (DEBUG_POOL, "POOL"),
57    (DEBUG_PAGE, "PAGE"),
58    (DEBUG_INFO, "INFO"),
59    (DEBUG_DISPATCH, "DISPATCH"),
60    (DEBUG_VARIABLE, "VARIABLE"),
61    (DEBUG_BM, "BOOTMANAGER"),
62    (DEBUG_BLKIO, "BLOCKIO"),
63    (DEBUG_NET, "NETWORK"),
64    (DEBUG_UNDI, "UNDI"),
65    (DEBUG_LOADFILE, "LOADFILE"),
66    (DEBUG_EVENT, "EVENT"),
67    (DEBUG_GCD, "GCD"),
68    (DEBUG_CACHE, "CACHE"),
69    (DEBUG_VERBOSE, "VERBOSE"),
70    (DEBUG_MANAGEABILITY, "MANAGEABILITY"),
71    (DEBUG_ERROR, "ERROR"),
72];