Skip to content
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

Map BIOS stage-4 at lower address to avoid conflicts with the kernel #337

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

phil-opp
Copy link
Member

Parts of stage-4 need to be identity-mapped. This can lead to 'page already mapped' errors when the kernel already occupies the virtual address corresponding to the physical address of the stage-4. For example, a typical virtual start address of the kernel is 2MiB. This was where we placed the stage-4 in physical memory before. This commit avoids that conflict by keeping the stage-4 below the 2MiB boundary.

Fixes #331

Parts of stage-4 need to be identity-mapped. This can lead to 'page already mapped' errors when the kernel already occupies the virtual address corresponding to the physical address of the stage-4. For example, a typical virtual start address of the kernel is 2MiB. This was where we placed the stage-4 in physical memory before. This commit avoids that conflict by keeping the stage-4 below the 2MiB boundary.
@phil-opp
Copy link
Member Author

@an-owl Could you try whether this fixes #331 for you?

@an-owl
Copy link

an-owl commented Jan 27, 2023

Thanks that works

@phil-opp phil-opp merged commit 093a338 into main Jan 29, 2023
@phil-opp phil-opp deleted the fix-stage-4-panic branch January 29, 2023 13:00
@phil-opp phil-opp mentioned this pull request Mar 12, 2023
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.

Panic in stage 4 in BIOS boot
2 participants