From b55d6622d4f4d795d71e930da1fcda7c78a7fe96 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 16 Dec 2020 22:10:40 +0100 Subject: OvmfPkg/VirtioFsDxe: DriverBinding: open VirtioDevice, install SimpleFs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complete the Supported, Start, and Stop member functions of EFI_DRIVER_BINDING_PROTOCOL sufficiently for exercising the UEFI driver model: - bind virtio-fs devices, - produce placeholder EFI_SIMPLE_FILE_SYSTEM_PROTOCOL instances on them. On the "TO_START" (= Virtio) side, the VirtioFsBindingSupported() function verifies the Virtio subsystem ID for the virtio-fs device (decimal 26 -- see ). Beyond that, no actual Virtio setup is performed for now. Those bits are going to be implemented later in this series. On the "BY_START" (= UEFI filesystem) side, the VirtioFsOpenVolume() function -- which is the sole EFI_SIMPLE_FILE_SYSTEM_PROTOCOL member function -- is a stub; it always returns EFI_NO_MEDIA, for now. The "CONNECT", "DISCONNECT", and "MAP -R" UEFI Shell commands can be used to test this patch. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Philippe Mathieu-Daudé Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097 Signed-off-by: Laszlo Ersek Message-Id: <20201216211125.19496-4-lersek@redhat.com> Acked-by: Ard Biesheuvel --- OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf') diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf index 69cb44bc7c..ff9b1c6178 100644 --- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf +++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf @@ -78,15 +78,22 @@ [Packages] MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec [Sources] DriverBinding.c + SimpleFsOpenVolume.c + VirtioFsDxe.h [LibraryClasses] BaseLib + DebugLib + MemoryAllocationLib UefiBootServicesTableLib UefiDriverEntryPoint [Protocols] gEfiComponentName2ProtocolGuid ## PRODUCES gEfiDriverBindingProtocolGuid ## PRODUCES + gEfiSimpleFileSystemProtocolGuid ## BY_START + gVirtioDeviceProtocolGuid ## TO_START -- cgit v1.2.3