Merge branch 'feature/esp32s3_memprot_additional_improvements' into 'master'

[System/Security] Memprot after-merge improvements (v5.0)

Closes IDF-5263 and IDF-5208

See merge request espressif/esp-idf!18893
This commit is contained in:
Jiang Jiang Jian
2022-07-13 15:48:20 +08:00
15 changed files with 390 additions and 383 deletions

View File

@@ -6,22 +6,31 @@
#pragma once
#include "soc/sensitive_reg.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* PMS register configuration structure for I/D splitting address.
* Category bits define the splitting address being below, inside or above specific memory level range:
* - for details of ESP32S3 memory layout, see 725_mem_map.* documents
* - for category bits settings, see MEMP_HAL_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_BITS*
* (components/hal/include/hal/memprot_types.h)
* - for details on assembling full splitting address
* see function memprot_ll_get_split_addr_from_reg() (components/hal/esp32s3/include/hal/memprot_ll.h)
*/
typedef union {
struct {
uint32_t cat0 : 2;
uint32_t cat1 : 2;
uint32_t cat2 : 2;
uint32_t cat3 : 2;
uint32_t cat4 : 2;
uint32_t cat5 : 2;
uint32_t cat6 : 2;
uint32_t splitaddr : 8;
uint32_t cat0 : 2; /**< category bits - level 2 */
uint32_t cat1 : 2; /**< category bits - level 3 */
uint32_t cat2 : 2; /**< category bits - level 4 */
uint32_t cat3 : 2; /**< category bits - level 5 */
uint32_t cat4 : 2; /**< category bits - level 6 */
uint32_t cat5 : 2; /**< category bits - level 7 */
uint32_t cat6 : 2; /**< category bits - level 8 */
uint32_t splitaddr : 8; /**< splitting address significant bits */
uint32_t reserved : 10;
};
uint32_t val;