Skip to content

Commit d8ec443

Browse files
committed
xxx
1 parent 9380151 commit d8ec443

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

integration-test/bins/multiboot2_chainloader/src/main.rs

+15-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@ fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
2323
assert_eq!(multiboot_magic, multiboot2::MAGIC);
2424
let mbi = unsafe { multiboot2::BootInformation::load(multiboot_hdr.cast()) }.unwrap();
2525

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+
2638
if let Some(mmap) = mbi.efi_memory_map_tag() {
2739
log::debug!("efi memory map:",);
28-
for desc in mmap.memory_areas() {
40+
for desc in mmap.memory_areas().take(2) {
2941
log::warn!(
3042
" start=0x{:016x?} size={:016x?} type={:?}, attr={:?}",
3143
desc.phys_start,
@@ -35,6 +47,7 @@ fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
3547
);
3648
}
3749
}
50+
panic!();
3851

39-
loader::load_module(&mbi);
52+
//loader::load_module(&mbi);
4053
}

shell.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let
22
sources = import ./nix/sources.nix;
3-
pkgs = import sources.nixpkgs {};
3+
pkgs = import sources.nixpkgs { };
44
in
55
pkgs.mkShell rec {
66
packages = with pkgs; [
@@ -10,12 +10,12 @@ pkgs.mkShell rec {
1010
niv
1111

1212
# integration test
13-
grub2 # for grub-file
13+
grub2 # for grub-file
1414
qemu
1515
xorriso
1616

1717
(pkgs.writeShellScriptBin "run-integrationtest" ''
18-
./integration-test/run.sh
18+
./integration-test/run.sh
1919
'')
2020
];
2121

0 commit comments

Comments
 (0)