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

pmm: simpler and bugfix process_memory_range loop #339

Open
wants to merge 2 commits into
base: mainline
Choose a base branch
from

Conversation

sktt
Copy link
Contributor

@sktt sktt commented Jan 16, 2024

This simplifies the adding of frames during boot. It also fixes a bug for configurations with > 1GB memory. After the initial 4K frames, the current (cur) is aligned to 2MB. Trying to add a 1GB frame at this point will lead to page faults further down the line as we end up with misaligned page frame mfns.

I am pretty unsure about what I did to the index <= first_avail_region (completely dropped it). Let me know if this should be included still somehow.

@sktt sktt requested a review from a team as a code owner January 16, 2024 19:15
Copy link
Contributor

@wipawel wipawel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial structure review. I will take another look after the modifications.

mm/pmm.c Outdated Show resolved Hide resolved
mm/pmm.c Show resolved Hide resolved
mm/pmm.c Outdated Show resolved Hide resolved
mm/pmm.c Outdated Show resolved Hide resolved
mm/pmm.c Outdated Show resolved Hide resolved
@sktt sktt force-pushed the pmm-loop branch 3 times, most recently from 4850686 to 2c43bd7 Compare February 23, 2024 15:16
This simplifies the adding of frames during boot. It also fixes a bug for
configurations with > 1GB memory. After the initial 4K frames, the current
(`cur`) is aligned to 2MB.  Trying to add a 1GB frame at this point will
lead to page faults further down the line as we end up with misaligned page
frame mfns.

Signed-off-by: Johannes Wikner <[email protected]>
Previously used but with the current pmm loop, there's no need for it.

Signed-off-by: Johannes Wikner <[email protected]>
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.

2 participants