SPRUJ79 November 2024 F29H850TU
The SSU defines memory protections using Access Protection Ranges (APRs), governing CPU access to on-chip memories, peripherals, and external memories. There are a total of 64 APRs available per CPU. Each APR specifies the following:
Access protection ranges are defined using the APx registers. The access protection registers are loaded at boot time, but can be modified afterward by code running with security root privileges. Before performing a CPU access to any memory location, the user must make sure to define an access protection range that includes that location. In addition, access protection range definitions must not overlap each other. If a CPU access is performed to a memory location that is covered by zero or more than one access protection range, the SSU generates a fault signal to the CPU, which then forwards the error to the Error Aggregator module.
Each standard AP range has a start address, defined in the APx_START register, and an end address, defined in the APx_END register. Every AP range is aligned to a 4KB memory boundary, so the lower 12 bits of each APx_START register are hardcoded to 0, and the lower 12 bits of each APx_END register are hardcoded to 0xFFF. The regular AP ranges can address the first 2GB of the device address space, covering on-chip memories or peripheral memory-mapped registers. Each AP range has a maximum size of 16MB. The MEMTYPE field in the start address indicates what type of memory is covered by the AP range. Note that the MEMTYPE bits are the same as the CPU address bits per the device memory-map; there is no special handling of these bits in the SSU. Simply writing the range's start address to APx_START is sufficient.
Access permissions for an AP range are configured using the APx_ACCESS register. This register defines, for each LINK, whether to grant no access permission, read-only permission, or read/write permission.
AP ranges also include the following configuration options:
The first two AP ranges (AP0 and AP1) are extended AP ranges. These special ranges have address ranges spanning the full 4GB address space available, and as such can cover extended memory ranges such as external memories connected using the EMIF interface. The start and end addresses of these extended AP ranges are defined in the APx_START_EXT and APx_END_EXT registers. Like standard AP ranges, the extended AP ranges must also be aligned to 4KB address boundaries.