1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

Merge pull request #10386 from PeterKietzmann/pr_puf_variables_move

sys/puf_sram: CPU specific variable allocation
This commit is contained in:
MichelRottleuthner 2018-11-20 09:21:25 +01:00 committed by GitHub
commit e0e02c04c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -68,6 +68,11 @@ extern "C" {
#endif
/** @} */
/**
* @brief Attribute for memory sections required by SRAM PUF
*/
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".puf")))
#ifdef __cplusplus
}
#endif

View File

@ -19,13 +19,13 @@
#include "puf_sram.h"
/* Allocation of the PUF seed variable */
__attribute__((used,section(".puf"))) uint32_t puf_sram_seed;
PUF_SRAM_ATTRIBUTES uint32_t puf_sram_seed;
/* Allocation of the PUF seed state */
__attribute__((used,section(".puf"))) uint32_t puf_sram_state;
PUF_SRAM_ATTRIBUTES uint32_t puf_sram_state;
/* Allocation of the memory marker */
__attribute__((used,section(".puf"))) uint32_t puf_sram_marker;
PUF_SRAM_ATTRIBUTES uint32_t puf_sram_marker;
void puf_sram_init(const uint8_t *ram, size_t len)
{