Changes between Version 2 and Version 3 of kernel_vmem
- Timestamp:
- Mar 31, 2015, 3:55:18 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_vmem
v2 v3 1 1 = Virtual to Physical Address Translation = 2 2 3 The [source:soft/giet_vm/giet_common/vmem.c vmem.c] and [source:soft/giet_vm/giet_common/vmem.h vmem.h] files define the data structures used by the boot-loader and the kernel to implement the paged virtual memory.3 The [source:soft/giet_vm/giet_common/vmem.c vmem.c] and [source:soft/giet_vm/giet_common/vmem.h vmem.h] files define the data structures and functions used by the boot-loader and the kernel to implement the paged virtual memory. 4 4 5 5 [[PageOutline]] … … 18 18 * SPP : Small Physical pages / 4 Kbytes 19 19 20 === unsigned int _v2p_translate( page_table_t* pt, unsigned int vpn, unsigned int* ppn,unsigned int* flags ) ===20 === unsigned long long _v2p_translate( unsigned int vaddr , unsigned int* flags ) === 21 21 22 This function makes a VPN to PPN translation, from the page table defined by the ''pt'' pointer . The MMU is supposed to be activated. It supports both small (4 Kbytes) & big (2 Mbytes) pages. 23 It uses the address extension mechanism for physical addressing. 24 Return 0 if success. Return 1 if PTE1 or PTE2 unmapped. 22 This function returns the physical address from the virtual address. The MMU is supposed to be activated, and it uses the page table defined by the CP0_PTPR register. It supports both small (4 Kbytes) & big (2 Mbytes) pages. 23 * '''vaddr''': virtual address. 24 * '''flags''': page flags are returned in this variable. 25 Exit if PTE1 or PTE2 unmapped. 25 26 26