developer | 01abd6d | 2024-09-19 18:52:33 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2024, MediaTek Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <stdbool.h> |
| 8 | #include <stdint.h> |
| 9 | |
| 10 | #include <lib/smccc.h> |
| 11 | #include <plat/common/plat_trng.h> |
| 12 | |
| 13 | #include <mtk_sip_svc.h> |
| 14 | |
| 15 | DEFINE_SVC_UUID2(_plat_trng_uuid, |
| 16 | 0xf6b2c8d9, 0x1abb, 0x4d83, 0xb2, 0x3f, |
| 17 | 0x5c, 0x51, 0xb6, 0xef, 0xfc, 0xaf |
| 18 | ); |
| 19 | uuid_t plat_trng_uuid; |
| 20 | |
| 21 | void plat_entropy_setup(void) |
| 22 | { |
| 23 | uint64_t placeholder; |
| 24 | |
| 25 | plat_trng_uuid = _plat_trng_uuid; |
| 26 | |
| 27 | /* Initialise the entropy source and trigger RNG generation */ |
| 28 | plat_get_entropy(&placeholder); |
| 29 | } |