MTRR: Fix bug where 2 ANDs should have been ORs

This commit is contained in:
mintsuki 2020-09-27 19:17:36 +02:00
parent 98c5b88f5e
commit f49fad138c
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -85,8 +85,8 @@ bool mtrr_set_range(uint64_t base, uint64_t size, uint8_t memory_type) {
continue;
// Found
wrmsr(0x200 + i * 2, base & memory_type);
wrmsr(0x200 + i * 2 + 1, mask & (1 << 11));
wrmsr(0x200 + i * 2, base | memory_type);
wrmsr(0x200 + i * 2 + 1, mask | (1 << 11));
print("mtrr: Set range in variable MTRR number %u\n", i);
return true;