pgtab.h File Reference
Go to the source code of this file.
|
Enumerations |
| enum | ddekit_pgtab_type { PTE_TYPE_OTHER,
PTE_TYPE_LARGE,
PTE_TYPE_UMA,
PTE_TYPE_CONTIG
} |
Functions |
| void | ddekit_pgtab_set_region (void *virt, ddekit_addr_t phys, int pages, int type) |
| | Set virtual->physical mapping for VM region.
|
| void | ddekit_pgtab_set_region_with_size (void *virt, ddekit_addr_t phys, int size, int type) |
| | Set virtual->physical mapping for VM region given a specific size in bytes.
|
| void | ddekit_pgtab_clear_region (void *virt, int type) |
| | Clear virtual->physical mapping for VM region.
|
| ddekit_addr_t | ddekit_pgtab_get_physaddr (const void *virt) |
| | Get physical address for virtual address.
|
| ddekit_addr_t | ddekit_pgtab_get_virtaddr (const ddekit_addr_t physical) |
| | Get virtual address for physical address.
|
| int | ddekit_pgtab_get_type (const void *virt) |
| | Get type of VM region.
|
| int | ddekit_pgtab_get_size (const void *virt) |
| | Get size of VM region.
|
Enumeration Type Documentation
- Enumerator:
-
| PTE_TYPE_OTHER |
|
| PTE_TYPE_LARGE |
|
| PTE_TYPE_UMA |
|
| PTE_TYPE_CONTIG |
|
Definition at line 15 of file pgtab.h.
Function Documentation
| void ddekit_pgtab_clear_region |
( |
void * |
virtual, |
|
|
int |
type | |
|
) |
| | |
Clear virtual->physical mapping for VM region.
- Parameters:
-
| virt | virtual start address for region |
| type | pgtab type for region |
| virtual | virtual start address for region |
| type | pgtab type for region |
Definition at line 147 of file pgtab.c.
Get physical address for virtual address.
- Parameters:
-
- Returns:
- physical address
- Parameters:
-
- Returns:
- physical address or 0
Definition at line 65 of file pgtab.c.
| int ddekit_pgtab_get_size |
( |
const void * |
virt |
) |
|
Get size of VM region.
- Parameters:
-
- Returns:
- VM region size (in bytes)
Definition at line 127 of file pgtab.c.
| int ddekit_pgtab_get_type |
( |
const void * |
virt |
) |
|
Get type of VM region.
- Parameters:
-
- Returns:
- VM region type
Definition at line 113 of file pgtab.c.
Get virtual address for physical address.
- Parameters:
-
| physical | physical address |
- Returns:
- virtual address
- Parameters:
-
| physical | physical address |
- Returns:
- virtual address or 0
Definition at line 87 of file pgtab.c.
| void ddekit_pgtab_set_region |
( |
void * |
virtual, |
|
|
ddekit_addr_t |
physical, |
|
|
int |
pages, |
|
|
int |
type | |
|
) |
| | |
Set virtual->physical mapping for VM region.
- Parameters:
-
| virt | virtual start address for region |
| phys | physical start address for region |
| pages | number of pages in region |
| type | pgtab type for region |
| virtual | virtual start address for region |
| physical | physical start address for region |
| pages | number of pages in region |
| type | pgtab type for region |
Definition at line 182 of file pgtab.c.
| void ddekit_pgtab_set_region_with_size |
( |
void * |
virt, |
|
|
ddekit_addr_t |
phys, |
|
|
int |
size, |
|
|
int |
type | |
|
) |
| | |
Set virtual->physical mapping for VM region given a specific size in bytes.
Internally, DDEKit manages regions with pages. However, DDEs do not need to tangle with the underlying mechanism and therefore can use this function that takes care of translating a size to an amount of pages.
Definition at line 213 of file pgtab.c.