Skip to content

Commit c92e6f7

Browse files
committed
feat(env): drop support for non-FDT bootargs
1 parent 8bdee86 commit c92e6f7

4 files changed

Lines changed: 2 additions & 19 deletions

File tree

src/arch/aarch64/kernel/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ pub mod systemtime;
1616

1717
use alloc::alloc::{Layout, alloc};
1818
use core::arch::global_asm;
19+
use core::ptr;
1920
use core::sync::atomic::{AtomicPtr, AtomicU32, Ordering};
20-
use core::{ptr, str};
2121

2222
use crate::arch::aarch64::kernel::core_local::*;
2323
use crate::arch::aarch64::mm::paging::{BasePageSize, PageSize};
@@ -58,10 +58,6 @@ pub fn get_processor_count() -> u32 {
5858
1
5959
}
6060

61-
pub fn args() -> Option<&'static str> {
62-
None
63-
}
64-
6561
/// Real Boot Processor initialization as soon as we have put the first Welcome message on the screen.
6662
#[cfg(target_os = "none")]
6763
pub fn boot_processor_init() {

src/arch/riscv64/kernel/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ pub fn get_processor_count() -> u32 {
5858
1
5959
}
6060

61-
pub fn args() -> Option<&'static str> {
62-
None
63-
}
64-
6561
pub fn get_hart_mask() -> u64 {
6662
HART_MASK.load(Ordering::Relaxed)
6763
}

src/arch/x86_64/kernel/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ pub fn is_uhyve_with_pci() -> bool {
6868
)
6969
}
7070

71-
pub fn args() -> Option<&'static str> {
72-
match env::boot_info().platform_info {
73-
PlatformInfo::Multiboot { command_line, .. }
74-
| PlatformInfo::LinuxBootParams { command_line, .. } => command_line,
75-
_ => None,
76-
}
77-
}
78-
7971
/// Real Boot Processor initialization as soon as we have put the first Welcome message on the screen.
8072
#[cfg(target_os = "none")]
8173
pub fn boot_processor_init() {

src/env/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use memory_addresses::PhysAddr;
1818
#[cfg(not(feature = "common-os"))]
1919
pub(crate) use self::executable::tls::TlsInfo;
2020
pub(crate) use self::executable::{executable_ptr_range, log_segments};
21-
use crate::arch::kernel;
2221

2322
static BOOT_INFO: OnceCell<BootInfo> = OnceCell::new();
2423

@@ -97,7 +96,7 @@ impl Default for Cli {
9796
RandomState::with_seeds(0, 0, 0, 0),
9897
);
9998

100-
let args = kernel::args().or_else(fdt_args).unwrap_or_default();
99+
let args = fdt_args().unwrap_or_default();
101100
info!("bootargs = {args}");
102101
let words = shell_words::split(args).unwrap();
103102

0 commit comments

Comments
 (0)