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

cleanup/follow-up: memory_map #1240

Merged
merged 6 commits into from
Jul 27, 2024
Merged

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Jul 14, 2024

This is a follow-up to our recent additions to the memory map. This ensures a good maintainability in the future.

Changes

IMHO, multiple smaller modules are a better replacement for the gigantic module.

Steps to undraft

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 self-assigned this Jul 14, 2024
@phip1611 phip1611 changed the title cleanup followup mem Draft: cleanup followup mem Jul 14, 2024
@phip1611 phip1611 marked this pull request as draft July 14, 2024 07:46
@phip1611 phip1611 marked this pull request as ready for review July 15, 2024 08:50
@phip1611 phip1611 changed the title Draft: cleanup followup mem cleanup followup mem Jul 15, 2024
@phip1611 phip1611 requested a review from nicholasbishop July 15, 2024 08:50
@nicholasbishop
Copy link
Member

Definitely agree that splitting out some smaller modules is good.

A couple naming thoughts:

  • How about memory_map or just memory instead of mmap? Otherwise it sounds like mmap(2)
  • Maybe move it up to a top-level module like uefi::memory. Although the memory map is retrieved with a boot-services function, it continues to be relevant after exiting boot services, so thematically I think it makes sense at the top level.

@phip1611 phip1611 force-pushed the mem-follow-up branch 2 times, most recently from b03335a to cfc6b2e Compare July 27, 2024 10:31
@phip1611 phip1611 changed the title cleanup followup mem cleanup/follow-up: memory_map Jul 27, 2024
@phip1611
Copy link
Member Author

phip1611 commented Jul 27, 2024

This is now ready for the second review round, @nicholasbishop

@phip1611 phip1611 marked this pull request as draft July 27, 2024 10:54
@phip1611 phip1611 marked this pull request as ready for review July 27, 2024 12:50
@phip1611 phip1611 force-pushed the mem-follow-up branch 3 times, most recently from c23c1c3 to 09a8c42 Compare July 27, 2024 13:03
phip1611 and others added 2 commits July 27, 2024 20:22
As deprecated re-exports are unsupported [0], we go the hard way and
just make it a breaking change.

Along the way, I reordered some statements in some files to follow our typical
order of:
- pub mod
- private mod
- pub use
- private use

[0] rust-lang/rust#30827
@nicholasbishop nicholasbishop added this pull request to the merge queue Jul 27, 2024
Merged via the queue into rust-osdev:main with commit 479868f Jul 27, 2024
12 checks passed
@phip1611 phip1611 deleted the mem-follow-up branch July 27, 2024 20:21
@phip1611 phip1611 mentioned this pull request Dec 16, 2024
1 task
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