diff options
author | Gary Lin <glin@suse.com> | 2020-07-17 14:11:25 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-17 20:51:55 +0000 |
commit | 12d99b8f2367c2fd1ca9b3165acd52a0c9dcc99e (patch) | |
tree | 40118c3d10dbd265628aacff3bce23af1d3600bc /OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf | |
parent | 23d982e20528261b0bb3a704131d78d7e05bc59d (diff) | |
download | edk2-12d99b8f2367c2fd1ca9b3165acd52a0c9dcc99e.tar.gz edk2-12d99b8f2367c2fd1ca9b3165acd52a0c9dcc99e.tar.bz2 edk2-12d99b8f2367c2fd1ca9b3165acd52a0c9dcc99e.zip |
OvmfPkg/LsiScsiDxe: Report Targets and LUNs
Implement LsiScsiGetNextTargetLun(), LsiScsiBuildDevicePath(),
LsiScsiGetTargetLun(), and LsiScsiGetNextTarget() to report Targets and
LUNs and build the device path.
This commit also introduces two PCD value: PcdLsiScsiMaxTargetLimit and
PcdLsiScsiMaxLunLimit as the limits for Targets and LUNs.
v3:
- Update the range of LUN in the assertioin
- Squash the spurious newline into the previous commit
v2:
- Zero out (*Target) in LsiScsiGetTargetLun()
- Use CopyMem() instead of the one-byte shortcut to copy target from
ScsiDevicePath->Pun
- Add asserts for PcdLsiScsiMaxTargetLimit and PcdLsiScsiMaxLunLimit
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Gary Lin <glin@suse.com>
Message-Id: <20200717061130.8881-7-glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf')
-rw-r--r-- | OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf b/OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf index 14f9c68308..6111449577 100644 --- a/OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf +++ b/OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf @@ -27,7 +27,9 @@ [LibraryClasses]
BaseLib
BaseMemoryLib
+ DebugLib
MemoryAllocationLib
+ PcdLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiLib
@@ -35,3 +37,7 @@ [Protocols]
gEfiExtScsiPassThruProtocolGuid ## BY_START
gEfiPciIoProtocolGuid ## TO_START
+
+[FixedPcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdLsiScsiMaxTargetLimit ## CONSUMES
+ gUefiOvmfPkgTokenSpaceGuid.PcdLsiScsiMaxLunLimit ## CONSUMES
|