![]() |
![]() |
Header file for the KEYSTONE MMAP component. The file exposes the data structures and exported API which are available for use by applications. More...
#include <stdint.h>
Data Structures | |
struct | keystone_mmap_address_range_t |
This structure is used to initialize mmap with available logical address ranges. More... | |
struct | keystone_mmap_init_config_t |
This structure is used to initialize the Keystone MMAP component with device specific information. More... | |
Defines | |
#define | KEYSTONE_MMAP_HEAP_ALIGN 0x1000000 |
This is the alignment requirement for for the 32-bit address ranges which MMAP will use for mapping physical memory. | |
#define | KEYSTONE_MMAP_PROT_NOCACHE 0x80 /* pages are not cached */ |
Memory will not be cached. | |
#define | KEYSTONE_MMAP_PROT_NONE 0x00 /* no permissions */ |
No permissions. | |
#define | KEYSTONE_MMAP_PROT_READ 0x01 /* pages can be read */ |
Memory can be read. | |
#define | KEYSTONE_MMAP_PROT_WRITE 0x02 /* pages can be written */ |
Memory can be written. | |
#define | KEYSTONE_MMAP_PROT_EXEC 0x04 /* pages can be executed */ |
Memory can be executed. | |
#define | KEYSTONE_MMAP_MAP_FAILED ((void *)-1) |
Error return from keystone_mmap() | |
Functions | |
keystone_mmap_handle_t | keystone_mmap_init (keystone_mmap_init_config_t *init_config) |
void | keystone_mmap_free (keystone_mmap_handle_t *h) |
void * | keystone_mmap (keystone_mmap_handle_t h, uint64_t phys_addr, size_t length, uint32_t prot, uint32_t flags) |
Map physical memroy to logical address. | |
int32_t | keystone_munmap (keystone_mmap_handle_t h, void *ptr, size_t length) |
Unmap physical memory which was mapped to logical address. |
Header file for the KEYSTONE MMAP component. The file exposes the data structures and exported API which are available for use by applications.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.