From 45acef0c974dafb925731f0adbcee2fd5014d597 Mon Sep 17 00:00:00 2001 From: Able Date: Mon, 7 Feb 2022 03:01:50 -0600 Subject: [PATCH] revert broken changes --- ableos/.cargo/config.toml | 3 +-- ableos/Cargo.lock | 33 --------------------------------- ableos/Cargo.toml | 1 - ableos/src/kmain.rs | 7 +++++++ 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/ableos/.cargo/config.toml b/ableos/.cargo/config.toml index d1fcae5..6edb023 100644 --- a/ableos/.cargo/config.toml +++ b/ableos/.cargo/config.toml @@ -2,8 +2,7 @@ [build] -# target = "./json_targets/x86_64-ableos.json" -target = "x86_64-unknown-uefi" +target = "./json_targets/x86_64-ableos.json" [unstable] build-std = ["core", "compiler_builtins", "alloc"] diff --git a/ableos/Cargo.lock b/ableos/Cargo.lock index 8b8dfe0..feb5fc6 100644 --- a/ableos/Cargo.lock +++ b/ableos/Cargo.lock @@ -47,7 +47,6 @@ dependencies = [ "smoltcp", "spin", "uart_16550", - "uefi", "unicode-width", "vga", "volatile 0.2.7", @@ -621,38 +620,6 @@ dependencies = [ "x86_64", ] -[[package]] -name = "ucs2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] - -[[package]] -name = "uefi" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21398a404f6fa14f6df34756714874eccdf73587eba863cb5bd55d8bada7496" -dependencies = [ - "bitflags", - "log", - "ucs2", - "uefi-macros", -] - -[[package]] -name = "uefi-macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7006b85ae8acaf2b448c5f1630a434caaacaedcc0907f12404e4e31c9dafcdb3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "unicode-width" version = "0.1.9" diff --git a/ableos/Cargo.toml b/ableos/Cargo.toml index e339a5b..ec23671 100644 --- a/ableos/Cargo.toml +++ b/ableos/Cargo.toml @@ -51,7 +51,6 @@ pretty-hex = "0.2.1" unicode-width = "0.1.7" picorand = "*" # watson = "0.4" -uefi = { version="*", features = ["exts"] } [dependencies.rdrand] diff --git a/ableos/src/kmain.rs b/ableos/src/kmain.rs index 802d54f..8cae943 100644 --- a/ableos/src/kmain.rs +++ b/ableos/src/kmain.rs @@ -105,3 +105,10 @@ pub fn log_version_data() { master().unwrap().brand_string().unwrap() ); } + +pub fn generate_process_pass() -> u128 { + use rdrand::RdRand; + let gen = RdRand::new().unwrap(); + let ret = (gen.try_next_u64().unwrap() as u128) << 64 | (gen.try_next_u64().unwrap() as u128); + ret +}