feat: power down dGPUs on hybrid graphics laptops

This commit is contained in:
daniel committed 2026-10-01 13:09:26 +02:00
1 parent 7f12e1a150
commit 24f88ec4c6
23 files changed
+4325 -1130

No files matched your search

+4
View File
@@ -213,6 +213,10 @@ namespace Memory::VMM {
PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
SetLeafPte(pageEntry, physicalAddress, false, true, true);
// The page may have been mapped before with other cache attributes
// (an HHDM page remapped uncached): drop any stale translation.
asm volatile("invlpg (%0)" :: "r"(virtualAddress) : "memory");
}
void Paging::MapUser(std::uint64_t physicalAddress, std::uint64_t virtualAddress) {