From cca76dc53fa080ba4f188d8c2432a65099a4e8c0 Mon Sep 17 00:00:00 2001 From: James Martin Date: Sat, 24 Oct 2020 15:06:03 -0700 Subject: [PATCH] Updated dependencies (incl. major version bumps) and Rust toolchain. --- Cargo.lock | 38 ++++++++++++++++---------------- Cargo.toml | 6 ++--- src/memory/allocator/standard.rs | 6 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 209a0db..171599d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "bit_field" @@ -14,9 +14,9 @@ checksum = "ed8765909f9009617974ab6b7d332625b320b33c326b1e9321382ef1999b5d56" [[package]] name = "bit_field" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a165d606cf084741d4ac3a28fb6e9b1eb0bd31f6cd999098cfddb0b2ab381dc0" +checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" [[package]] name = "bitflags" @@ -43,8 +43,8 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "compiler_builtins" -version = "0.1.32" -source = "git+https://github.com/rust-lang/compiler-builtins#f3846bc05da87b8a71cd1a5a6ff9d980f46b2d0f" +version = "0.1.36" +source = "git+https://github.com/rust-lang/compiler-builtins#33ad3669db0ac78a917aee787304d1391b6dc676" [[package]] name = "log" @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.19" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ "unicode-xid", ] @@ -94,9 +94,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.35" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ "proc-macro2", "quote", @@ -105,18 +105,18 @@ dependencies = [ [[package]] name = "ucs2" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85061f4e43545a613c0da6b87725bf23f8da8613cf2473719c4f71a270c4ce8a" +checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" dependencies = [ - "bit_field 0.10.0", + "bit_field 0.10.1", ] [[package]] name = "uefi" -version = "0.4.7" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08fcd8a8b1c2488ea5adb67f3840584557a7089150c6f209148567397f767e12" +checksum = "43cbf498e073acb4d1f5bd59b5347757b495163ecfce9d18db81c44b99a542fa" dependencies = [ "bitflags", "log", @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "uefi-macros" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a69fa8dd920e84d783769c44560484ade81f6c765cde2e1cc46c754ddf95947" +checksum = "3dcca10ca861f34a320d178f3fdb29ffbf05087fc2c70d2a99860e3329bee1a8" dependencies = [ "proc-macro2", "quote", @@ -143,9 +143,9 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "x86_64" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9144cdef072afe8afcbc511be8f421de5b3eb9f4b8ff7abff369bee38f91e7e3" +checksum = "d5b4b42dbabe13b69023e1a1407d395f1a1a33df76e9a9efdbe303acc907e292" dependencies = [ "bit_field 0.9.0", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index be1c865..0a77b8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,11 +15,11 @@ version = "0.4.11" default-features = false [dependencies.num-integer] -version = "0.1.36" +version = "0.1.43" default-features = false [target.'cfg(target_os = "uefi")'.dependencies] -uefi = "0.4.7" +uefi = "0.6.0" [target.'cfg(target_arch = "x86_64")'.dependencies] -x86_64 = "0.11.1" +x86_64 = "0.12.2" diff --git a/src/memory/allocator/standard.rs b/src/memory/allocator/standard.rs index fdc8bab..0b9ad00 100644 --- a/src/memory/allocator/standard.rs +++ b/src/memory/allocator/standard.rs @@ -2,7 +2,7 @@ use alloc::alloc::GlobalAlloc; use alloc::vec::Vec; use core::alloc::Layout; use core::cell::UnsafeCell; -use uefi::table::boot::MemoryMapIter; +use uefi::table::boot::MemoryDescriptor; // TODO: Support granularity better than pages. // TODO: Use an allocation algorithm that isn't absolute garbage!! @@ -39,7 +39,7 @@ impl StandardAllocator { /// by default, it will behave as though every page were allocated. /// Use `populate` to fill the allocator with actual data /// using the map that UEFI provides when you exit boot services. - pub fn new(mmap: &mut MemoryMapIter) -> StandardAllocator { + pub fn new<'buf>(mmap: &mut impl ExactSizeIterator) -> StandardAllocator { // Try to find the largest physical address // and create a bitmap allowing the allocation of that much memory. let greatest_physical_page = @@ -55,7 +55,7 @@ impl StandardAllocator { } } - pub fn populate(&mut self, mmap: &mut MemoryMapIter) { + pub fn populate<'buf>(&mut self, mmap: &mut impl ExactSizeIterator) { let self_pages = unsafe { &mut *self.pages.get() }; // Mark all unsable memory as free for allocations. for entry in mmap {