Skip to content

Commit 14a70a2

Browse files
committed
update
1 parent 4bac750 commit 14a70a2

File tree

5 files changed

+6
-19
lines changed

5 files changed

+6
-19
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

platforms/axplat-aarch64-dyn/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version = "0.1.0"
1111
[dependencies]
1212
axconfig-macros = "0.2"
1313
axplat = {git = "https://github.com/arceos-org/axplat_crates"}
14-
pie-boot = {version = "0.2.1"}
14+
pie-boot = {version = "0.2.2"}
1515
any-uart = "0.2.11"
1616
spin = "0.10"
1717
axcpu = { workspace = true }

platforms/axplat-aarch64-dyn/src/console.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ use core::ptr::NonNull;
33
use any_uart::{Receiver, Sender};
44
use axplat::console::ConsoleIf;
55
use fdt_parser::Fdt;
6+
use pie_boot::boot_info;
67
use spin::Mutex;
78

8-
use crate::boot_info;
9-
109
static TX: Mutex<Option<Sender>> = Mutex::new(None);
1110
static RX: Mutex<Option<Receiver>> = Mutex::new(None);
1211

@@ -74,7 +73,7 @@ fn getchar() -> Option<u8> {
7473
let mut g = RX.lock();
7574
if let Some(rx) = g.as_mut() {
7675
any_uart::block!(rx.read()).ok()
77-
}else{
76+
} else {
7877
None
7978
}
8079
}

platforms/axplat-aarch64-dyn/src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,10 @@ mod config {
1818
axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "axconfig.toml");
1919
}
2020

21-
// Use `.data` section to prevent being cleaned by `clean_bss`.
22-
#[unsafe(link_section = ".data")]
23-
static BOOT_INFO: Once<BootInfo> = Once::new();
24-
2521
#[pie_boot::entry]
2622
fn main(args: &BootInfo) -> ! {
27-
BOOT_INFO.call_once(move || args.clone());
28-
2923
axplat::call_main(
3024
args.cpu_id,
3125
args.fdt.map(|p| p.as_ptr() as usize).unwrap_or_default(),
3226
);
3327
}
34-
35-
fn boot_info() -> &'static BootInfo {
36-
BOOT_INFO.wait()
37-
}

platforms/axplat-aarch64-dyn/src/mem.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
use axplat::mem::{MemIf, RawRange};
22
use heapless::Vec;
3-
use pie_boot::MemoryRegionKind;
3+
use pie_boot::{MemoryRegionKind, boot_info};
44
use spin::{Mutex, Once};
55

6-
use crate::boot_info;
7-
86
struct MemIfImpl;
97

108
static RAM_LIST: Once<Vec<RawRange, 32>> = Once::new();

0 commit comments

Comments
 (0)