Changes between Version 2 and Version 3 of kernel_vmem


Ignore:
Timestamp:
Mar 31, 2015, 3:55:18 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_vmem

    v2 v3  
    11= Virtual to Physical Address Translation =
    22
    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.
     3The [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.
    44
    55[[PageOutline]]
     
    1818 * SPP : Small Physical pages / 4 Kbytes
    1919
    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 ) ===
    2121
    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.
     22This 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.
     25Exit if PTE1 or PTE2 unmapped.
    2526
    26