oxidecomputer / phbl

Pico Host Boot Loader
Mozilla Public License 2.0
98 stars 7 forks source link

memory: Convert `phbl` to use strict provenance #12

Closed dancrossnyc closed 2 years ago

dancrossnyc commented 2 years ago

This is the first cut of getting phbl working with the strict provenance infrastructure: https://github.com/rust-lang/rust/issues/95228

This found a bug: we were using then_some to return pointers to page tables that were not necessarily present; the fix is to use then and a closure. Lambda combinators for the win!

Signed-off-by: Dan Cross cross@oxidecomputer.com

dancrossnyc commented 2 years ago

Tested on sn14.

dancrossnyc commented 2 years ago

Thanks for the review! Pushing without retesting as the only changes were to comments.