Reorder heap initialization

This commit is contained in:
Zhang Junyang
2024-12-31 14:37:51 +08:00
committed by Tate, Hongliang Tian
parent 5ea366bced
commit 7676f8ec95
4 changed files with 14 additions and 13 deletions

View File

@ -12,7 +12,7 @@ use core::str::FromStr;
use log::{LevelFilter, Metadata, Record};
use spin::Once;
use crate::boot::BOOT_TIME_INFO;
use crate::boot::EARLY_INFO;
static LOGGER: Logger = Logger::new();
@ -82,7 +82,7 @@ pub(crate) fn init() {
}
fn get_log_level() -> Option<LevelFilter> {
let kcmdline = BOOT_TIME_INFO.get().unwrap().kernel_cmdline;
let kcmdline = EARLY_INFO.get().unwrap().kernel_cmdline;
// Although OSTD is agnostic of the parsing of the kernel command line,
// the logger assumes that it follows the Linux kernel command line format.