x86_64
x86_64 copied to clipboard
Add ability to add iomap to TSS (take 2)
I've refactored #68 to add a new method which allows you to specify IO permissions bitmap size, rather than incorporating it into the existing method. The existing method is now implemented by calling the new, unsafe method with an io permissions bitmap size of 0.
I've tested this by allowing usermode to access the first serial point and then trying to print, which does work. I'm not sure what kind of other unit tests I should write for this.
I've left out any kind of IoPermissionsBitmap structure for now, as this can be implemented on top of this change, and I'm not quite sure about the specifics (for instance, what if you don't want the full 8192 bytes?).
Maybe it would be possible to write an integration test for this wherein the kernel is dropped to userspace and tests out a few ports? I can't get the integration tests to compile though so I'm unsure how to proceed.
Argh, I should really set up cargo fmt as a pre-commit hook or something.
@josephlr Do you have time to continue your review or should I try to take over?
@Restioson Sorry for the long silence! It seems like @josephlr does no longer have time to review this, so I'll take a look.
Thanks for the review, I will try add the display impl and rebase it shortly! Right now I have a bit of university work to finish but hopefully soon after I can get to this.