Skip to content

Commit 060c473

Browse files
committed
chore: maintaining lab code
1 parent 68df9c9 commit 060c473

4 files changed

Lines changed: 51 additions & 27 deletions

File tree

src/0x01/crates/boot/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ pub use fs::*;
2222
#[macro_use]
2323
extern crate log;
2424

25-
pub type MemoryMap = ArrayVec<MemoryDescriptor, 256>;
26-
2725
/// This structure represents the information that the bootloader passes to the kernel.
2826
pub struct BootInfo {
2927
/// The memory map
30-
pub memory_map: MemoryMap,
28+
pub memory_map: ArrayVec<MemoryDescriptor, 256>,
3129

3230
/// The offset into the virtual address space where the physical memory is mapped.
3331
pub physical_memory_offset: u64,

src/0x01/crates/boot/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn efi_main() -> Status {
6868
// 6. Exit boot and jump to ELF entry
6969
info!("Exiting boot services...");
7070

71-
let mmap = unsafe { uefi::boot::exit_boot_services(MemoryType::LOADER_DATA) };
71+
let mmap = unsafe { uefi::boot::exit_boot_services(None) };
7272
// NOTE: alloc & log are no longer available
7373

7474
// construct BootInfo

src/0x02/Cargo.toml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,35 @@ inherits = "release"
1515
debug = false
1616

1717
[workspace.dependencies]
18-
arrayvec = { version = "0.7", default-features = false }
19-
bit_field = "0.10"
20-
bitflags = "2.10"
21-
crossbeam-queue = { version = "0.3", default-features = false, features = [
22-
"alloc",
23-
] }
24-
lazy_static = { version = "1.4", features = ["spin_no_std"] }
25-
libm = "0.2"
18+
arrayvec = { version = "0.7", default-features = false }
19+
bit_field = "0.10"
20+
bitflags = "2.10"
21+
lazy_static = { version = "1.4", features = ["spin_no_std"] }
22+
libm = "0.2"
2623
linked_list_allocator = "0.10"
27-
log = "0.4"
28-
paste = "1.0"
29-
spin = "0.10"
30-
uefi = { version = "0.36", default-features = false }
31-
x86 = "0.52"
32-
x86_64 = "0.15"
33-
xmas-elf = "0.10"
24+
log = "0.4"
25+
paste = "1.0"
26+
spin = "0.10"
27+
uefi = { version = "0.36", default-features = false }
28+
x86 = "0.52"
29+
x86_64 = "0.15"
30+
xmas-elf = "0.10"
3431

3532
# Local dependencies
3633

3734
boot = { path = "crates/boot", default-features = false, package = "ysos_boot" }
3835
elf = { path = "crates/elf", package = "ysos_elf" }
36+
37+
[workspace.dependencies.ahash]
38+
default-features = false
39+
features = [
40+
"compile-time-rng",
41+
]
42+
version = "0.8"
43+
44+
[workspace.dependencies.crossbeam-queue]
45+
default-features = false
46+
features = [
47+
"alloc",
48+
]
49+
version = "0.3"

src/0x04/Cargo.toml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ arrayvec = { version = "0.7", default-features = false }
2929
bit_field = "0.10"
3030
bitflags = "2.10"
3131
chrono = { version = "0.4", default-features = false }
32+
hashbrown = "0.16"
3233
hex-literal = "1.0"
3334
lazy_static = { version = "1.4", features = ["spin_no_std"] }
3435
libm = "0.2"
@@ -39,8 +40,8 @@ micromath = { version = "2.0", features = ["num-traits"] }
3940
num_enum = { version = "0.7", default-features = false }
4041
paste = "1.0"
4142
pc-keyboard = "0.8"
42-
rand = { version = "0.9", default-features = false }
43-
rand_hc = "0.4"
43+
rand = { version = "0.10", default-features = false }
44+
rand_hc = "0.5"
4445
roaring = { version = "0.11", default-features = false }
4546
spin = "0.10"
4647
uefi = { version = "0.36", default-features = false }
@@ -56,9 +57,23 @@ elf = { path = "crates/elf", package = "ysos_elf" }
5657
lib = { path = "crates/lib", package = "yslib" }
5758
syscall_def = { path = "crates/syscall", package = "ysos_syscall" }
5859

59-
crossbeam-queue = { version = "0.3", default-features = false, features = [
60-
"alloc",
61-
] }
62-
futures-util = { version = "0.3", default-features = false, features = [
63-
"alloc",
64-
] }
60+
[workspace.dependencies.ahash]
61+
default-features = false
62+
features = [
63+
"compile-time-rng"
64+
]
65+
version = "0.8"
66+
67+
[workspace.dependencies.crossbeam-queue]
68+
default-features = false
69+
features = [
70+
"alloc"
71+
]
72+
version = "0.3"
73+
74+
[workspace.dependencies.futures-util]
75+
default-features = false
76+
features = [
77+
"alloc"
78+
]
79+
version = "0.3"

0 commit comments

Comments
 (0)