File tree Expand file tree Collapse file tree 5 files changed +6
-19
lines changed
platforms/axplat-aarch64-dyn Expand file tree Collapse file tree 5 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ version = "0.1.0"
11
11
[dependencies ]
12
12
axconfig-macros = " 0.2"
13
13
axplat = {git = " https://github.com/arceos-org/axplat_crates" }
14
- pie-boot = {version = " 0.2.1 " }
14
+ pie-boot = {version = " 0.2.2 " }
15
15
any-uart = " 0.2.11"
16
16
spin = " 0.10"
17
17
axcpu = { workspace = true }
Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ use core::ptr::NonNull;
3
3
use any_uart:: { Receiver , Sender } ;
4
4
use axplat:: console:: ConsoleIf ;
5
5
use fdt_parser:: Fdt ;
6
+ use pie_boot:: boot_info;
6
7
use spin:: Mutex ;
7
8
8
- use crate :: boot_info;
9
-
10
9
static TX : Mutex < Option < Sender > > = Mutex :: new ( None ) ;
11
10
static RX : Mutex < Option < Receiver > > = Mutex :: new ( None ) ;
12
11
@@ -74,7 +73,7 @@ fn getchar() -> Option<u8> {
74
73
let mut g = RX . lock ( ) ;
75
74
if let Some ( rx) = g. as_mut ( ) {
76
75
any_uart:: block!( rx. read( ) ) . ok ( )
77
- } else {
76
+ } else {
78
77
None
79
78
}
80
79
}
Original file line number Diff line number Diff line change @@ -18,20 +18,10 @@ mod config {
18
18
axconfig_macros:: include_configs!( path_env = "AX_CONFIG_PATH" , fallback = "axconfig.toml" ) ;
19
19
}
20
20
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
-
25
21
#[ pie_boot:: entry]
26
22
fn main ( args : & BootInfo ) -> ! {
27
- BOOT_INFO . call_once ( move || args. clone ( ) ) ;
28
-
29
23
axplat:: call_main (
30
24
args. cpu_id ,
31
25
args. fdt . map ( |p| p. as_ptr ( ) as usize ) . unwrap_or_default ( ) ,
32
26
) ;
33
27
}
34
-
35
- fn boot_info ( ) -> & ' static BootInfo {
36
- BOOT_INFO . wait ( )
37
- }
Original file line number Diff line number Diff line change 1
1
use axplat:: mem:: { MemIf , RawRange } ;
2
2
use heapless:: Vec ;
3
- use pie_boot:: MemoryRegionKind ;
3
+ use pie_boot:: { MemoryRegionKind , boot_info } ;
4
4
use spin:: { Mutex , Once } ;
5
5
6
- use crate :: boot_info;
7
-
8
6
struct MemIfImpl ;
9
7
10
8
static RAM_LIST : Once < Vec < RawRange , 32 > > = Once :: new ( ) ;
You can’t perform that action at this time.
0 commit comments