-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a couple of bugs in MMIO HAL code.
By the looks of it this path was triggered on specific circumstances (namely, you use xAPIC instead of x2APIC as the latter uses MSRs instead of MMIO). First bug: the offsets were wrong. Even though I say so myself in the comments that it's not _byte_ offsets but rather `u32` offsets I promptly forgot to heed my own warnings and treated the offsets as bytes. Oops. Second bug: when deallocating the MMIO memory range, we need to restore the page table entry for that vaddr range we used, and the reconstructed one was wrong (I think the encrypted bit was AWOL). Instead of trying to rebuild the PTE from scratch, we now just cache the old entry and restore it later. Third bug: there was an errant `todo!()` that should never been committed. We need better testing around this, as this should have been caught earlier. Change-Id: I9721a7ce7f3298631c8005bf0d8cee8ced1f33af
- Loading branch information
Showing
2 changed files
with
19 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters