Commit | Line | Data |
---|---|---|
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 | |
7 | This program and the accompanying materials are licensed and made available\r | |
8 | under the terms and conditions of the BSD License which accompanies this\r | |
9 | distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
13 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef _VIRTIO_MMIO_DEVICE_LIB_H_\r | |
18 | #define _VIRTIO_MMIO_DEVICE_LIB_H_\r | |
19 | \r | |
20 | /**\r | |
21 | \r | |
22 | Initialize VirtIo Device and Install VIRTIO_DEVICE_PROTOCOL protocol\r | |
23 | \r | |
24 | @param[in] BaseAddress Base Address of the VirtIo MMIO Device\r | |
25 | \r | |
26 | @param[in] Handle Handle of the device the driver should be attached\r | |
27 | to.\r | |
28 | \r | |
29 | @retval EFI_SUCCESS The VirtIo Device has been installed\r | |
30 | successfully.\r | |
31 | \r | |
32 | @retval EFI_OUT_OF_RESOURCES The function failed to allocate memory required\r | |
33 | by the Virtio MMIO device initialization.\r | |
34 | \r | |
35 | @retval EFI_UNSUPPORTED BaseAddress does not point to a VirtIo MMIO\r | |
36 | device.\r | |
37 | \r | |
38 | @return Status code returned by InstallProtocolInterface\r | |
39 | Boot Service function.\r | |
40 | \r | |
41 | **/\r | |
42 | EFI_STATUS\r | |
43 | VirtioMmioInstallDevice (\r | |
44 | IN PHYSICAL_ADDRESS BaseAddress,\r | |
45 | IN EFI_HANDLE Handle\r | |
46 | );\r | |
47 | \r | |
48 | /**\r | |
49 | \r | |
50 | Uninstall the VirtIo Device\r | |
51 | \r | |
52 | @param[in] Handle Handle of the device where the VirtIo Device protocol\r | |
53 | should have been installed.\r | |
54 | \r | |
55 | @retval EFI_SUCCESS The device has been un-initialized successfully.\r | |
56 | \r | |
57 | @return Status code returned by UninstallProtocolInterface\r | |
58 | Boot Service function.\r | |
59 | \r | |
60 | **/\r | |
61 | EFI_STATUS\r | |
62 | VirtioMmioUninstallDevice (\r | |
63 | IN EFI_HANDLE Handle\r | |
64 | );\r | |
65 | \r | |
66 | #endif // _VIRTIO_MMIO_DEVICE_LIB_H_\r |