@@ -2,6 +2,7 @@ use alloc::borrow::ToOwned;
22use core:: ptr:: write_bytes;
33use core:: sync:: atomic:: { AtomicPtr , Ordering } ;
44use core:: { mem, ptr, slice} ;
5+ use xen_hvm:: start_info:: StartInfo ;
56
67use align_address:: Align ;
78use hermit_entry:: boot_info:: {
@@ -18,6 +19,12 @@ use crate::arch::x86_64::physicalmem::PhysAlloc;
1819use crate :: arch:: x86_64:: { KERNEL_STACK_SIZE , SERIAL_IO_PORT , paging} ;
1920use crate :: fdt:: Fdt ;
2021
22+ unsafe extern "C" {
23+ fn _start ( start_info : & ' static StartInfo ) -> !;
24+ }
25+
26+ xen_hvm:: phys32_entry!( _start) ;
27+
2128unsafe extern "C" {
2229 static mut loader_end: u8 ;
2330}
@@ -38,11 +45,12 @@ mod entry {
3845
3946static MB_INFO : AtomicPtr < MultibootInfo > = AtomicPtr :: new ( ptr:: null_mut ( ) ) ;
4047
41- unsafe extern "C" fn rust_start ( mb_info : * mut MultibootInfo ) -> ! {
42- MB_INFO . store ( mb_info, Ordering :: Relaxed ) ;
43- unsafe {
44- crate :: os:: loader_main ( ) ;
45- }
48+ unsafe extern "C" fn rust_start ( start_info : & ' static StartInfo ) -> ! {
49+ paging:: map :: < Size4KiB > ( 0x2000 , 0x2000 , 1 , PageTableFlags :: empty ( ) ) ;
50+ dbg ! ( start_info) ;
51+ crate :: log:: init ( ) ;
52+ crate :: log_built_info ( ) ;
53+ loop { }
4654}
4755
4856struct Mem ;
0 commit comments