mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-23 13:36:05 +00:00

Introduce a common RNG driver along with the specific driver for MT8186 platform. Change-Id: I9f4437b6a4b3e8564a035ff5abb681bcfe85bd1e Signed-off-by: Suyuan Su <suyuan.su@mediatek.com> Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
29 lines
566 B
C
29 lines
566 B
C
/*
|
|
* Copyright (c) 2024, MediaTek Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include <lib/smccc.h>
|
|
#include <plat/common/plat_trng.h>
|
|
|
|
#include <mtk_sip_svc.h>
|
|
|
|
DEFINE_SVC_UUID2(_plat_trng_uuid,
|
|
0xf6b2c8d9, 0x1abb, 0x4d83, 0xb2, 0x3f,
|
|
0x5c, 0x51, 0xb6, 0xef, 0xfc, 0xaf
|
|
);
|
|
uuid_t plat_trng_uuid;
|
|
|
|
void plat_entropy_setup(void)
|
|
{
|
|
uint64_t placeholder;
|
|
|
|
plat_trng_uuid = _plat_trng_uuid;
|
|
|
|
/* Initialise the entropy source and trigger RNG generation */
|
|
plat_get_entropy(&placeholder);
|
|
}
|