audk/OvmfPkg/VirtioRngDxe/VirtioRng.h
Michael D Kinney b26f0cf9ee OvmfPkg: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2019-04-09 10:58:19 -07:00

42 lines
1.3 KiB
C

/** @file
Private definitions of the VirtioRng RNG driver
Copyright (C) 2016, Linaro Ltd.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _VIRTIO_RNG_DXE_H_
#define _VIRTIO_RNG_DXE_H_
#include <Protocol/ComponentName.h>
#include <Protocol/DriverBinding.h>
#include <Protocol/Rng.h>
#include <IndustryStandard/Virtio.h>
#define VIRTIO_RNG_SIG SIGNATURE_32 ('V', 'R', 'N', 'G')
typedef struct {
//
// Parts of this structure are initialized / torn down in various functions
// at various call depths. The table to the right should make it easier to
// track them.
//
// field init function init depth
// ---------------- ------------------ ----------
UINT32 Signature; // DriverBindingStart 0
VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0
EFI_EVENT ExitBoot; // DriverBindingStart 0
VRING Ring; // VirtioRingInit 2
EFI_RNG_PROTOCOL Rng; // VirtioRngInit 1
VOID *RingMap; // VirtioRingMap 2
} VIRTIO_RNG_DEV;
#define VIRTIO_ENTROPY_SOURCE_FROM_RNG(RngPointer) \
CR (RngPointer, VIRTIO_RNG_DEV, Rng, VIRTIO_RNG_SIG)
#endif