]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/VirtioRngDxe/VirtioRng.h
3 Private definitions of the VirtioRng RNG driver
5 Copyright (C) 2016, Linaro Ltd.
7 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef _VIRTIO_RNG_DXE_H_
18 #define _VIRTIO_RNG_DXE_H_
20 #include <Protocol/ComponentName.h>
21 #include <Protocol/DriverBinding.h>
22 #include <Protocol/Rng.h>
24 #include <IndustryStandard/Virtio.h>
26 #define VIRTIO_RNG_SIG SIGNATURE_32 ('V', 'R', 'N', 'G')
30 // Parts of this structure are initialized / torn down in various functions
31 // at various call depths. The table to the right should make it easier to
34 // field init function init depth
35 // ---------------- ------------------ ----------
36 UINT32 Signature
; // DriverBindingStart 0
37 VIRTIO_DEVICE_PROTOCOL
*VirtIo
; // DriverBindingStart 0
38 EFI_EVENT ExitBoot
; // DriverBindingStart 0
39 VRING Ring
; // VirtioRingInit 2
40 EFI_RNG_PROTOCOL Rng
; // VirtioRngInit 1
43 #define VIRTIO_ENTROPY_SOURCE_FROM_RNG(RngPointer) \
44 CR (RngPointer, VIRTIO_RNG_DEV, Rng, VIRTIO_RNG_SIG)