Skip to content

UEFI Allocator: add PAGE_SIZE shortcut #1611

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 5 commits into from
Apr 16, 2025
Merged

UEFI Allocator: add PAGE_SIZE shortcut #1611

merged 5 commits into from
Apr 16, 2025

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Apr 7, 2025

Please review this commit-by-commit.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@phip1611 phip1611 requested a review from nicholasbishop April 7, 2025 08:43
@phip1611 phip1611 force-pushed the globalalloc branch 2 times, most recently from c3e3819 to b8edf4c Compare April 7, 2025 08:49
@phip1611 phip1611 self-assigned this Apr 7, 2025
@phip1611 phip1611 mentioned this pull request Apr 7, 2025
13 tasks
@nicholasbishop
Copy link
Member

General note: there are a lot of changes going on in this PR. I know it's broken down more clearly by commit, but especially when I'm just "allocating" (😉) 5 or 10 minutes of review time to a PR it helps to have less stuff in each one. E.g. the implementation of alloc_api could go in a separate PR from the PAGE_SIZE allocation changes.

@phip1611 phip1611 changed the title uefi: (global) Allocator: add PAGE_SIZE shortcut + implement allocator_api UEFI Allocator: Implement cores allocator_api: add PAGE_SIZE shortcut Apr 14, 2025
@phip1611 phip1611 changed the title UEFI Allocator: Implement cores allocator_api: add PAGE_SIZE shortcut UEFI Allocator: add PAGE_SIZE shortcut Apr 14, 2025
@phip1611 phip1611 marked this pull request as draft April 14, 2025 20:28
@phip1611 phip1611 marked this pull request as ready for review April 15, 2025 11:42
@phip1611 phip1611 requested a review from nicholasbishop April 15, 2025 11:42
Allocating page-aligned memory via the global allocator is not
uncommon for UEFI OS loaders. Therefore, it is feasible to use a
shortcut in the allocator, and directly use boot::allocate_pages()
rather than boot::allocate_pool().

We can look at the TRACE messages of `cargo xtask run` to
verify that the shortcut is taken.
@nicholasbishop nicholasbishop added this pull request to the merge queue Apr 16, 2025
Merged via the queue into main with commit f1141b9 Apr 16, 2025
20 checks passed
@nicholasbishop nicholasbishop deleted the globalalloc branch April 16, 2025 17:28
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