]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/VirtioRngDxe/VirtioRng.h
OvmfPkg: Replace BSD License with BSD+Patent License
[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
b26f0cf9 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
3e92a997
LE
8\r
9**/\r
10\r
11#ifndef _VIRTIO_RNG_DXE_H_\r
12#define _VIRTIO_RNG_DXE_H_\r
13\r
14#include <Protocol/ComponentName.h>\r
15#include <Protocol/DriverBinding.h>\r
16#include <Protocol/Rng.h>\r
17\r
18#include <IndustryStandard/Virtio.h>\r
19\r
20#define VIRTIO_RNG_SIG SIGNATURE_32 ('V', 'R', 'N', 'G')\r
21\r
22typedef struct {\r
23 //\r
24 // Parts of this structure are initialized / torn down in various functions\r
25 // at various call depths. The table to the right should make it easier to\r
26 // track them.\r
27 //\r
28 // field init function init depth\r
29 // ---------------- ------------------ ----------\r
30 UINT32 Signature; // DriverBindingStart 0\r
31 VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0\r
32 EFI_EVENT ExitBoot; // DriverBindingStart 0\r
33 VRING Ring; // VirtioRingInit 2\r
34 EFI_RNG_PROTOCOL Rng; // VirtioRngInit 1\r
0a568ccb 35 VOID *RingMap; // VirtioRingMap 2\r
3e92a997
LE
36} VIRTIO_RNG_DEV;\r
37\r
38#define VIRTIO_ENTROPY_SOURCE_FROM_RNG(RngPointer) \\r
39 CR (RngPointer, VIRTIO_RNG_DEV, Rng, VIRTIO_RNG_SIG)\r
40\r
41#endif\r