/* * Copyright 2021, Haiku, Inc. * Distributed under the terms of the MIT License. */ #ifndef MMU_H #define MMU_H #include #include #include extern uint8* gMemBase; extern size_t gTotalMem; void mmu_init(); void mmu_init_for_kernel(addr_t& satp); inline addr_t fix_address(addr_t address) { addr_t result; if (platform_bootloader_address_to_kernel_address((void *)address, &result) != B_OK) return address; return result; } template inline void fix_address(FixedWidthPointer& p) { if (p != NULL) p.SetTo(fix_address(p.Get())); } #endif /* MMU_H */