File tree 2 files changed +18
-5
lines changed
integration-test/bins/multiboot2_chainloader/src
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,21 @@ fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
23
23
assert_eq ! ( multiboot_magic, multiboot2:: MAGIC ) ;
24
24
let mbi = unsafe { multiboot2:: BootInformation :: load ( multiboot_hdr. cast ( ) ) } . unwrap ( ) ;
25
25
26
+ if let Some ( mmap) = mbi. memory_map_tag ( ) {
27
+ log:: debug!( "old memory map:" , ) ;
28
+ for desc in & mmap. memory_areas ( ) [ 0 ..2 ] {
29
+ log:: warn!(
30
+ " start=0x{:016x?} size={:016x?} type={:?}" ,
31
+ desc. start_address( ) ,
32
+ desc. size( ) ,
33
+ desc. typ( ) ,
34
+ ) ;
35
+ }
36
+ }
37
+
26
38
if let Some ( mmap) = mbi. efi_memory_map_tag ( ) {
27
39
log:: debug!( "efi memory map:" , ) ;
28
- for desc in mmap. memory_areas ( ) {
40
+ for desc in mmap. memory_areas ( ) . take ( 2 ) {
29
41
log:: warn!(
30
42
" start=0x{:016x?} size={:016x?} type={:?}, attr={:?}" ,
31
43
desc. phys_start,
@@ -35,6 +47,7 @@ fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
35
47
) ;
36
48
}
37
49
}
50
+ panic ! ( ) ;
38
51
39
- loader:: load_module ( & mbi) ;
52
+ // loader::load_module(&mbi);
40
53
}
Original file line number Diff line number Diff line change 1
1
let
2
2
sources = import ./nix/sources.nix ;
3
- pkgs = import sources . nixpkgs { } ;
3
+ pkgs = import sources . nixpkgs { } ;
4
4
in
5
5
pkgs . mkShell rec {
6
6
packages = with pkgs ; [
@@ -10,12 +10,12 @@ pkgs.mkShell rec {
10
10
niv
11
11
12
12
# integration test
13
- grub2 # for grub-file
13
+ grub2 # for grub-file
14
14
qemu
15
15
xorriso
16
16
17
17
( pkgs . writeShellScriptBin "run-integrationtest" ''
18
- ./integration-test/run.sh
18
+ ./integration-test/run.sh
19
19
'' )
20
20
] ;
21
21
You can’t perform that action at this time.
0 commit comments