embassy-rp

Crates

git

Versions

rp235xb

Flavors

Module rom_data

Source
Expand description

Functions and data from the RPI Bootrom.

From Section 5.4 of the RP2350 datasheet:

Whilst some ROM space is dedicated to the implementation of the boot sequence and USB/UART boot interfaces, the bootrom also contains public functions that provide useful RP2350 functionality that may be useful for any code or runtime running on the device

Modules§

bootrom_state_reset
Additional access for the bootrom_state_reset ROM function.
chain_image
Additional access for the chain_image ROM function.
connect_internal_flash
Additional access for the connect_internal_flash ROM function.
explicit_buy
Additional access for the explicit_buy ROM function.
flash_enter_cmd_xip
Additional access for the flash_enter_cmd_xip ROM function.
flash_exit_xip
Additional access for the flash_exit_xip ROM function.
flash_flush_cache
Additional access for the flash_flush_cache ROM function.
flash_op
Additional access for the flash_op ROM function.
flash_op_ns
Additional access for the flash_op_ns ROM function.
flash_range_erase
Additional access for the flash_range_erase ROM function.
flash_range_program
Additional access for the flash_range_program ROM function.
flash_reset_address_trans
Additional access for the flash_reset_address_trans ROM function.
flash_runtime_to_storage_addr
Additional access for the flash_runtime_to_storage_addr ROM function.
flash_runtime_to_storage_addr_ns
Additional access for the flash_runtime_to_storage_addr_ns ROM function.
flash_select_xip_read_mode
Additional access for the flash_select_xip_read_mode ROM function.
get_b_partition
Additional access for the get_b_partition ROM function.
get_partition_table_info
Additional access for the get_partition_table_info ROM function.
get_partition_table_info_ns
Additional access for the get_partition_table_info_ns ROM function.
get_sys_info
Additional access for the get_sys_info ROM function.
get_sys_info_ns
Additional access for the get_sys_info_ns ROM function.
get_uf2_target_partition
Additional access for the get_uf2_target_partition ROM function.
load_partition_table
Additional access for the load_partition_table ROM function.
otp_access
Additional access for the otp_access ROM function.
otp_access_ns
Additional access for the otp_access_ns ROM function.
pick_ab_parition
Additional access for the pick_ab_parition ROM function.
reboot
Additional access for the reboot ROM function.
reboot_ns
Additional access for the reboot_ns ROM function.
set_bootrom_stack
Additional access for the set_bootrom_stack ROM function.
set_ns_api_permission
Additional access for the set_ns_api_permission ROM function.
set_rom_callback
Additional access for the set_rom_callback ROM function.
validate_ns_buffer
Additional access for the validate_ns_buffer ROM function.

Functions§

bootrom_state_reset
Resets internal bootrom state.
chain_image
Searches a memory region for a launchable image, and executes it if possible.
connect_internal_flash
Restore all QSPI pad controls to their default state, and connect the QMI peripheral to the QSPI pads.
explicit_buy
Perform an “explicit” buy of an executable launched via an IMAGE_DEF which was “explicit buy” flagged.
flash_enter_cmd_xip
Configure the QMI to generate a standard 03h serial read command, with 24 address bits, upon each XIP access.
flash_exit_xip
Initialise the QMI for serial operations (direct mode)
flash_flush_cache
Flush the entire XIP cache, by issuing an invalidate by set/way maintenance operation to every cache line (Section 4.4.1).
flash_op
Perform a flash read, erase, or program operation.
flash_op_ns
Non-secure version of flash_op()
flash_range_erase
Erase count bytes, starting at addr (offset from start of flash).
flash_range_program
Program data to a range of flash storage addresses starting at addr (offset from the start of flash) and count bytes in size.
flash_reset_address_trans
Restore the QMI address translation registers, ATRANS0 through ATRANS7, to their reset state. This makes the runtime- to-storage address map an identity map, i.e. the mapped and unmapped address are equal, and the entire space is fully mapped.
flash_runtime_to_storage_addr
Applies the address translation currently configured by QMI address translation registers, ATRANS0 through ATRANS7.
flash_runtime_to_storage_addr_ns
Non-secure version of flash_runtime_to_storage_addr()
flash_select_xip_read_mode
Configure QMI for one of a small menu of XIP read modes supported by the bootrom. This mode is configured for both memory windows (both chip selects), and the clock divisor is also applied to direct mode.
get_b_partition
Returns: The index of the B partition of partition A if a partition table is present and loaded, and there is a partition A with a B partition; otherwise returns BOOTROM_ERROR_NOT_FOUND.
get_partition_table_info
Fills a buffer with information from the partition table.
get_partition_table_info_ns
Non-secure version of get_partition_table_info()
get_sys_info
Fills a buffer with various system information.
get_sys_info_ns
Non-secure version of get_sys_info()
get_uf2_target_partition
Not yet documented.
git_revision
The 8 most significant hex digits of the Bootrom git revision.
is_secure_mode
Determine if we are in secure mode
load_partition_table
Loads the current partition table from flash, if present.
otp_access
Writes data from a buffer into OTP, or reads data from OTP into a buffer.
otp_access_ns
Non-secure version of otp_access()
partition_table_pointer
A pointer to the resident partition table info.
pick_ab_parition
Determines which of the partitions has the “better” IMAGE_DEF. In the case of executable images, this is the one that would be booted.
reboot
Resets the RP2350 and uses the watchdog facility to restart.
reboot_ns
Non-secure version of reboot()
rom_data_lookup
Retrieve rom data content from a table using a code.
rom_table_lookup
Retrieve rom content from a table using a code.
rom_version_number
The version number of the rom.
set_ns_api_permission
Allow or disallow the specific NS API (note all NS APIs default to disabled).
set_rom_callback
Set a boot ROM callback.
validate_ns_buffer
Utility method that can be used by secure ARM code to validate a buffer passed to it from Non-secure code.

Type Aliases§

RomFnTableCode
A bootrom function table code.