Write combining is useable on real hardware, significantly improving scroll performance

This commit is contained in:
Jeremy Soller 2016-09-01 16:14:42 -06:00
parent ff4d06f678
commit 817638b7aa
2 changed files with 22 additions and 2 deletions

View file

@ -102,7 +102,7 @@ pub unsafe fn init(active_table: &mut ActivePageTable) {
let start_frame = Frame::containing_address(PhysicalAddress::new(onscreen));
let end_frame = Frame::containing_address(PhysicalAddress::new(onscreen + size * 4 - 1));
for frame in Frame::range_inclusive(start_frame, end_frame) {
active_table.identity_map(frame, entry::PRESENT | entry::WRITABLE | entry::NO_EXECUTE);
active_table.identity_map(frame, entry::HUGE_PAGE /*actually sets PAT for write combining*/ | entry::PRESENT | entry::WRITABLE | entry::NO_EXECUTE);
}
}