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