Browse Source

Merge pull request #52 from IsaacWoods/master

* Return u64 from MemoryArea::size
* Add comments clarifying truncation of physical XSDT address on x86
Isaac Woods 6 years ago
parent
commit
226c2a390b
3 changed files with 5 additions and 3 deletions
  1. 1 1
      Cargo.toml
  2. 2 2
      src/memory_map.rs
  3. 2 0
      src/rsdp.rs

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "multiboot2"
-version = "0.7.0"
+version = "0.7.1"
 authors = ["Philipp Oppermann <dev@phil-opp.com>", "Calvin Lee <cyrus296@gmail.com>"]
 license = "MIT/Apache-2.0"
 description = "An experimental Multiboot 2 crate for ELF-64/32 kernels."

+ 2 - 2
src/memory_map.rs

@@ -38,8 +38,8 @@ impl MemoryArea {
         (self.base_addr + self.length)
     }
 
-    pub fn size(&self) -> usize {
-        self.length as usize
+    pub fn size(&self) -> u64 {
+        self.length
     }
 }
 

+ 2 - 0
src/rsdp.rs

@@ -37,6 +37,7 @@ impl RsdpV1Tag {
         self.revision
     }
 
+    /// Get the physical address of the RSDT.
     pub fn rsdt_address(&self) -> usize {
         self.rsdt_address as usize
     }
@@ -75,6 +76,7 @@ impl RsdpV2Tag {
         self.revision
     }
 
+    /// Get the physical address of the XSDT. On x86, this is truncated from 64-bit to 32-bit.
     pub fn xsdt_address(&self) -> usize {
         self.xsdt_address as usize
     }