]>
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 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef _VIRTIO_RNG_DXE_H_
12 #define _VIRTIO_RNG_DXE_H_
14 #include <Protocol/ComponentName.h>
15 #include <Protocol/DriverBinding.h>
16 #include <Protocol/Rng.h>
18 #include <IndustryStandard/Virtio.h>
20 #define VIRTIO_RNG_SIG SIGNATURE_32 ('V', 'R', 'N', 'G')
24 // Parts of this structure are initialized / torn down in various functions
25 // at various call depths. The table to the right should make it easier to
28 // field init function init depth
29 // ---------------- ------------------ ----------
30 UINT32 Signature
; // DriverBindingStart 0
31 VIRTIO_DEVICE_PROTOCOL
*VirtIo
; // DriverBindingStart 0
32 EFI_EVENT ExitBoot
; // DriverBindingStart 0
33 VRING Ring
; // VirtioRingInit 2
34 EFI_RNG_PROTOCOL Rng
; // VirtioRngInit 1
35 VOID
*RingMap
; // VirtioRingMap 2
38 #define VIRTIO_ENTROPY_SOURCE_FROM_RNG(RngPointer) \
39 CR (RngPointer, VIRTIO_RNG_DEV, Rng, VIRTIO_RNG_SIG)