|
ginnOS
The reference: libc, the libraries and the kernel
|
Go to the source code of this file.
Typedefs | |
| typedef uintptr_t | phys_addr_t |
| physical addresses and the conversion between physical and virtual. | |
| typedef uintptr_t phys_addr_t |
physical addresses and the conversion between physical and virtual.
the kernel runs in the higher half and reaches RAM through a direct map: physical address P is at virtual P + KERNEL_VIRT_BASE (up to PHYS_MAP_SIZE). device memory outside RAM is mapped with ioremap instead (kernel/memory/mmio.h), and kernel stacks live in their own region, so virt_to_phys only works on direct-mapped pointers (heap, PMM frames, the kernel image).