mirror of https://github.com/acidanthera/audk.git
897efb977f
The SPC-4 spec says about the INQUIRY data, in "Table 138 -- Peripheral qualifier": > Qualifier = 011b The device server is not capable of supporting a > peripheral device on this logical unit. For this > peripheral qualifier the peripheral device type shall > be set to 1Fh. All other peripheral device type values > are reserved for this peripheral qualifier. Accordingly, the DiscoverScsiDevice() function returns FALSE if Peripheral_Qualifier is 3 decimal, but Peripheral_Type differs from 1Fh. This is a valid sanity check -- such combinations are reserved. When Peripheral_Qualifier is 3, and Peripheral_Type is 1Fh, then DiscoverScsiDevice() returns TRUE. While this combination is not reserved, returning TRUE for it is incorrect: Peripheral_Type 1Fh stands for "Unknown or no device type", and this combination is returned in particular when the INQUIRY command was directed to a nonexistent LUN. Quoting the spec: > In response to an INQUIRY command received by an incorrect logical unit, > the SCSI target device shall return the INQUIRY data with the peripheral > qualifier set to the value defined in 6.4.2. [...] > > [...] > > The PERIPHERAL QUALIFIER field and PERIPHERAL DEVICE TYPE field identify > the peripheral device connected to the logical unit. If the SCSI target > device is not capable of supporting a peripheral device connected to > this logical unit, the device server shall set these fields to 7Fh > (i.e., PERIPHERAL QUALIFIER field set to 011b and PERIPHERAL DEVICE TYPE > field set to 1Fh). The consequence of this bug is that for each nonexistent Target/LUN pair, we produce a useless ScsiIo protocol interface. The internal "ScsiIoDevice->ScsiDeviceType" field will be set to 0x1f, and it will be returned to higher-level SCSI drivers when they call ScsiIo->GetDeviceType(). Given that 0x1f means "Unknown or no device type", no higher-level driver can ever support it, so these ScsiIo protocol interfaces are useless. The fix is to return FALSE for the (Peripheral_Qualifier=3, Peripheral_Type=0x1f) combination. With that however we reject the whole Peripheral_Qualifier=3 space (justifiedly -- see the definition above), which lets us simplify the code. Cc: Eric Dong <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> |
||
---|---|---|
AppPkg | ||
ArmPkg | ||
ArmPlatformPkg | ||
ArmVirtPkg | ||
BaseTools | ||
BeagleBoardPkg | ||
Conf | ||
CorebootModulePkg | ||
CorebootPayloadPkg | ||
CryptoPkg | ||
DuetPkg | ||
EdkCompatibilityPkg | ||
EdkShellBinPkg | ||
EdkShellPkg | ||
EmbeddedPkg | ||
EmulatorPkg | ||
FatBinPkg | ||
FatPkg | ||
IntelFrameworkModulePkg | ||
IntelFrameworkPkg | ||
IntelFsp2Pkg | ||
IntelFsp2WrapperPkg | ||
IntelFspPkg | ||
IntelFspWrapperPkg | ||
IntelSiliconPkg | ||
MdeModulePkg | ||
MdePkg | ||
NetworkPkg | ||
Nt32Pkg | ||
Omap35xxPkg | ||
OptionRomPkg | ||
OvmfPkg | ||
PcAtChipsetPkg | ||
PerformancePkg | ||
QuarkPlatformPkg | ||
QuarkSocPkg | ||
SecurityPkg | ||
ShellBinPkg | ||
ShellPkg | ||
SignedCapsulePkg | ||
SourceLevelDebugPkg | ||
StdLib | ||
StdLibPrivateInternalFiles | ||
UefiCpuPkg | ||
UnixPkg | ||
Vlv2DeviceRefCodePkg | ||
Vlv2TbltDevicePkg | ||
.gitignore | ||
BuildNotes2.txt | ||
Contributions.txt | ||
Edk2Setup.bat | ||
License.txt | ||
Maintainers.txt | ||
Readme.md | ||
edksetup.bat | ||
edksetup.sh |
Readme.md
EDK II Project
A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.
Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1
The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:
- AppPkg/Applications/Python/Python-2.7.2/Tools/pybench
- AppPkg/Applications/Python/Python-2.7.2
- AppPkg/Applications/Python/Python-2.7.10
- BaseTools/Source/C/BrotliCompress
- MdeModulePkg/Library/BrotliCustomDecompressLib
- OvmfPkg
- CryptoPkg/Library/OpensslLib/openssl
The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.