]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/VirtioMmioDeviceLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / Include / Library / VirtioMmioDeviceLib.h
1 /** @file
2
3 Definitions for the VirtIo MMIO Device Library
4
5 Copyright (C) 2013, ARM Ltd
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef _VIRTIO_MMIO_DEVICE_LIB_H_
12 #define _VIRTIO_MMIO_DEVICE_LIB_H_
13
14 /**
15
16 Initialize VirtIo Device and Install VIRTIO_DEVICE_PROTOCOL protocol
17
18 @param[in] BaseAddress Base Address of the VirtIo MMIO Device
19
20 @param[in] Handle Handle of the device the driver should be attached
21 to.
22
23 @retval EFI_SUCCESS The VirtIo Device has been installed
24 successfully.
25
26 @retval EFI_OUT_OF_RESOURCES The function failed to allocate memory required
27 by the Virtio MMIO device initialization.
28
29 @retval EFI_UNSUPPORTED BaseAddress does not point to a VirtIo MMIO
30 device.
31
32 @return Status code returned by InstallProtocolInterface
33 Boot Service function.
34
35 **/
36 EFI_STATUS
37 VirtioMmioInstallDevice (
38 IN PHYSICAL_ADDRESS BaseAddress,
39 IN EFI_HANDLE Handle
40 );
41
42 /**
43
44 Uninstall the VirtIo Device
45
46 @param[in] Handle Handle of the device where the VirtIo Device protocol
47 should have been installed.
48
49 @retval EFI_SUCCESS The device has been un-initialized successfully.
50
51 @return Status code returned by UninstallProtocolInterface
52 Boot Service function.
53
54 **/
55 EFI_STATUS
56 VirtioMmioUninstallDevice (
57 IN EFI_HANDLE Handle
58 );
59
60 #endif // _VIRTIO_MMIO_DEVICE_LIB_H_