mirror of https://github.com/acidanthera/audk.git
OvmfPkg/MptScsiDxe: Install DriverBinding Protocol
In order to probe and connect to the MptScsi device we need this protocol. Currently it does nothing. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2390 Signed-off-by: Nikita Leshenko <nikita.leshchenko@oracle.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liran Alon <liran.alon@oracle.com> Message-Id: <20200504210607.144434-3-nikita.leshchenko@oracle.com>
This commit is contained in:
parent
feec20b28d
commit
ad8f2d6b07
OvmfPkg/MptScsiDxe
|
@ -9,8 +9,66 @@
|
|||
|
||||
**/
|
||||
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Uefi/UefiSpec.h>
|
||||
|
||||
//
|
||||
// Higher versions will be used before lower, 0x10-0xffffffef is the version
|
||||
// range for IVH (Indie Hardware Vendors)
|
||||
//
|
||||
#define MPT_SCSI_BINDING_VERSION 0x10
|
||||
|
||||
//
|
||||
// Driver Binding
|
||||
//
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MptScsiControllerSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MptScsiControllerStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MptScsiControllerStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_DRIVER_BINDING_PROTOCOL mMptScsiDriverBinding = {
|
||||
&MptScsiControllerSupported,
|
||||
&MptScsiControllerStart,
|
||||
&MptScsiControllerStop,
|
||||
MPT_SCSI_BINDING_VERSION,
|
||||
NULL, // ImageHandle, filled by EfiLibInstallDriverBindingComponentName2
|
||||
NULL, // DriverBindingHandle, filled as well
|
||||
};
|
||||
|
||||
//
|
||||
// Entry Point
|
||||
//
|
||||
|
@ -22,5 +80,12 @@ MptScsiEntryPoint (
|
|||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
return EfiLibInstallDriverBindingComponentName2 (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
&mMptScsiDriverBinding,
|
||||
ImageHandle, // The handle to install onto
|
||||
NULL, // TODO Component name
|
||||
NULL // TODO Component name
|
||||
);
|
||||
}
|
||||
|
|
|
@ -24,3 +24,4 @@
|
|||
|
||||
[LibraryClasses]
|
||||
UefiDriverEntryPoint
|
||||
UefiLib
|
||||
|
|
Loading…
Reference in New Issue