diff options
Diffstat (limited to 'src/include/sys')
| -rw-r--r-- | src/include/sys/mm.h | 17 | ||||
| -rw-r--r-- | src/include/sys/mmio.h | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/include/sys/mm.h b/src/include/sys/mm.h index d71d5a1b3..959c2fa57 100644 --- a/src/include/sys/mm.h +++ b/src/include/sys/mm.h @@ -122,6 +122,23 @@ int mm_extend(MM_EXTEND_SIZE i_size = MM_EXTEND_REAL_MEMORY); */ int mm_linear_map(void *i_paddr, uint64_t i_size); +/** @fn mm_block_map() + * @brief Allocate an arbitrary physical address into the VMM. + * @param[in] i_paddr - Physical address of the memory to map. + * @param[in] i_size - Size of memory to map (in bytes). + * + * @return Virtual address or NULL. + */ +void* mm_block_map(void* i_paddr, uint64_t i_size); + +/** @fn mm_block_unmap() + * @brief Unallocate a block previously allocated with mm_block_map. + * @param[in] i_vaddr - Virtual address of the mapped block. + * + * @return int - 0 for successful unmap, non-zero otherwise. + */ +int mm_block_unmap(void* i_vaddr); + /** @fs mm_icache_invalidate() * @brief Invalidate the ICACHE for the given memory * diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h index 273965a88..9fd609cf9 100644 --- a/src/include/sys/mmio.h +++ b/src/include/sys/mmio.h @@ -48,7 +48,7 @@ enum SEG_DATA_SIZES * @param i_devDataSize[in] - Size of device segment block * @return void* - Pointer to beginning virtual address, NULL otherwise */ -void* mmio_dev_map(void *ra, SEG_DATA_SIZES i_devDataSize); +void* mmio_dev_map(void *ra, uint64_t i_devDataSize); /** * @brief System call to unmap a device from the device segment(2TB) * @param ea[in] - Void pointer to effective address |

