Skip to content

SMP boot code mapping got broken on Hermit #2402

@cagatay-y

Description

@cagatay-y

It seems like 0c51a72 broke SMP on Hermit. When I start Hermit with

  cargo xtask ci rs --arch x86_64 --profile dev  --package thread_test --smp 4 qemu --accel --sudo

it fails at

// Identity-map the boot code page and copy over the code.
debug!("Mapping SMP boot code to physical and virtual address {SMP_BOOT_CODE_ADDRESS:p}");
let mut flags = PageTableEntryFlags::empty();
flags.normal().writable();
paging::map::<BasePageSize>(
SMP_BOOT_CODE_ADDRESS,
PhysAddr::new(SMP_BOOT_CODE_ADDRESS.as_u64()),
1,
flags,
);
. I do not know if it is the loader that should not map the way it does or the kernel should not assume that the mapping does not exist / is 4 KiB-sized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions