mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(efuse): Update efuse table for ESP32H21
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -424,8 +424,27 @@ static inline bool ecdsa_ll_is_deterministic_mode_supported(void)
|
||||
*/
|
||||
__attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk)
|
||||
{
|
||||
(void) curve;
|
||||
(void) efuse_blk;
|
||||
uint8_t efuse_blk_low = 0;
|
||||
uint8_t efuse_blk_high = 0;
|
||||
|
||||
switch (curve) {
|
||||
case ECDSA_CURVE_SECP192R1:
|
||||
EFUSE.conf.cfg_ecdsa_l_blk = efuse_blk;
|
||||
break;
|
||||
case ECDSA_CURVE_SECP256R1:
|
||||
EFUSE.conf.cfg_ecdsa_l_blk = efuse_blk;
|
||||
break;
|
||||
case ECDSA_CURVE_SECP384R1:
|
||||
// ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer
|
||||
// where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number.
|
||||
HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low);
|
||||
EFUSE.conf.cfg_ecdsa_h_blk = efuse_blk_high;
|
||||
EFUSE.conf.cfg_ecdsa_l_blk = efuse_blk_low;
|
||||
break;
|
||||
default:
|
||||
HAL_ASSERT(false && "Unsupported curve");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user