XIP
- group XIP
XIP Execute In Place.
Unnamed Group
-
enum xip_page_size_e
Values:
-
enumerator XIP_PAGE_SIZE_512B
-
enumerator XIP_PAGE_SIZE_1KB
-
enumerator XIP_PAGE_SIZE_2KB
-
enumerator XIP_PAGE_SIZE_4KB
-
enumerator XIP_PAGE_SIZE_8KB
-
enumerator XIP_PAGE_SIZE_16KB
-
enumerator XIP_PAGE_SIZE_32KB
-
enumerator XIP_PAGE_SIZE_64KB
-
enumerator XIP_PAGE_SIZE_512B
-
typedef struct pi_xip_conf_s pi_xip_conf_t
-
typedef struct pi_xip_data_err_s pi_xip_data_err_t
-
PI_INLINE_XIP0 int32_t pi_xip_mount(pi_device_t *mount, void *virt_addr, uint32_t ext_addr, uint32_t mount_size, uint8_t cacheable)
Mount an area in XIP virtual memory.
Allows to mount an area from external memory, starting at external address
ext_addr
, of sizemount_size
* page_size into the XIP virtual memory starting at virt_addr.- Parameters:
mount – A pi device containing the mount configuration.
virt_addr – An address contained in XIP area where mount will happen.
ext_addr – An external address from which the mount will happen.
mount_size – A mount size, expressed in number of pages.
cacheable – Whether I-Cache should be aware of the pages used by this
mount
.
- Return values:
0 – Success
<errno> – Error code
-
PI_INLINE_XIP0 void pi_xip_unmount(pi_device_t *mount)
Unmount previously mounted XIP area.
Warning
Should only be used from L2 code.
- Parameters:
mount – A pi device containing the mount configuration.
-
PI_INLINE_XIP0 int32_t pi_xip_free_page_mask_get(uint32_t *page_mask, uint8_t nb_pages)
Acquire previously allocated XIP cache pages.
- Parameters:
page_mask – A pointer to a page mask to be filled.
nb_pages – Desired number of pages.
- Return values:
0 – Success
> – 0 Number of free pages left (if not enough are available)
-
PI_INLINE_XIP0 int32_t pi_xip_dcache_page_alloc(uint32_t page_id, xip_page_size_e page_size)
Allocate chunks of L2 memory for XIP pages.
- Parameters:
page_id – Id of the hardware page to be allocated.
page_size – Size of the page to be allocated.
- Return values:
0 – Success
<errno> – Error code
-
PI_INLINE_XIP0 int32_t pi_xip_dcache_page_free(uint32_t page_id, xip_page_size_e page_size)
Release L2 page used by XIP.
- Parameters:
page_id – Id of the hardware page to be freed.
page_size – Size of the page to be freed.
- Return values:
0 – Success
<errno> – Error code
-
PI_INLINE_XIP0 void pi_xip_device_get(pi_device_t *device, uint32_t id, void **virt_addr)
After sleep with retention, get device back.
- Parameters:
device – Pointer to the device to set
id – ID of the device
virt_addr – Pointer to get the virtual address where the device is mounted
-
PI_INLINE_XIP0
PI_INLINE_XIP0.
IMPLEM
-
struct pi_xip_conf_s
- #include <xip.h>
XIP configuration structure.
This structure is used to pass the desired XIP configuration to the runtime when mounting a memory area.
Public Members
-
uint8_t ro
whether this mount is read only. Write accesses will trigger an exception.
-
uint8_t per_id
Peripheral / mem controller on which to mount.
-
uint8_t tlb_en
Whether TLB is enabled.
-
uint16_t page_mask
XIP cache pages to be used for this mount.
-
xip_page_size_e page_size
Desired page size, starts at 512, computes as 512 << page_size. Maximum is 64KB
-
pi_func_t data_exception_handler
Exception handler for fc data accesses.
-
pi_func_t instr_exception_handler
Exception handler for fc insn accesses.
-
pi_func_t cl_irq_handler
Exception handler for cluster accesses.
-
uint8_t ro
-
struct pi_xip_data_err_s
- #include <xip.h>
Structure which will be used as argument for user handler. It contains exception info.
This structure can be used by user exception handler to handle faults
-
enum xip_page_size_e