mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(esp_tee): Support for ESP32-H2 - the rest of the components
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -9,16 +9,36 @@
|
||||
#include "soc/plic_reg.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#ifdef __has_include
|
||||
# if __has_include("sdkconfig.h")
|
||||
# include "sdkconfig.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
#define INTERRUPT_PRIO_REG(n) (PLIC_UXINT0_PRI_REG + (n)*4)
|
||||
#define INTERRUPT_CURRENT_CORE_INT_THRESH_REG PLIC_UXINT_THRESH_REG
|
||||
#else
|
||||
#define INTERRUPT_PRIO_REG(n) (PLIC_MXINT0_PRI_REG + (n)*4)
|
||||
#define INTERRUPT_CURRENT_CORE_INT_THRESH_REG PLIC_MXINT_THRESH_REG
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ESP32H2 should use the PLIC controller as the interrupt controller instead of INTC (SOC_INT_PLIC_SUPPORTED = y)
|
||||
* Keep the following macros for backward compatibility reasons
|
||||
*/
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
#define INTERRUPT_CORE0_CPU_INT_ENABLE_REG PLIC_UXINT_ENABLE_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_THRESH_REG PLIC_UXINT_THRESH_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_CLEAR_REG PLIC_UXINT_CLEAR_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_TYPE_REG PLIC_UXINT_TYPE_REG
|
||||
#define INTC_INT_PRIO_REG(n) (PLIC_UXINT0_PRI_REG + (n)*4)
|
||||
#else
|
||||
#define INTERRUPT_CORE0_CPU_INT_ENABLE_REG PLIC_MXINT_ENABLE_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_THRESH_REG PLIC_MXINT_THRESH_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_CLEAR_REG PLIC_MXINT_CLEAR_REG
|
||||
#define INTERRUPT_CORE0_CPU_INT_TYPE_REG PLIC_MXINT_TYPE_REG
|
||||
#define INTC_INT_PRIO_REG(n) (PLIC_MXINT0_PRI_REG + (n)*4)
|
||||
#endif
|
||||
|
||||
#define DR_REG_INTERRUPT_BASE DR_REG_INTMTX_BASE
|
||||
|
||||
@@ -11,6 +11,7 @@ extern "C" {
|
||||
|
||||
#define DR_REG_CLINT_M_BASE ( 0x20001800)
|
||||
#define DR_REG_CLINT_U_BASE ( 0x20001C00)
|
||||
#define DR_REG_CLINT_U_END ( 0x20002000)
|
||||
|
||||
/*CLINT MINT*/
|
||||
#define CLINT_MINT_SIP_REG (DR_REG_CLINT_M_BASE + 0x0)
|
||||
|
||||
@@ -12,6 +12,7 @@ extern "C" {
|
||||
|
||||
#define DR_REG_PLIC_MX_BASE ( 0x20001000 )
|
||||
#define DR_REG_PLIC_UX_BASE ( 0x20001400 )
|
||||
#define DR_REG_PLIC_UX_END ( 0x20001800 )
|
||||
#define PLIC_MXINT_CONF_REG ( 0x200013FC )
|
||||
#define PLIC_UXINT_CONF_REG ( 0x200017FC )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user