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

Simplify MappedPageTable type? #81

Closed
phil-opp opened this issue Jul 8, 2019 · 0 comments · Fixed by #83
Closed

Simplify MappedPageTable type? #81

phil-opp opened this issue Jul 8, 2019 · 0 comments · Fixed by #83

Comments

@phil-opp
Copy link
Member

phil-opp commented Jul 8, 2019

Currently the MappedPageTable is generic over a PhysToVirt function (Fn(PhysFrame) -> *mut PageTable). This makes it quite awkward to use in statics (see phil-opp/blog_os#639 (comment)).

The question is: Does anybody use anything other than a simple offset to implement this function? If not, we could replace the generic PhysToVirt closure with a simple physical_memory_offset integer to make it much simpler.

bors bot added a commit that referenced this issue Jul 17, 2019
83: Add a new `OffsetPageTable` mapper type r=phil-opp a=phil-opp

The type wraps a `MappedPageTable` instance with a simpler interface. It uses a simple phys-to-virt offset instead of being generic over a phys-to-virt closure, which makes it easier to e.g. store the type in a `static`.

TODO:

- [x] Make `phys_offset` a `VirtAddr` instead of an `u64` 

Fixes #81 

Co-authored-by: Philipp Oppermann <[email protected]>
bors bot added a commit that referenced this issue Jul 17, 2019
83: Add a new `OffsetPageTable` mapper type r=phil-opp a=phil-opp

The type wraps a `MappedPageTable` instance with a simpler interface. It uses a simple phys-to-virt offset instead of being generic over a phys-to-virt closure, which makes it easier to e.g. store the type in a `static`.

TODO:

- [x] Make `phys_offset` a `VirtAddr` instead of an `u64` 

Fixes #81 

Co-authored-by: Philipp Oppermann <[email protected]>
@bors bors bot closed this as completed in #83 Jul 17, 2019
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 a pull request may close this issue.

1 participant