mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/riscv_common: add puf_sram feature
This commit is contained in:
parent
992e09b07b
commit
6215b7e630
@ -12,6 +12,7 @@ config CPU_ARCH_RISCV
|
|||||||
select HAS_NEWLIB
|
select HAS_NEWLIB
|
||||||
select HAS_PERIPH_CORETIMER
|
select HAS_PERIPH_CORETIMER
|
||||||
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
||||||
|
select HAS_PUF_SRAM
|
||||||
select HAS_RUST_TARGET
|
select HAS_RUST_TARGET
|
||||||
select HAS_SSP
|
select HAS_SSP
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ FEATURES_PROVIDED += cpp
|
|||||||
FEATURES_PROVIDED += libstdcpp
|
FEATURES_PROVIDED += libstdcpp
|
||||||
FEATURES_PROVIDED += newlib
|
FEATURES_PROVIDED += newlib
|
||||||
FEATURES_PROVIDED += periph_coretimer
|
FEATURES_PROVIDED += periph_coretimer
|
||||||
|
FEATURES_PROVIDED += puf_sram
|
||||||
FEATURES_PROVIDED += rust_target
|
FEATURES_PROVIDED += rust_target
|
||||||
FEATURES_PROVIDED += ssp
|
FEATURES_PROVIDED += ssp
|
||||||
|
|
||||||
|
@ -37,6 +37,11 @@
|
|||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Attribute for memory sections required by SRAM PUF
|
||||||
|
*/
|
||||||
|
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Declare the heap_stats function as available
|
* @brief Declare the heap_stats function as available
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +21,17 @@
|
|||||||
#include "cpu_conf_common.h"
|
#include "cpu_conf_common.h"
|
||||||
#include "periph_cpu_common.h"
|
#include "periph_cpu_common.h"
|
||||||
|
|
||||||
|
#ifdef MODULE_PUF_SRAM
|
||||||
|
#include "puf_sram.h"
|
||||||
|
|
||||||
|
extern unsigned _sheap;
|
||||||
|
|
||||||
|
void riscv_puf_sram_init(void)
|
||||||
|
{
|
||||||
|
puf_sram_init((uint8_t *)&_sheap, SEED_RAM_LEN);
|
||||||
|
}
|
||||||
|
#endif /* MODULE_PUF_SRAM */
|
||||||
|
|
||||||
void riscv_fpu_init(void)
|
void riscv_fpu_init(void)
|
||||||
{
|
{
|
||||||
/* Enable FPU if present */
|
/* Enable FPU if present */
|
||||||
|
@ -27,6 +27,10 @@ _start_real:
|
|||||||
.option pop
|
.option pop
|
||||||
la sp, _sp
|
la sp, _sp
|
||||||
|
|
||||||
|
#ifdef MODULE_PUF_SRAM
|
||||||
|
/* PUF */
|
||||||
|
call riscv_puf_sram_init
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Load data section */
|
/* Load data section */
|
||||||
la a0, _data_lma
|
la a0, _data_lma
|
||||||
|
Loading…
Reference in New Issue
Block a user