Browse Source

fix rsdp dependency and use getters

Tom Dohrmann 3 years ago
parent
commit
8847d8023a
2 changed files with 3 additions and 3 deletions
  1. 1 1
      acpi/Cargo.toml
  2. 2 2
      acpi/src/lib.rs

+ 1 - 1
acpi/Cargo.toml

@@ -12,4 +12,4 @@ edition = "2018"
 [dependencies]
 log = "0.4"
 bit_field = "0.10"
-rsdp = "1"
+rsdp = { version = "1", path = "../rsdp" }

+ 2 - 2
acpi/src/lib.rs

@@ -163,7 +163,7 @@ where
 
             let num_tables = (mapping.length as usize - mem::size_of::<SdtHeader>()) / mem::size_of::<u32>();
             let tables_base =
-                ((mapping.virtual_start.as_ptr() as usize) + mem::size_of::<SdtHeader>()) as *const u32;
+                ((mapping.virtual_start().as_ptr() as usize) + mem::size_of::<SdtHeader>()) as *const u32;
 
             for i in 0..num_tables {
                 result.process_sdt(unsafe { *tables_base.offset(i as isize) as usize })?;
@@ -176,7 +176,7 @@ where
 
             let num_tables = (mapping.length as usize - mem::size_of::<SdtHeader>()) / mem::size_of::<u64>();
             let tables_base =
-                ((mapping.virtual_start.as_ptr() as usize) + mem::size_of::<SdtHeader>()) as *const u64;
+                ((mapping.virtual_start().as_ptr() as usize) + mem::size_of::<SdtHeader>()) as *const u64;
 
             for i in 0..num_tables {
                 result.process_sdt(unsafe { *tables_base.offset(i as isize) as usize })?;