|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Central first-party Unicorn memory access seam. More...
Go to the source code of this file.
Functions | |
| uc_err | emu_mem_read (uc_engine *uc, uint64_t address, void *bytes, size_t count) |
| Read guest memory through the central access seam. | |
| uc_err | emu_mem_write (uc_engine *uc, uint64_t address, const void *bytes, size_t count) |
| Write guest memory through the central access seam. | |
Central first-party Unicorn memory access seam.
The one place first-party emulator code reads or writes guest memory. The shared apertures (SRAM, SDRAM, OSPI) are bound into every engine as views onto one host mapping per aperture, so an access through any Secure or Non-secure alias already reaches the same bytes every other view and every other engine sees; this seam therefore validates its arguments and performs the access directly, with no mirroring step and no per-access host I/O.
Definition in file emu_memory_access.h.
| uc_err emu_mem_read | ( | uc_engine * | uc, |
| uint64_t | address, | ||
| void * | bytes, | ||
| size_t | count ) |
Read guest memory through the central access seam.
Reads count bytes starting at address. For an aliased aperture the bytes come from the shared host mapping, so a Secure read observes what was written through the Non-secure alias or by the other CPU engine without any explicit synchronisation.
| [in,out] | uc | Engine whose guest memory is read. |
| [in] | address | First guest byte address. |
| [out] | bytes | Destination spanning count bytes. |
| [in] | count | Exact transfer length. |
| UC_ERR_OK | Every requested byte was read. |
| UC_ERR_ARG | A null argument or a zero-length transfer was supplied. |
| UC_ERR_READ_UNMAPPED | The range is not mapped in uc. |
uc, bytes are non-null and count is non-zero. bytes is written only when the status is UC_ERR_OK. Definition at line 18 of file emu_memory_access.c.
Referenced by emu_mve_nocp_emulate(), emulate_mve(), idle_spin_at(), internal_dmac_copy_units(), internal_drw_render(), internal_drw_run_dlist(), internal_dtc_copy_units(), internal_dtc_mem_read(), internal_emu_tz_find_blxns(), internal_eth_desc_read(), internal_eth_desc_set_ds(), internal_eth_desc_set_dt(), internal_eth_tx_kick_queue(), internal_glcdc_hash_framebuffer(), internal_idle_back_edge(), internal_long_shift_begin(), internal_main_reset_vector(), internal_mve_mem_exec(), internal_npu_apply(), internal_npu_guest_word(), internal_on_blxns(), internal_on_hmsc_write10(), internal_on_icsr_write(), internal_on_intr(), internal_on_usbh_control_xfer(), internal_periph_rd32(), internal_read_tile(), internal_rtt_drain(), internal_rtt_rd32(), internal_rtt_scan(), internal_run_print_dump_syms(), internal_run_stop_sym(), internal_usbh_arg5(), internal_vmsc_fill_sector(), on_invalid_insn(), rd32(), and warm_reboot().
| uc_err emu_mem_write | ( | uc_engine * | uc, |
| uint64_t | address, | ||
| const void * | bytes, | ||
| size_t | count ) |
Write guest memory through the central access seam.
Writes count bytes at address. For an aliased aperture the bytes land in the shared host mapping, so the write is immediately visible through the matching Secure/Non-secure alias and in every other engine bound to the same workspace.
| [in,out] | uc | Engine whose guest memory is written. |
| [in] | address | First guest byte address. |
| [in] | bytes | Source spanning count bytes. |
| [in] | count | Exact transfer length. |
| UC_ERR_OK | Every byte was written. |
| UC_ERR_ARG | A null argument or a zero-length transfer was supplied. |
| UC_ERR_WRITE_UNMAPPED | The range is not mapped in uc. |
uc, bytes are non-null and count is non-zero. Definition at line 26 of file emu_memory_access.c.
Referenced by div0_patch_sites(), emu_tz_install(), emu_tz_patch_cmse(), internal_ceu_do_capture(), internal_dmac_copy_units(), internal_drw_render(), internal_dtc_copy_units(), internal_eth_desc_set_ds(), internal_eth_desc_set_dt(), internal_eth_rx_drain_peer(), internal_itm_seed_ready(), internal_maci_commit(), internal_mve_mem_exec(), internal_npu_apply(), internal_nvic_set_pending(), internal_on_hmsc_enumerate(), internal_on_hmsc_read10(), internal_on_hmsc_read_capacity(), internal_on_intr_sec_insn(), internal_on_sdmmc_read_block(), internal_on_usbh_bulk_in(), internal_on_usbh_control_xfer(), internal_rtt_drain(), internal_seed_tsn(), internal_stream_segment(), and wr32().