diff options
author | Steven Kinney <steven.kinney@linaro.org> | 2013-10-02 16:33:44 -0500 |
---|---|---|
committer | Steven Kinney <steven.kinney@linaro.org> | 2013-10-02 16:33:44 -0500 |
commit | 84502da15069f664cc729da8fdc53bfa832234eb (patch) | |
tree | 3a0392c05f26c3167c1381be32af424a3aca0ebd /SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h | |
parent | 09e7ec163baf29e6ee85e36c9ef348ebb9369b7e (diff) | |
parent | eafdd4f792145f3470b66e66fdb1d6da2720820b (diff) |
Merge branch 'linaro-topic-arndale' into x-integ
Diffstat (limited to 'SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h')
-rw-r--r-- | SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h new file mode 100644 index 000000000..58376b530 --- /dev/null +++ b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Include/Protocol/ExynosRng.h @@ -0,0 +1,52 @@ +/** @file + + Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> + + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __EXYNOS_RNG_H__ +#define __EXYNOS_RNG_H__ + +// +// Protocol interface structure +// +typedef struct _EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL; + +/** + * Generates a pseudorandom byte stream of the specified size. + * + * If Output is NULL, then return FALSE. + * + * @param[out] Output Pointer to buffer to receive random value + * @param[in] Size Size of random bytes to generate + * + * @retval TRUE Pseudorandom byte stream generated successfully. + * @retval FALSE Pseudorandom number generator fails to generate due to lack of entropy. + * + **/ +typedef +EFI_STATUS +(EFIAPI *EFI_RANDOM_BYTES) ( + IN CONST EFI_RNG_PROTOCOL *This, + OUT UINT8 *Output, + IN UINTN Size + ); + +/// +/// This protocol allows creating peudorandom random number using HW RNG engine. +/// +struct _EFI_RNG_PROTOCOL { + EFI_RANDOM_BYTES RandomBytes; +}; + +extern EFI_GUID gSamsungPlatformRngProtocolGuid; + +#endif |