1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2019, Linaro Limited
6 #if !defined _EFI_RNG_H_
12 /* EFI random number generation protocol related GUID definitions */
13 #define EFI_RNG_PROTOCOL_GUID \
14 EFI_GUID(0x3152bca5, 0xeade, 0x433d, 0x86, 0x2e, \
15 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44)
17 #define EFI_RNG_ALGORITHM_RAW \
18 EFI_GUID(0xe43176d7, 0xb6e8, 0x4827, 0xb7, 0x84, \
19 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61)
21 struct efi_rng_protocol
{
22 efi_status_t (EFIAPI
*get_info
)(struct efi_rng_protocol
*protocol
,
23 efi_uintn_t
*rng_algorithm_list_size
,
24 efi_guid_t
*rng_algorithm_list
);
25 efi_status_t (EFIAPI
*get_rng
)(struct efi_rng_protocol
*protocol
,
26 efi_guid_t
*rng_algorithm
,
27 efi_uintn_t rng_value_length
, uint8_t *rng_value
);
30 efi_status_t
platform_get_rng_device(struct udevice
**dev
);
32 #endif /* _EFI_RNG_H_ */