1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /*
8  * Replacement for Nordic's nrf  soc/nordic/common/soc_secure.h
9  */
10 #ifndef BOARDS_POSIX_NRF52_BSIM_SOC_SECURE_H
11 #define BOARDS_POSIX_NRF52_BSIM_SOC_SECURE_H
12 
13 
14 #include <stdint.h>
15 #include <nrf.h>
16 #include <hal/nrf_ficr.h>
17 
soc_secure_read_deviceid(uint32_t deviceid[2])18 static inline void soc_secure_read_deviceid(uint32_t deviceid[2])
19 {
20 	deviceid[0] = nrf_ficr_deviceid_get(NRF_FICR, 0);
21 	deviceid[1] = nrf_ficr_deviceid_get(NRF_FICR, 1);
22 }
23 
soc_secure_mem_read(void * dst,void * src,size_t len)24 static inline int soc_secure_mem_read(void *dst, void *src, size_t len)
25 {
26 	(void)memcpy(dst, src, len);
27 	return 0;
28 }
29 
30 #endif /* BOARDS_POSIX_NRF52_BSIM_SOC_SECURE_H */
31