Implement EXT_SCSI_PASS_THRU.GetNextTarget() and EXT_SCSI_PASS_THRU.GetNextTargetLun(). ScsiBusDxe scans all MaxTarget * MaxLun possible devices. This can take unnecessarily long for large number of targets. To deal with this, VirtioScsiDxe has defined PCDs to limit the MaxTarget & MaxLun to desired values which gives sufficient performance. It is very important in virtio-scsi as it can have very big MaxTarget & MaxLun. Even though a common PVSCSI device has a default MaxTarget=64 and MaxLun=0, we implement similar mechanism as virtio-scsi for completeness. This may be useful in the future when PVSCSI will have bigger values for MaxTarget and MaxLun. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Liran Alon <liran.alon@oracle.com> Message-Id: <20200328200100.60786-7-liran.alon@oracle.com> Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
43 lines
1021 B
INI
43 lines
1021 B
INI
## @file
|
|
#
|
|
# This driver produces Extended SCSI Pass Thru Protocol instances for
|
|
# pvscsi devices.
|
|
#
|
|
# Copyright (C) 2020, Oracle and/or its affiliates.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 1.29
|
|
BASE_NAME = PvScsiDxe
|
|
FILE_GUID = 30346B14-1580-4781-879D-BA0C55AE9BB2
|
|
MODULE_TYPE = UEFI_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = PvScsiEntryPoint
|
|
|
|
[Sources]
|
|
PvScsi.c
|
|
PvScsi.h
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseMemoryLib
|
|
DebugLib
|
|
MemoryAllocationLib
|
|
UefiBootServicesTableLib
|
|
UefiDriverEntryPoint
|
|
UefiLib
|
|
|
|
[Protocols]
|
|
gEfiExtScsiPassThruProtocolGuid ## BY_START
|
|
gEfiPciIoProtocolGuid ## TO_START
|
|
|
|
[Pcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxLunLimit ## CONSUMES
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxTargetLimit ## CONSUMES
|