refactor(hal): Refactor the APM LL/HAL APIs

This commit is contained in:
Laukik Hase
2025-04-17 17:19:13 +05:30
parent d835854c8f
commit 0d8a1f5427
24 changed files with 3397 additions and 2056 deletions

View File

@@ -967,6 +967,10 @@ config SOC_APM_CTRL_FILTER_SUPPORTED
bool
default y
config SOC_APM_SUPPORT_CTRL_CFG_LOCK
bool
default y
config SOC_CRYPTO_DPA_PROTECTION_SUPPORTED
bool
default y

View File

@@ -0,0 +1,43 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_bit_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Number of paths for each supported APM controller */
#define APM_CTRL_HP_APM_PATH_NUM (4)
#define APM_CTRL_LP_APM_PATH_NUM (1)
/* Number of regions for each supported APM controller */
#define APM_CTRL_HP_APM_REGION_NUM (16)
#define APM_CTRL_LP_APM_REGION_NUM (4)
/* Register offset for TEE mode control */
#define APM_TEE_MODE_CTRL_OFFSET (0x04)
/* Register offset between region bound address registers */
#define APM_REGION_ADDR_OFFSET (0x0C)
/* Register offset between region pms attribute registers */
#define APM_REGION_ATTR_OFFSET (0x0C)
/* Register offset between exception info registers */
#define APM_EXCP_INFO_OFFSET (0x10)
/* Bit to clear exception status */
#define APM_EXCP_STATUS_CLR_BIT (BIT(0))
/* Bit to lock TEE mode */
#define APM_TEE_MODE_LOCK_BIT (BIT(2))
/* Bit to lock region pms attributes */
#define APM_REGION_LOCK_BIT (BIT(11))
/* APM controller masters mask */
#define APM_MASTER_MASK_ALL (0x018E0175U)
#ifdef __cplusplus
}
#endif

View File

@@ -402,6 +402,7 @@
/*-------------------------- APM CAPS ----------------------------------------*/
#define SOC_APM_CTRL_FILTER_SUPPORTED 1 /*!< Support for APM control filter */
#define SOC_APM_SUPPORT_CTRL_CFG_LOCK 1 /*!< Support for APM controller configuration lock */
/*------------------------ Anti DPA (Security) CAPS --------------------------*/
#define SOC_CRYPTO_DPA_PROTECTION_SUPPORTED 1