File tree 3 files changed +30
-25
lines changed
3 files changed +30
-25
lines changed Original file line number Diff line number Diff line change
1
+ //! UEFI services available during boot.
2
+
3
+ newtype_enum ! {
4
+ /// Task priority level.
5
+ ///
6
+ /// Although the UEFI specification repeatedly states that only the variants
7
+ /// specified below should be used in application-provided input, as the other
8
+ /// are reserved for internal firmware use, it might still happen that the
9
+ /// firmware accidentally discloses one of these internal TPLs to us.
10
+ ///
11
+ /// Since feeding an unexpected variant to a Rust enum is UB, this means that
12
+ /// this C enum must be interfaced via the newtype pattern.
13
+ pub enum Tpl : usize => {
14
+ /// Normal task execution level.
15
+ APPLICATION = 4 ,
16
+ /// Async interrupt-style callbacks run at this TPL.
17
+ CALLBACK = 8 ,
18
+ /// Notifications are masked at this level.
19
+ ///
20
+ /// This is used in critical sections of code.
21
+ NOTIFY = 16 ,
22
+ /// Highest priority level.
23
+ ///
24
+ /// Even processor interrupts are disable at this level.
25
+ HIGH_LEVEL = 31 ,
26
+ } }
Original file line number Diff line number Diff line change 2
2
3
3
mod revision;
4
4
5
+ pub mod boot;
6
+
5
7
pub use revision:: Revision ;
Original file line number Diff line number Diff line change 20
20
:: alloc:: vec:: Vec ,
21
21
} ;
22
22
23
+ pub use uefi_raw:: table:: boot:: Tpl ;
24
+
23
25
// TODO: this similar to `SyncUnsafeCell`. Once that is stabilized we
24
26
// can use it instead.
25
27
struct GlobalImageHandle {
@@ -1673,31 +1675,6 @@ pub enum LoadImageSource<'a> {
1673
1675
} ,
1674
1676
}
1675
1677
1676
- newtype_enum ! {
1677
- /// Task priority level.
1678
- ///
1679
- /// Although the UEFI specification repeatedly states that only the variants
1680
- /// specified below should be used in application-provided input, as the other
1681
- /// are reserved for internal firmware use, it might still happen that the
1682
- /// firmware accidentally discloses one of these internal TPLs to us.
1683
- ///
1684
- /// Since feeding an unexpected variant to a Rust enum is UB, this means that
1685
- /// this C enum must be interfaced via the newtype pattern.
1686
- pub enum Tpl : usize => {
1687
- /// Normal task execution level.
1688
- APPLICATION = 4 ,
1689
- /// Async interrupt-style callbacks run at this TPL.
1690
- CALLBACK = 8 ,
1691
- /// Notifications are masked at this level.
1692
- ///
1693
- /// This is used in critical sections of code.
1694
- NOTIFY = 16 ,
1695
- /// Highest priority level.
1696
- ///
1697
- /// Even processor interrupts are disable at this level.
1698
- HIGH_LEVEL = 31 ,
1699
- } }
1700
-
1701
1678
/// RAII guard for task priority level changes
1702
1679
///
1703
1680
/// Will automatically restore the former task priority level when dropped.
You can’t perform that action at this time.
0 commit comments