Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Olivier Martin 6fb4e772a0 OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO
Why is the virtio-mmio implementation of the protocol a library,
instead of a driver binary?
The UEFI driver model would encourage to create a virtio-mmio driver
instead of a library. But the reasons why I created a library are:

- A virtio-mmio driver would imply an additional protocol that would
probably have a single attribute field:

typedef struct {
  PHYSICAL_ADDRESS       BaseAddress;
} VIRTIO_MMIO_DEVICE_PROTOCOL;

- There is no (easy) way to scan the available VirtIo devices on a
platform. So, the UEFI firmware for this platform would need a driver
to produce instances for every virtio devices it wants to expose in
UEFI. A single call to a helper library (ie: VirtioMmioDeviceLib)
make the porting easier.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>

v5:
- typo fix in VirtioMmioInstallDevice() comment block
- plug MmioDevice leak in VirtioMmioUninstallDevice()
- return EFI_INVALID_PARAMETER in VirtioMmioGetQueueAddress() if
  QueueAddress is NULL
- VirtioMmioSetQueueSize(): fix return value (it's a status code)
- VirtioMmioSetPageSize(): check against EFI_PAGE_SIZE with "if" plus
  EFI_UNSUPPORTED, rather than ASSERT()
- VirtioMmioDeviceWrite(), VirtioMmioDeviceRead(): remove redundant
  (FieldSize > 8) checks
- VirtioMmioDeviceLib.inf: drop UefiDriverEntryPoint library dependency

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14965 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-11 16:57:59 +00:00
AppPkg Enable the build command override the .DSC file contents to enable debug output and specify which debug messages are displayed. An example: 2013-11-19 02:37:37 +00:00
ArmPkg ARM Packages: Removed 'inline' keyword 2013-12-10 16:39:54 +00:00
ArmPlatformPkg ARM Packages: Removed 'inline' keyword 2013-12-10 16:39:54 +00:00
BaseTools Sync BaseTool trunk (version r2610) into EDKII BaseTools. 2013-11-18 07:41:21 +00:00
BeagleBoardPkg ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId 2013-12-06 16:11:34 +00:00
Conf Adding top-level Conf directory for next generation of EDK II build infrastructure tools. 2007-06-20 19:33:23 +00:00
CryptoPkg Fixed one typo in MathRShiftU64.S stub implementation; Add one digest algorithm registration to make sure the underlying algorithm is available for the default OpenSSL software PRNG implementation. 2013-11-19 02:57:19 +00:00
DuetPkg Fix Duet hang/reboot issue due to the NULL instance of CpuExceptionHandlerLib is used. 2013-11-26 05:41:34 +00:00
EdkCompatibilityPkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
EdkShellBinPkg EdkShellBinPkg: Added AArch64 EdkShellPkg binary and Updated Arm binary 2013-09-24 11:43:02 +00:00
EdkShellPkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
EmbeddedPkg EmbeddedPkg/EmbeddedPkg.dec: Defined default values for PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize 2013-11-28 21:40:14 +00:00
EmulatorPkg EmulatorPkg: Use FaultTolerantWritePei driver. 2013-07-03 09:24:07 +00:00
FatBinPkg Fix a bug in Fat driver that it asserts when OpenEx/ReadEx/WriteEx is about to return failure. 2013-11-29 03:04:16 +00:00
IntelFrameworkModulePkg Add additional check mRuntimeSmbiosEntryPoint == NULL to avoid K9 error. 2013-12-11 08:53:19 +00:00
IntelFrameworkPkg Fill the ImageHandle and DriverBindingHandle field of Driver Binding Protocol before installing the Driver Binding Protocol instance. 2013-07-10 02:06:49 +00:00
MdeModulePkg 1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h. 2013-12-10 09:14:39 +00:00
MdePkg 1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h. 2013-12-10 09:14:39 +00:00
NetworkPkg 1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h. 2013-12-10 09:14:39 +00:00
Nt32Pkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
Omap35xxPkg EmbeddedPkg: Introduced a separate SerialPortExtLib library 2013-03-12 00:40:11 +00:00
OptionRomPkg OptionRomPkg: Corrected path for the FtdiUsbSerialDxe.inf in OptionRomPkg.dsc 2013-11-01 17:01:23 +00:00
OvmfPkg OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO 2013-12-11 16:57:59 +00:00
PcAtChipsetPkg Fix PciHostBridge driver to return success for EfiPciHostBridgeEndEnumeration to fix OVMF boot no display issue. 2013-07-22 07:35:51 +00:00
PerformancePkg Refine the select language logic. 2013-09-05 05:39:57 +00:00
SecurityPkg Correct INF file to make module pass ICC compiler. 2013-12-11 08:22:43 +00:00
ShellBinPkg ShellBinPkg: Update ARM and AArch64 Binaries with svn 14706 ShellPkg sources 2013-09-24 10:22:32 +00:00
ShellPkg ShellPkg: Refactor Pipe handling 2013-12-10 18:41:35 +00:00
SourceLevelDebugPkg Correct INF file to make module pass ICC compiler. 2013-12-11 08:22:43 +00:00
StdLib StdLib: Update Copyright Notices. 2013-12-10 22:16:57 +00:00
StdLibPrivateInternalFiles EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Update ReadMe.txt in all packages. 2013-10-24 23:14:10 +00:00
UefiCpuPkg Correct INF file to make module pass ICC compiler. 2013-12-11 08:22:43 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
edksetup.bat Update edksetup.bat to check VS2012 2013-09-04 07:41:04 +00:00
edksetup.sh Correct copyright year 2011-02-16 12:21:31 +00:00