Skip to content

Commit 24ef7f7

Browse files
YtvwlDIsaacWoods
authored andcommitted
rsdp: Make whole RSDP readable
1 parent a77817f commit 24ef7f7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

rsdp/src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ impl Rsdp {
169169
Ok(())
170170
}
171171

172+
pub fn signature(&self) -> [u8; 8] {
173+
self.signature
174+
}
175+
176+
pub fn checksum(&self) -> u8 {
177+
self.checksum
178+
}
179+
172180
pub fn oem_id(&self) -> &str {
173181
str::from_utf8(&self.oem_id).unwrap()
174182
}
@@ -181,10 +189,20 @@ impl Rsdp {
181189
self.rsdt_address
182190
}
183191

192+
pub fn length(&self) -> u32 {
193+
assert!(self.revision > 0, "Tried to read extended RSDP field with ACPI Version 1.0");
194+
self.length
195+
}
196+
184197
pub fn xsdt_address(&self) -> u64 {
185198
assert!(self.revision > 0, "Tried to read extended RSDP field with ACPI Version 1.0");
186199
self.xsdt_address
187200
}
201+
202+
pub fn ext_checksum(&self) -> u8 {
203+
assert!(self.revision > 0, "Tried to read extended RSDP field with ACPI Version 1.0");
204+
self.ext_checksum
205+
}
188206
}
189207

190208
/// Find the areas we should search for the RSDP in.

0 commit comments

Comments
 (0)