Skip to content

multiboot2: cleanup of debug format output #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2023
Merged

multiboot2: cleanup of debug format output #167

merged 1 commit into from
Jul 13, 2023

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Jul 13, 2023

Debug output of the Multiboot2 Boot Info is now much nicer. All tags appear in alphabetical order. Example taken from the integration test:

Multiboot2BootInformation {
    start_address: 0x1065a8,
    end_address: 0x1068e8,
    total_size: 0x340,
    basic_memory_info: Some(
        BasicMemoryInfoTag {
            typ: BasicMeminfo,
            size: 0x10,
            memory_lower: 0x27f,
            memory_upper: 0x5b80,
        },
    ),
    boot_loader_name: Some(
        BootLoaderNameTag {
            typ: BootLoaderName,
            size: 0x12,
            name: Ok(
                "GRUB 2.06",
            ),
        },
    ),
    command_line: Some(
        CommandLineTag {
            typ: Cmdline,
            size: 0x23,
            cmdline: Ok(
                "some commandline arguments",
            ),
        },
    ),
    efi_bs_not_exited: None,
    efi_memory_map: None,
    efi_sdt_32: None,
    efi_sdt_64: None,
    efi_ih_32: None,
    efi_ih_64: None,
    elf_sections (count): 0x8,
    framebuffer: Some(
        Ok(
            FramebufferTag {
                typ: Framebuffer,
                size: 0x20,
                buffer_type: Ok(
                    Text,
                ),
                address: 0xb8000,
                pitch: 0xa0,
                width: 0x50,
                height: 0x19,
                bpp: 0x10,
            },
        ),
    ),
    load_base_addr: Some(
        ImageLoadPhysAddrTag {
            typ: LoadBaseAddr,
            size: 0xc,
            load_base_addr: 0x1000000,
        },
    ),
    memory_map: Some(
        MemoryMapTag {
            typ: Mmap,
            size: 0xb8,
            entry_size: 0x18,
            entry_version: 0x0,
            areas: [
                MemoryArea {
                    base_addr: 0x0,
                    length: 0x9fc00,
                    typ: Available,
                },
                MemoryArea {
                    base_addr: 0x9fc00,
                    length: 0x400,
                    typ: Reserved,
                },
                MemoryArea {
                    base_addr: 0xf0000,
                    length: 0x10000,
                    typ: Reserved,
                },
                MemoryArea {
                    base_addr: 0x100000,
                    length: 0x16e0000,
                    typ: Available,
                },
                MemoryArea {
                    base_addr: 0x17e0000,
                    length: 0x20000,
                    typ: Reserved,
                },
                MemoryArea {
                    base_addr: 0xfffc0000,
                    length: 0x40000,
                    typ: Reserved,
                },
                MemoryArea {
                    base_addr: 0xfd00000000,
                    length: 0x300000000,
                    typ: Reserved,
                },
            ],
        },
    ),
    modules: [
        ModuleTag {
            type: Module,
            size: 0x1c,
            mod_start: 0x107000,
            mod_end: 0x107162,
            mod_size: 0x162,
            cmdline: Ok(
                "grub-config",
            ),
        },
    ],
    rsdp_v1: Some(
        RsdpV1Tag {
            typ: AcpiV1,
            size: 0x1c,
            signature: [
                0x52,
                0x53,
                0x44,
                0x20,
                0x50,
                0x54,
                0x52,
                0x20,
            ],
            checksum: 0xcf,
            oem_id: [
                0x42,
                0x4f,
                0x43,
                0x48,
                0x53,
                0x20,
            ],
            revision: 0x0,
            rsdt_address: 0x17e1aea,
        },
    ),
    rsdp_v2: None,
    smbios_tag: None,
    vbe_info_tag: None,
}

@phip1611 phip1611 merged commit ec0e777 into main Jul 13, 2023
@phip1611 phip1611 deleted the foobar branch July 13, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant