55//!
66//! Even though the bootloader should give the address of the real RSDP/XSDT, the checksum and
77//! signature should be manually verified.
8-
98use core:: slice;
109use core:: str;
10+ use crate :: TagType ;
1111
1212const RSDPV1_LENGTH : usize = 20 ;
1313
1414/// EFI system table in 32 bit mode
1515#[ derive( Clone , Copy , Debug ) ]
1616#[ repr( C , packed) ] // only repr(C) would add unwanted padding before first_section
1717pub struct EFISdt32 {
18- typ : u32 ,
18+ typ : TagType ,
1919 size : u32 ,
2020 pointer : u32 ,
2121}
@@ -31,7 +31,7 @@ impl EFISdt32 {
3131#[ derive( Clone , Copy , Debug ) ]
3232#[ repr( C ) ]
3333pub struct EFISdt64 {
34- typ : u32 ,
34+ typ : TagType ,
3535 size : u32 ,
3636 pointer : u64 ,
3737}
@@ -47,7 +47,7 @@ impl EFISdt64 {
4747#[ derive( Debug ) ]
4848#[ repr( C ) ]
4949pub struct EFIImageHandle32 {
50- typ : u32 ,
50+ typ : TagType ,
5151 size : u32 ,
5252 pointer : u32 ,
5353}
@@ -56,7 +56,7 @@ pub struct EFIImageHandle32 {
5656#[ derive( Debug ) ]
5757#[ repr( C ) ]
5858pub struct EFIImageHandle64 {
59- typ : u32 ,
59+ typ : TagType ,
6060 size : u32 ,
6161 pointer : u64 ,
6262}
@@ -66,7 +66,7 @@ pub struct EFIImageHandle64 {
6666#[ derive( Debug ) ]
6767#[ repr( C ) ]
6868pub struct ImageLoadPhysAddr {
69- typ : u32 ,
69+ typ : TagType ,
7070 size : u32 ,
7171 load_base_addr : u32 ,
7272}
@@ -75,7 +75,7 @@ pub struct ImageLoadPhysAddr {
7575#[ derive( Clone , Copy , Debug ) ]
7676#[ repr( C , packed) ]
7777pub struct RsdpV1Tag {
78- typ : u32 ,
78+ typ : TagType ,
7979 size : u32 ,
8080 signature : [ u8 ; 8 ] ,
8181 checksum : u8 ,
@@ -122,7 +122,7 @@ impl RsdpV1Tag {
122122#[ derive( Clone , Copy , Debug ) ]
123123#[ repr( C , packed) ]
124124pub struct RsdpV2Tag {
125- typ : u32 ,
125+ typ : TagType ,
126126 size : u32 ,
127127 signature : [ u8 ; 8 ] ,
128128 checksum : u8 ,
0 commit comments