mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
esp32h2: Add support for ECC hardware accelerator
This commit is contained in:
@@ -131,6 +131,14 @@ config SOC_DIG_SIGN_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_ECC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_ECC_EXTENDED_MODES_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_FLASH_ENC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -162,6 +162,24 @@ extern "C" {
|
||||
#define ECC_MULT_PY_MEM (DR_REG_ECC_MULT_BASE + 0x140)
|
||||
#define ECC_MULT_PY_MEM_SIZE_BYTES 32
|
||||
|
||||
/** ECC_MULT_QX_MEM register
|
||||
* The memory that stores Qx.
|
||||
*/
|
||||
#define ECC_MULT_QX_MEM (DR_REG_ECC_MULT_BASE + 0x160)
|
||||
#define ECC_MULT_QX_MEM_SIZE_BYTES 32
|
||||
|
||||
/** ECC_MULT_QY_MEM register
|
||||
* The memory that stores Qy.
|
||||
*/
|
||||
#define ECC_MULT_QY_MEM (DR_REG_ECC_MULT_BASE + 0x180)
|
||||
#define ECC_MULT_QY_MEM_SIZE_BYTES 32
|
||||
|
||||
/** ECC_MULT_QZ_MEM register
|
||||
* The memory that stores Qz.
|
||||
*/
|
||||
#define ECC_MULT_QZ_MEM (DR_REG_ECC_MULT_BASE + 0x1A0)
|
||||
#define ECC_MULT_QZ_MEM_SIZE_BYTES 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "esp_assert.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -151,12 +153,15 @@ typedef struct {
|
||||
volatile uint32_t k[8];
|
||||
volatile uint32_t px[8];
|
||||
volatile uint32_t py[8];
|
||||
volatile uint32_t qx[8];
|
||||
volatile uint32_t qy[8];
|
||||
volatile uint32_t qz[8];
|
||||
} ecc_mult_dev_t;
|
||||
|
||||
extern ecc_mult_dev_t ECC;
|
||||
|
||||
#ifndef __cplusplus
|
||||
_Static_assert(sizeof(ecc_mult_dev_t) == 0x160, "Invalid size of ecc_mult_dev_t structure");
|
||||
_Static_assert(sizeof(ecc_mult_dev_t) == 0x1C0, "Invalid size of ecc_mult_dev_t structure");
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -35,6 +35,7 @@ typedef enum {
|
||||
PERIPH_RSA_MODULE,
|
||||
PERIPH_AES_MODULE,
|
||||
PERIPH_SHA_MODULE,
|
||||
PERIPH_ECC_MODULE,
|
||||
PERIPH_HMAC_MODULE,
|
||||
PERIPH_DS_MODULE,
|
||||
PERIPH_GDMA_MODULE,
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#define SOC_SHA_SUPPORTED 1
|
||||
#define SOC_HMAC_SUPPORTED 1
|
||||
#define SOC_DIG_SIGN_SUPPORTED 1
|
||||
#define SOC_ECC_SUPPORTED 1
|
||||
#define SOC_ECC_EXTENDED_MODES_SUPPORTED 1
|
||||
#define SOC_FLASH_ENC_SUPPORTED 1
|
||||
#define SOC_SECURE_BOOT_SUPPORTED 1
|
||||
#define SOC_BOD_SUPPORTED 1
|
||||
|
||||
Reference in New Issue
Block a user