Skip to content

Commit 55d62ed

Browse files
uefi-raw: Add TimerDelay and use it in BootServices::set_timer
1 parent 5fa380f commit 55d62ed

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

uefi-raw/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
- Added `HiiDatabaseProtocol`.
1111
- Added `ScsiIoProtocol`.
1212
- Added `Default` and other common impls for HTTP types.
13+
- Added `boot::TimerDelay`.
14+
15+
## Changed
16+
- The definition of `BootServices::set_timer` now uses `TimerDelay` rather than
17+
a plain integer.
1318

1419

1520
# uefi-raw - 0.9.0 (2024-10-23)

uefi-raw/src/table/boot.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ pub struct BootServices {
4747
notify_ctx: *mut c_void,
4848
out_event: *mut Event,
4949
) -> Status,
50-
pub set_timer: unsafe extern "efiapi" fn(event: Event, ty: u32, trigger_time: u64) -> Status,
50+
pub set_timer:
51+
unsafe extern "efiapi" fn(event: Event, ty: TimerDelay, trigger_time: u64) -> Status,
5152
pub wait_for_event: unsafe extern "efiapi" fn(
5253
number_of_events: usize,
5354
events: *mut Event,
@@ -484,3 +485,11 @@ pub enum Tpl: usize => {
484485
/// Note that this is not necessarily the processor's page size. The UEFI page
485486
/// size is always 4 KiB.
486487
pub const PAGE_SIZE: usize = 4096;
488+
489+
newtype_enum! {
490+
pub enum TimerDelay: i32 => {
491+
CANCEL = 0,
492+
PERIODIC = 1,
493+
RELATIVE = 2,
494+
}
495+
}

0 commit comments

Comments
 (0)