Home
last modified time | relevance | path

Searched full:rng (Results 1 – 25 of 110) sorted by relevance

12345

/optee_os/core/drivers/
H A Ddra7_rng.c74 static vaddr_t rng; variable
79 while (!(io_read32(rng + RNG_STATUS) & RNG_READY)) { in dra7_rng_read64()
81 if (io_read32(rng + RNG_STATUS) & SHUTDOWN_OFLO) { in dra7_rng_read64()
82 uint32_t alarm = io_read32(rng + RNG_ALARMSTOP); in dra7_rng_read64()
83 uint32_t tune = io_read32(rng + RNG_FRODETUNE); in dra7_rng_read64()
86 io_write32(rng + RNG_ALARMMASK, 0x0); in dra7_rng_read64()
87 io_write32(rng + RNG_ALARMSTOP, 0x0); in dra7_rng_read64()
89 io_write32(rng + RNG_FRODETUNE, tune ^ alarm); in dra7_rng_read64()
91 io_write32(rng + RNG_FROENABLE, RNG_FRO_MASK); in dra7_rng_read64()
93 io_write32(rng + RNG_INTACK, SHUTDOWN_OFLO); in dra7_rng_read64()
[all …]
H A Dimx_rngb.c73 static void wait_for_irq(struct imx_rng *rng) in wait_for_irq() argument
79 rng->error = io_read32(rng->base.va + RNG_ESR); in wait_for_irq()
80 status = io_read32(rng->base.va + RNG_SR); in wait_for_irq()
88 static void irq_clear(struct imx_rng *rng) in irq_clear() argument
90 io_setbits32(rng->base.va + RNG_CR, in irq_clear()
92 io_setbits32(rng->base.va + RNG_CMD, in irq_clear()
96 static void irq_unmask(struct imx_rng *rng) in irq_unmask() argument
98 io_clrbits32(rng->base.va + RNG_CR, in irq_unmask()
102 static void rng_seed(struct imx_rng *rng) in rng_seed() argument
106 irq_clear(rng); in rng_seed()
[all …]
H A Dhi16xx_rng.c22 #define ALG_SC_RNG_RESET_DREQ 0xAB4 /* RNG reset cancel */
25 /* RNG registers */
31 # define RNG_EN BIT(0) /* Enable RNG */
44 vaddr_t rng = (vaddr_t)phys_to_virt(RNG_BASE, MEM_AREA_IO_SEC, in hi16xx_rng_init() local
48 /* ALG sub-controller must allow RNG out of reset */ in hi16xx_rng_init()
53 io_write32(rng + RNG_SEED, time.seconds * 1000 + time.millis); in hi16xx_rng_init()
56 * Enable RNG and configure it to re-seed automatically from the in hi16xx_rng_init()
59 io_write32(rng + RNG_CTRL, RNG_EN | RNG_RING_EN | RNG_SEED_SEL); in hi16xx_rng_init()
61 IMSG("Hi16xx RNG initialized"); in hi16xx_rng_init()
H A Dstm32_rng.c99 /* Expect at most a single RNG instance */
110 * Extracts from the STM32 RNG specification when RNG supports CONDRST.
112 * When a noise source (or seed) error occurs, the RNG stops generating
118 * Indeed, when SEIS is set and SECS is cleared it means RNG performed
125 * cleared by RNG. The random number generation is now back to normal.
145 /* RNG auto-reset (step 2.) */ in conceal_seed_error_cond_reset()
179 * Extracts from the STM32 RNG specification, when CONDRST is not supported
181 * When a noise source (or seed) error occurs, the RNG stops generating
186 * error after the RNG initialization:
204 panic("RNG noise"); in conceal_seed_error_sw_reset()
[all …]
/optee_os/core/arch/arm/plat-k3/drivers/
H A Deip76d_trng.c65 static vaddr_t rng; variable
69 return io_read32(rng + RNG_CONTROL) & ENABLE_TRNG; in eip76d_rng_is_enabled()
79 io_write32(rng + RNG_CONFIG, val); in eip76d_rng_init_seq()
82 io_write32(rng + RNG_FRODETUNE, 0x0); in eip76d_rng_init_seq()
85 io_write32(rng + RNG_FROENABLE, 0xffffff); in eip76d_rng_init_seq()
87 io_write32(rng + RNG_CONTROL, ENABLE_TRNG); in eip76d_rng_init_seq()
97 while (!(io_read32(rng + RNG_STATUS) & RNG_READY)) { in eip76d_rng_read128()
99 if (io_read32(rng + RNG_STATUS) & SHUTDOWN_OFLO) { in eip76d_rng_read128()
100 uint32_t alarm = io_read32(rng + RNG_ALARMSTOP); in eip76d_rng_read128()
101 uint32_t tune = io_read32(rng + RNG_FRODETUNE); in eip76d_rng_read128()
[all …]
/optee_os/core/drivers/crypto/caam/include/
H A Dcaam_hal_rng.h15 * Returns if all RNG State Handler already instantiated or not
17 * @baseaddr RNG Base Address
22 * Returns the number of RNG State Handle
24 * @baseaddr RNG Base Address
29 * Returns the RNG Status State Handle
31 * @baseaddr RNG Base Address
36 * Returns true if the RNG Key is loaded, false otherwise
38 * @baseaddr RNG Base Address
43 * Returns true if the RNG was initialized for prediction resistance
45 * @baseaddr RNG Base Address
[all …]
H A Dcaam_rng.h11 * Initialize the RNG module to generate data
17 /* Instantiates the RNG State Handles if not already done */
/optee_os/core/drivers/crypto/caam/
H A Dcaam_rng.c6 * Implementation of RNG functions.
29 * RNG module private data
32 vaddr_t baseaddr; /* RNG base address */
33 bool instantiated; /* RNG instantiated */
34 bool pr_enabled; /* RNG prediction resistance */
78 RNG_TRACE("RNG Driver not initialized"); in do_rng_read()
83 RNG_TRACE("RNG Driver not initialized"); in do_rng_read()
89 RNG_TRACE("RNG buffer allocation failed"); in do_rng_read()
155 RNG_TRACE("RNG SH Status 0x%08" PRIx32 " - Key Status %" PRId8, in prepare_inst_desc()
216 RNG_TRACE("RNG Instantation"); in caam_rng_instantiation()
[all …]
/optee_os/core/include/drivers/
H A Dimx_sc_api.h26 * Starts the random number generator and returns the RNG status.
28 * Note that the RNG is started automatically after all CPUs are booted. This
29 * function can then be used to start the RNG earlier or to check the RNG
/optee_os/core/drivers/crypto/se050/core/
H A Drng.c15 sss_se05x_rng_context_t rng = { }; in do_rng_read() local
17 sss_se05x_rng_context_init(&rng, se050_session); in do_rng_read()
18 status = sss_se05x_rng_get_random(&rng, buf, blen); in do_rng_read()
19 sss_se05x_rng_context_free(&rng); in do_rng_read()
/optee_os/core/drivers/crypto/ele/
H A Dcrypto.mk4 # the RNG concurrently at runtime. To prevent any issue,
5 # use the software RNG instead in OPTEE.
6 # But with Kernel ELE driver disabled, Runtime ELE RNG
H A Dele.c494 * @size: RNG data size
499 struct imx_ele_buf rng = { }; in imx_ele_rng_get_random() local
516 res = imx_ele_buf_alloc(&rng, NULL, size); in imx_ele_rng_get_random()
520 cmd.addr_msb = rng.paddr_msb; in imx_ele_rng_get_random()
521 cmd.addr_lsb = rng.paddr_lsb; in imx_ele_rng_get_random()
540 res = imx_ele_buf_copy(&rng, buffer, size); in imx_ele_rng_get_random()
542 imx_ele_buf_free(&rng); in imx_ele_rng_get_random()
559 panic("ELE RNG is busy"); in plat_get_aslr_seed()
/optee_os/core/drivers/crypto/caam/hal/common/
H A Dhal_rng.c21 /* RNG version < 4 and RNG state handle is already instantiated */ in caam_hal_rng_instantiated()
37 /* Read the RNG Status and checks if all channels are instantiatied */ in caam_hal_rng_instantiated()
87 * Switch RNG in program mode in caam_hal_rng_kick()
95 * Configure the RNG Entropy Delay in caam_hal_rng_kick()
155 * the RNG clock is not within 1/2x to 8x the system clock. in caam_hal_rng_kick()
/optee_os/lib/libutee/include/
H A Dpta_rng.h15 * PTA_CMD_GET_ENTROPY - Get Entropy from RNG using Thermal Sensor
31 * PTA_CMD_GET_RNG_INFO - Get RNG information
33 * [out] value[0].a - RNG data-rate in bytes per second
/optee_os/core/include/tee/
H A Dtee_cryp_utl.h22 * plat_prng_add_jitter_entropy() - Adds jitter to RNG entropy pool
33 * plat_rng_init() - Initialize RNG support.
35 * to __plat_rng_init() that implements a weak seeding of the RNG.
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Decjpake.h156 * \param f_rng The RNG function to use. This must not be \c NULL.
157 * \param p_rng The RNG parameter to be passed to \p f_rng. This
197 * \param f_rng The RNG function to use. This must not be \c NULL.
198 * \param p_rng The RNG parameter to be passed to \p f_rng. This
237 * \param f_rng The RNG function to use. This must not be \c NULL.
238 * \param p_rng The RNG parameter to be passed to \p f_rng. This
260 * \param f_rng The RNG function to use. This must not be \c NULL.
261 * \param p_rng The RNG parameter to be passed to \p f_rng. This
H A Decdsa.h153 * \param f_rng The RNG function, used both to generate the ECDSA nonce
155 * \param p_rng The RNG context to be passed to \p f_rng. This may be
197 * \param f_rng_blind The RNG function used for blinding. This must not be
199 * \param p_rng_blind The RNG context to be passed to \p f_rng_blind. This
251 * \param f_rng The RNG function used to generate the ECDSA nonce.
253 * \param p_rng The RNG context to be passed to \p f_rng. This may be
255 * \param f_rng_blind The RNG function used for blinding. This must not be
257 * \param p_rng_blind The RNG context to be passed to \p f_rng. This may be
318 * \param f_rng_blind The RNG function used for blinding. This must not be
320 * \param p_rng_blind The RNG context to be passed to \p f_rng_blind. This may be
[all …]
H A Decdh.h183 * \param f_rng The RNG function to use. This must not be \c NULL.
184 * \param p_rng The RNG context to be passed to \p f_rng. This may be
217 * \param f_rng The RNG function to use. This must not be \c NULL.
218 * \param p_rng The RNG context to be passed to \p f_rng. This may be
282 * \param f_rng The RNG function to use. This must not be \c NULL.
283 * \param p_rng The RNG context to be passed to \p f_rng. This may be
364 * \param f_rng The RNG function to use. This must not be \c NULL.
365 * \param p_rng The RNG context to be passed to \p f_rng. This may be
420 * \param f_rng The RNG function to use. This must not be \c NULL.
421 * \param p_rng The RNG context. This may be \c NULL if \p f_rng
H A Dthreading.h117 * A mutex used to make the non-rng PSA global_data struct members thread safe.
120 * structure members, other than the rng_state or rng struct. */
124 * A mutex used to make the PSA global_data rng data thread safe.
127 * global_data rng_state or rng struct members. */
H A Drsa.h456 * \param f_rng The RNG function to be used for key generation.
458 * \param p_rng The RNG context to be passed to \p f_rng.
578 * \param f_rng The RNG function, used for blinding. It is mandatory.
579 * \param p_rng The RNG context to pass to \p f_rng. This may be \c NULL
606 * \param f_rng The RNG to use. It is used for padding generation
608 * \param p_rng The RNG context to be passed to \p f_rng. May be
633 * \param f_rng The RNG function to use. It is mandatory and used for
635 * \param p_rng The RNG context to be passed to \p f_rng. This may
663 * \param f_rng The RNG function to use. This is needed for padding
665 * \param p_rng The RNG context to be passed to \p f_rng. This may
[all …]
H A Dssl_ticket.h79 void *MBEDTLS_PRIVATE(p_rng); /*!< context for the RNG function */
100 * \param f_rng RNG callback function (mandatory)
101 * \param p_rng RNG callback context.
102 * Note that the RNG callback must remain valid
/optee_os/core/lib/libtomcrypt/src/prngs/
H A Drng_make_prng.c12 Create a PRNG from a RNG
16 but the imported data comes directly from the RNG.
21 @param callback A pointer to a void function for when the RNG is slow, this can be NULL
/optee_os/core/arch/arm/plat-k3/
H A Dplatform_config.h106 /* RNG */
115 * If we got here we're trying to build a hardware based RNG driver
119 #error "Unknown platform flavor! No base address is defined for RNG"
/optee_os/core/crypto/
H A Drng_hw.c11 /* This is a HW RNG, no need for seeding */
17 /* This is a HW RNG, no need to add entropy */
/optee_os/core/tee/
H A Dtee_cryp_utl.c182 * a hardware RNG or from a previously saved seed. in __plat_rng_init()
184 * Seeding with hardware RNG is currently up to the platform to in __plat_rng_init()
192 EMSG("Warning: seeding RNG with zeroes"); in __plat_rng_init()
198 EMSG("Failed to initialize RNG: %#" PRIx32, res); in __plat_rng_init()

12345