fix(soc): Refactor variable names for MPI operations and block bases

This commit is contained in:
nilesh.kale 2024-05-07 12:12:03 +05:30
parent 6245159dcc
commit b227154fd3
17 changed files with 65 additions and 65 deletions

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -93,7 +93,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
DPORT_REG_WRITE(MPI_LL_OPERATIONS[op], 1);
DPORT_REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -115,7 +115,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t copy_words = MIN(num_words, n);
/* Copy MPI data to memory block registers */
@ -150,12 +150,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
DPORT_REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
DPORT_REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
DPORT_REG_WRITE(mem_base, value);
}
@ -166,7 +166,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
HAL_ASSERT(n >= num_words);
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
esp_dport_access_read_buffer(p, mem_base, num_words);

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -87,7 +87,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -102,7 +102,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -124,12 +124,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -139,7 +139,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
const size_t REG_WIDTH = sizeof(uint32_t);
for (size_t i = 0; i < num_words; i++) {

View File

@ -86,7 +86,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -101,7 +101,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -123,12 +123,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -138,7 +138,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
const size_t REG_WIDTH = sizeof(uint32_t);
for (size_t i = 0; i < num_words; i++) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -79,7 +79,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -94,7 +94,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -116,12 +116,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -131,7 +131,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
const size_t REG_WIDTH = sizeof(uint32_t);
for (size_t i = 0; i < num_words; i++) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -80,7 +80,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -95,7 +95,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -117,12 +117,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -132,7 +132,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
const size_t REG_WIDTH = sizeof(uint32_t);
for (size_t i = 0; i < num_words; i++) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -86,7 +86,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -101,7 +101,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -123,12 +123,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -138,7 +138,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
const size_t REG_WIDTH = sizeof(uint32_t);
for (size_t i = 0; i < num_words; i++) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -90,7 +90,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -105,7 +105,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -127,12 +127,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -142,7 +142,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
/* Copy data from memory block registers */
esp_dport_access_read_buffer(p, mem_base, num_words);

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -87,7 +87,7 @@ static inline bool mpi_ll_check_memory_init_complete(void)
static inline void mpi_ll_start_op(mpi_op_t op)
{
REG_WRITE(MPI_LL_OPERATIONS[op], 1);
REG_WRITE(MPI_OPERATIONS_REG[op], 1);
}
static inline bool mpi_ll_get_int_status(void)
@ -102,7 +102,7 @@ static inline bool mpi_ll_get_int_status(void)
*/
static inline void mpi_ll_write_to_mem_block(mpi_param_t param, size_t offset, const uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
uint32_t* pbase = (uint32_t*) mem_base;
uint32_t copy_words = MIN(num_words, n);
@ -124,12 +124,12 @@ static inline void mpi_ll_write_m_prime(uint32_t Mprime)
static inline void mpi_ll_write_rinv(uint32_t rinv)
{
REG_WRITE(MPI_LL_BLOCK_BASES[MPI_PARAM_Z], rinv);
REG_WRITE(MPI_BLOCK_BASES[MPI_PARAM_Z], rinv);
}
static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_t value)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[param] + offset;
uint32_t mem_base = MPI_BLOCK_BASES[param] + offset;
REG_WRITE(mem_base, value);
}
@ -139,7 +139,7 @@ static inline void mpi_ll_write_at_offset(mpi_param_t param, int offset, uint32_
*/
static inline void mpi_ll_read_from_mem_block(uint32_t* p, size_t n, size_t num_words)
{
uint32_t mem_base = MPI_LL_BLOCK_BASES[MPI_PARAM_Z];
uint32_t mem_base = MPI_BLOCK_BASES[MPI_PARAM_Z];
esp_dport_access_read_buffer(p, mem_base, num_words);
/* Zero any remaining limbs in the bignum, if the buffer is bigger
than num_words */

View File

@ -7,13 +7,13 @@
#include "soc/hwcrypto_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_MEM_X_BLOCK_BASE,
RSA_MEM_Y_BLOCK_BASE,
RSA_MEM_Z_BLOCK_BASE,
RSA_MEM_M_BLOCK_BASE,
};
const uint32_t MPI_LL_OPERATIONS[SOC_MPI_OPERATIONS_NUM] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_MULT_START_REG,
};

View File

@ -7,14 +7,14 @@
#include "soc/hwcrypto_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_MEM_X_BLOCK_BASE,
RSA_MEM_Y_BLOCK_BASE,
RSA_MEM_Z_BLOCK_BASE,
RSA_MEM_M_BLOCK_BASE,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_MULT_START_REG,
RSA_MOD_MULT_START_REG,
RSA_MODEXP_START_REG,

View File

@ -7,14 +7,14 @@
#include "soc/rsa_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_X_MEM,
RSA_Y_MEM,
RSA_Z_MEM,
RSA_M_MEM,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_SET_START_MULT_REG,
RSA_SET_START_MODMULT_REG,
RSA_SET_START_MODEXP_REG,

View File

@ -7,14 +7,14 @@
#include "soc/rsa_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_X_MEM,
RSA_Y_MEM,
RSA_Z_MEM,
RSA_M_MEM,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_SET_START_MULT_REG,
RSA_SET_START_MODMULT_REG,
RSA_SET_START_MODEXP_REG,

View File

@ -7,14 +7,14 @@
#include "soc/rsa_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_X_MEM_REG,
RSA_Y_MEM_REG,
RSA_Z_MEM_REG,
RSA_M_MEM_REG,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_SET_START_MULT_REG,
RSA_SET_START_MODMULT_REG,
RSA_SET_START_MODEXP_REG,

View File

@ -7,14 +7,14 @@
#include "soc/rsa_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_X_MEM,
RSA_Y_MEM,
RSA_Z_MEM,
RSA_M_MEM,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_SET_START_MULT_REG,
RSA_SET_START_MODMULT_REG,
RSA_SET_START_MODEXP_REG,

View File

@ -7,14 +7,14 @@
#include "soc/hwcrypto_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_MEM_X_BLOCK_BASE,
RSA_MEM_Y_BLOCK_BASE,
RSA_MEM_Z_BLOCK_BASE,
RSA_MEM_M_BLOCK_BASE,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_MULT_START_REG,
RSA_MOD_MULT_START_REG,
RSA_MODEXP_START_REG,

View File

@ -7,14 +7,14 @@
#include "soc/hwcrypto_reg.h"
#include "soc/mpi_periph.h"
const uint32_t MPI_LL_BLOCK_BASES[4] = {
const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM] = {
RSA_MEM_X_BLOCK_BASE,
RSA_MEM_Y_BLOCK_BASE,
RSA_MEM_Z_BLOCK_BASE,
RSA_MEM_M_BLOCK_BASE,
};
const uint32_t MPI_LL_OPERATIONS[3] = {
const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM] = {
RSA_MULT_START_REG,
RSA_MOD_MULT_START_REG,
RSA_MODEXP_START_REG,

View File

@ -16,8 +16,8 @@ extern "C"
#if SOC_MPI_SUPPORTED
extern const uint32_t MPI_LL_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM];
extern const uint32_t MPI_LL_OPERATIONS[SOC_MPI_OPERATIONS_NUM];
extern const uint32_t MPI_BLOCK_BASES[SOC_MPI_MEM_BLOCKS_NUM];
extern const uint32_t MPI_OPERATIONS_REG[SOC_MPI_OPERATIONS_NUM];
#endif // SOC_MPI_SUPPORTED