XHCI big clean up, #define necessary bits for readability, change .clang-format options
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 3m5s
Build documentation / build-and-deploy (push) Successful in 3m50s

This commit is contained in:
2026-03-31 22:51:51 +02:00
parent 8f1e24653d
commit ee0e56928d
14 changed files with 401 additions and 119 deletions

View File

@@ -272,8 +272,11 @@ uintptr_t mm_p2v (struct pd* pd, uintptr_t paddr) {
for (size_t i1 = 0; i1 < 512; i1++) {
if ((pml1[i1] & AMD64_PG_PRESENT) && ((pml1[i1] & ~0xFFFULL) == (paddr & ~0xFFFULL))) {
struct pg_index idx = {i4, i3, i2, i1};
ret = (((uint64_t)idx.pml4 << 39) | ((uint64_t)idx.pml3 << 30) |
((uint64_t)idx.pml2 << 21) | ((uint64_t)idx.pml1 << 12) | (paddr & 0xFFFULL));
ret = (((uint64_t)idx.pml4 << 39) |
((uint64_t)idx.pml3 << 30) |
((uint64_t)idx.pml2 << 21) |
((uint64_t)idx.pml1 << 12) |
(paddr & 0xFFFULL));
goto done;
}
}