19#include <unicorn/unicorn.h>
36typedef enum : uint32_t {
56typedef enum :
size_t {
62typedef enum : uint8_t {
emu_memmap_result_t emu_memmap_open(emu_memmap_workspace_t *workspace)
Create three independent, lazily-committed host aperture mappings.
emu_memmap_result_t emu_memmap_requirements(void)
Report the immutable aliased-aperture backing geometry.
struct emu_memmap_workspace emu_memmap_workspace_t
Independent aperture backing with at most two engine bindings.
emu_memmap_status_t
Semantic result for backing lifecycle operations.
@ k_emu_memmap_ok
Operation completed exactly.
@ k_emu_memmap_backing
A host aperture mapping could not be made.
@ k_emu_memmap_invalid
Pointer, state, or engine was invalid.
@ k_emu_memmap_unicorn
Unicorn map or window install failed.
emu_memmap_limit_t
Fixed backing and binding limits.
@ k_emu_memmap_binding_count
CPU0 and optional CPU1 engines.
@ k_emu_memmap_backing_count
SRAM, SDRAM, and OSPI host mappings.
emu_memmap_result_t emu_memmap_attach(emu_memmap_workspace_t *workspace, uc_engine *uc)
Map one Unicorn engine onto the shared aperture backing.
ram_region_t
Address constants shared with framebuffer and alias validation.
@ k_sdram_base
External SDRAM start.
@ k_sram_end
CPU0 SRAM end used by framebuffer checks.
@ k_page_size
Unicorn and host mapping granule.
@ k_dtcm_base
Data TCM start.
@ k_sram_base
On-chip SRAM start.
@ k_dtcm_end
Data TCM end.
@ k_ns_sdram_base
Non-secure SDRAM alias.
@ k_sdram_end
External SDRAM end.
bool emu_memmap_detach(emu_memmap_workspace_t *workspace, uc_engine *uc)
Remove one engine binding before closing that Unicorn engine.
bool emu_memmap_close(emu_memmap_workspace_t *workspace)
Release every host aperture mapping after all engines detached.
uint64_t emu_memmap_mram_base(void)
Return the MRAM boot-vector base.
const mem_region_t * emu_memmap_regions(uint32_t *count)
Return the static emulated memory-region table.
Central first-party Unicorn memory access seam.
Annotation-attribute framework macros for ra8-firmware.
One owned host aperture mapping.
uint8_t * host
Page-aligned host mapping, or nullptr.
uint64_t size
Exact logical byte length.
One caller-owned association between a Unicorn engine and backing.
bool active
Binding occupies this slot and must be undone.
uc_engine * uc
Bound Unicorn engine.
Exact requirements and operation outcome.
int os_error
Captured errno for host mapping.
uint64_t logical_backing_bytes
Sum of the three aperture lengths.
emu_memmap_status_t status
Semantic completion status.
Independent aperture backing with at most two engine bindings.
emu_memmap_binding_t bindings[k_emu_memmap_binding_count]
Active Unicorn engine views.
bool open
Whether the host mappings are owned.
emu_memmap_backing_t backings[k_emu_memmap_backing_count]
Owned host aperture mappings.
One emulated memory-region table row.
const char * name
Human-readable region name.
uint64_t size
Region byte length.
uint64_t base
Guest base address.