]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/VirtioRngDxe/VirtioRng.h
OvmfPkg/TlsAuthConfigLib: configure trusted CA certs for HTTPS boot
[mirror_edk2.git] / OvmfPkg / VirtioRngDxe / VirtioRng.h
CommitLineData
3e92a997
LE
1/** @file\r
2\r
3 Private definitions of the VirtioRng RNG driver\r
4\r
5 Copyright (C) 2016, Linaro Ltd.\r
6\r
7 This program and the accompanying materials are licensed and made available\r
8 under the terms and conditions of the BSD License which accompanies this\r
9 distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _VIRTIO_RNG_DXE_H_\r
18#define _VIRTIO_RNG_DXE_H_\r
19\r
20#include <Protocol/ComponentName.h>\r
21#include <Protocol/DriverBinding.h>\r
22#include <Protocol/Rng.h>\r
23\r
24#include <IndustryStandard/Virtio.h>\r
25\r
26#define VIRTIO_RNG_SIG SIGNATURE_32 ('V', 'R', 'N', 'G')\r
27\r
28typedef struct {\r
29 //\r
30 // Parts of this structure are initialized / torn down in various functions\r
31 // at various call depths. The table to the right should make it easier to\r
32 // track them.\r
33 //\r
34 // field init function init depth\r
35 // ---------------- ------------------ ----------\r
36 UINT32 Signature; // DriverBindingStart 0\r
37 VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0\r
38 EFI_EVENT ExitBoot; // DriverBindingStart 0\r
39 VRING Ring; // VirtioRingInit 2\r
40 EFI_RNG_PROTOCOL Rng; // VirtioRngInit 1\r
0a568ccb 41 VOID *RingMap; // VirtioRingMap 2\r
3e92a997
LE
42} VIRTIO_RNG_DEV;\r
43\r
44#define VIRTIO_ENTROPY_SOURCE_FROM_RNG(RngPointer) \\r
45 CR (RngPointer, VIRTIO_RNG_DEV, Rng, VIRTIO_RNG_SIG)\r
46\r
47#endif\r