Resource table physically contiguous memory request entry. More...
#include <remoteproc.h>
Data Fields | |
| uint32_t | type |
| Resource carveout has type 0. More... | |
| uint32_t | da |
| Device address. More... | |
| uint32_t | pa |
| Physical address. More... | |
| uint32_t | len |
| Length in bytes. More... | |
| uint32_t | flags |
| IOMMU protection flags. More... | |
| uint32_t | reserved |
| Reserved (must be zero) More... | |
| uint8_t | name [RPROC_MAX_NAME_LEN] |
| Optional human-readable name of the requested memory region used for debugging. More... | |
Resource table physically contiguous memory request entry.
This resource entry requests the host to allocate a physically contiguous memory region.
These request entries should precede other firmware resource entries, as other entries might request placing other data objects inside these memory regions (e.g. data/code segments, trace resource entries, ...).
Allocating memory this way helps utilizing the reserved physical memory (e.g. CMA) more efficiently, and also minimizes the number of TLB entries needed to map it (in case rproc is using an IOMMU). Reducing the TLB pressure is important; it may have a substantial impact on performance.
If the firmware is compiled with static addresses, then da should specify the expected device address of this memory region. If da is set to FW_RSC_ADDR_ANY, then the host will dynamically allocate it, and then overwrite da with the dynamically allocated address.
We will always use da to negotiate the device addresses, even if it isn't using an IOMMU. In that case, though, it will obviously contain physical addresses.
Some remote remoteprocs need to know the allocated physical address even if they do use an IOMMU. This is needed, e.g., if they control hardware accelerators which access the physical memory directly (this is the case with OMAP4 for instance). In that case, the host will overwrite pa with the dynamically allocated physical address. Generally we don't want to expose physical addresses if we don't have to (remote remoteprocs are generally not trusted), so we might want to change this to happen only when explicitly required by the hardware.
| uint32_t fw_rsc_carveout::da |
Device address.
| uint32_t fw_rsc_carveout::flags |
IOMMU protection flags.
| uint32_t fw_rsc_carveout::len |
Length in bytes.
| uint8_t fw_rsc_carveout::name[RPROC_MAX_NAME_LEN] |
Optional human-readable name of the requested memory region used for debugging.
| uint32_t fw_rsc_carveout::pa |
Physical address.
| uint32_t fw_rsc_carveout::reserved |
Reserved (must be zero)
| uint32_t fw_rsc_carveout::type |
Resource carveout has type 0.