5
5
//!
6
6
//! Even though the bootloader should give the address of the real RSDP/XSDT, the checksum and
7
7
//! signature should be manually verified.
8
-
9
8
use core:: slice;
10
9
use core:: str;
10
+ use crate :: TagType ;
11
11
12
12
const RSDPV1_LENGTH : usize = 20 ;
13
13
14
14
/// EFI system table in 32 bit mode
15
15
#[ derive( Clone , Copy , Debug ) ]
16
16
#[ repr( C , packed) ] // only repr(C) would add unwanted padding before first_section
17
17
pub struct EFISdt32 {
18
- typ : u32 ,
18
+ typ : TagType ,
19
19
size : u32 ,
20
20
pointer : u32 ,
21
21
}
@@ -31,7 +31,7 @@ impl EFISdt32 {
31
31
#[ derive( Clone , Copy , Debug ) ]
32
32
#[ repr( C ) ]
33
33
pub struct EFISdt64 {
34
- typ : u32 ,
34
+ typ : TagType ,
35
35
size : u32 ,
36
36
pointer : u64 ,
37
37
}
@@ -47,7 +47,7 @@ impl EFISdt64 {
47
47
#[ derive( Debug ) ]
48
48
#[ repr( C ) ]
49
49
pub struct EFIImageHandle32 {
50
- typ : u32 ,
50
+ typ : TagType ,
51
51
size : u32 ,
52
52
pointer : u32 ,
53
53
}
@@ -56,7 +56,7 @@ pub struct EFIImageHandle32 {
56
56
#[ derive( Debug ) ]
57
57
#[ repr( C ) ]
58
58
pub struct EFIImageHandle64 {
59
- typ : u32 ,
59
+ typ : TagType ,
60
60
size : u32 ,
61
61
pointer : u64 ,
62
62
}
@@ -66,7 +66,7 @@ pub struct EFIImageHandle64 {
66
66
#[ derive( Debug ) ]
67
67
#[ repr( C ) ]
68
68
pub struct ImageLoadPhysAddr {
69
- typ : u32 ,
69
+ typ : TagType ,
70
70
size : u32 ,
71
71
load_base_addr : u32 ,
72
72
}
@@ -75,7 +75,7 @@ pub struct ImageLoadPhysAddr {
75
75
#[ derive( Clone , Copy , Debug ) ]
76
76
#[ repr( C , packed) ]
77
77
pub struct RsdpV1Tag {
78
- typ : u32 ,
78
+ typ : TagType ,
79
79
size : u32 ,
80
80
signature : [ u8 ; 8 ] ,
81
81
checksum : u8 ,
@@ -122,7 +122,7 @@ impl RsdpV1Tag {
122
122
#[ derive( Clone , Copy , Debug ) ]
123
123
#[ repr( C , packed) ]
124
124
pub struct RsdpV2Tag {
125
- typ : u32 ,
125
+ typ : TagType ,
126
126
size : u32 ,
127
127
signature : [ u8 ; 8 ] ,
128
128
checksum : u8 ,
0 commit comments