VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseRngLib/AArch64/ArmRng.asm

Last change on this file was 108794, checked in by vboxsync, 4 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-asm
File size: 843 bytes
Line 
1;------------------------------------------------------------------------------
2;
3; ArmRndr() for AArch64
4;
5; Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
6;
7; SPDX-License-Identifier: BSD-2-Clause-Patent
8;
9;------------------------------------------------------------------------------
10
11#include "ArmRng.h"
12
13 EXPORT ArmRndr
14 AREA BaseLib_LowLevel, CODE, READONLY
15
16
17;/**
18; Generates a random number using RNDR.
19; Returns TRUE on success; FALSE on failure.
20;
21; @param[out] Rand Buffer pointer to store the 64-bit random value.
22;
23; @retval TRUE Random number generated successfully.
24; @retval FALSE Failed to generate the random number.
25;
26;**/
27;BOOLEAN
28;EFIAPI
29;ArmRndr (
30; OUT UINT64 *Rand
31; );
32;
33ArmRndr
34 mrs x1, RNDR
35 str x1, [x0]
36 cset x0, ne // RNDR sets NZCV to 0b0100 on failure
37 ret
38
39 END
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette