summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Disk/PartitionDxe
AgeCommit message (Collapse)AuthorFilesLines
2018-10-23MdeModulePkg/PartitionDxe: Add check for underlying device block sizeHao Wu1-0/+29
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 Within FindAnchorVolumeDescriptorPointer(): Add a check for the underlying device block size to ensure it is greater than the size of an Anchor Volume Descriptor Pointer. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <palcantara@suse.de> Acked-by: Star Zeng <star.zeng@intel.com>
2018-09-06MdeModulePkg: Removing ipf which is no longer supported from edk2.Chen A Chen1-1/+1
Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-06-28MdeModulePkg: Clean up source filesLiming Gao7-57/+57
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-03-29MdeModulePkg/PartitionDxe: Add partition type guid to installed handleJeff Brasen6-18/+38
Add the partition type GUID for every partition to the installed handle, this is required per the UEFI specification. "The firmware must add the PartitionTypeGuid to the handle of every active GPT partition using EFI_BOOT_SERVICES.InstallProtocolInterface()." Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jeff Brasen <jbrasen.qdt@qualcommdatacenter.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2018-01-26MdeModulePkg/Partition: Fix media probeRuiyu Ni1-3/+7
The call in ProbeMediaStatusEx() to the ReadDisk() function of the EFI_DISK_IO_PROTOCOL interface implemented in DiskIoDxe/DiskIo.c crashed in DiskIo2ReadWriteDisk() because of the NULL value of the destination buffer pointer. Pass the address of a buffer in the stack instead of a NULL pointer. The similar fix was applied to ProbeMediaStatus in commit df473cc1fc9acd1a623ec7e05276f2f0635c19d2 * MdeModulePkg/PartitionDxe: Fix media probe Somehow ProbeMediaStatusEx() wasn't changed together. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Tested-by: Jian J Wang <jian.j.wang@intel.com>
2017-12-06MdeModulePkg/PartitionDxe: Remove unnecessary parentheses in 'if'Hao Wu1-1/+1
This commit removes unnecessary parentheses in 'if' statements to resolve the build failures by the XCODE5 tool chain. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-11-20MdeModulePkg/PartitionDxe: Merge the discovery of ElTorito into UDFHao Wu2-6/+28
In order to create all of the children (El Torito standard and UDF) for a CD/DVD media in an entry of the PartitionDriverBindingStart(), this commit merges the discovery of the El Torito feature (PartitionInstallElToritoChildHandles) into function PartitionInstallUdfChildHandles. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
2017-11-15MdeModulePkg/PartitionDxe: Fix UDF fs access on certain CD/DVD mediasPaulo Alcantara1-53/+201
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=725 Historically many drives or medias do not correctly return their value for block N - which is also referred as last addressable/recorded block. When they do so, there is still a problem when relying on last recorded block number returned by SCSI commands READ CAPACITY and READ TRACK INFORMATION - that is, between block 0 and block N there may be unwritten blocks which are located outside any track. That said, the Partition driver was unable to find AVDP at block N on certain medias that do not either return or report their last recorded block number correctly. Apparently there is no official or correct way to find the correct block number, however tools like the Philips UDF Conformance Tool (udf_test) apply a correction by searching for an AVDP or VAT in blocks N through N-456 -- this can be observed by looking at the log reported by udf_test on those CD/DVD medias. So, if the AVDP or VAT is found, then it sets the last recorded block number to where AVDP or VAT was located. With the below setence in UDF 2.60, 6.13.2.2 Background Physical Formatting: "... the second AVDP must be recorded after the Background physical Formatting has been finished..." Implies that the last recorded block is the one where second AVDP was recorded. This patch implements a similar way to correct the last recorded block number by searching for last AVDP in blocks N-1 through N-512 on those certain medias, as well as ensure a minimum number of 2 AVDPs found as specified by ECMA 167 and UDF 2.60 specifications. Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reported-by: Hao Wu <hao.a.wu@intel.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-09-25MdeModulePkg/UDF: Fix creation of UDF logical partitionPaulo Alcantara1-60/+306
Do not reserve entire block device size for an UDF file system - instead, reserve the appropriate space (UDF logical volume space) for it. Additionally, only create a logical partition for UDF logical volumes that are currently supported by EDK2 UDF file system implementation. For instance, an UDF volume with a single LVD and a single Physical (Type 1) Partition will be supported. Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Reported-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Tested-by: Hao Wu <hao.a.wu@intel.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Build-tested-by: Star Zeng <star.zeng@intel.com> Build-tested-by: Paulo Alcantara <paulo@hp.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-09-19MdeModulePkg/Udf: Avoid declaring and initializing local GUID variableHao Wu1-2/+6
The local GUID variable 'UdfDevPathGuid', it has been initialized during its declaration. For better coding style, this commit uses a global variable instead. Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-19MdeModulePkg/Udf: Refine function description commentsHao Wu1-0/+12
Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-12MdeModulePkg/PartitionDxe: remove always false comparisonLaszlo Ersek1-2/+1
In the expression (RemainderByMediaBlockSize != 0 || Media->BlockSize > UDF_LOGICAL_SECTOR_SIZE) the second expression is only evaluated if the first expression is false. If the first expression is false, i.e., RemainderByMediaBlockSize == 0 then UDF_LOGICAL_SECTOR_SIZE is a whole multiple of "Media->BlockSize", which implies UDF_LOGICAL_SECTOR_SIZE >= Media->BlockSize. Therefore whenever Media->BlockSize > UDF_LOGICAL_SECTOR_SIZE is evaluated, it is false. The expression ((expression) || FALSE) is equivalent to (expression). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.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> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-09-12MdeModulePkg/PartitionDxe: don't divide 64-bit values with C operatorsLaszlo Ersek1-1/+7
In edk2, the division and shifting of 64-bit values are forbidden with C-language operators, because the compiler may generate intrinsic calls for them. For example, clang-3.8 emits a call to "__umoddi3" for UDF_LOGICAL_SECTOR_SIZE % Media->BlockSize in PartitionInstallUdfChildHandles(), if PartitionDxe is built for IA32, which then fails to link. UDF_LOGICAL_SECTOR_SIZE has type UINT64, while EFI_BLOCK_IO_MEDIA.BlockSize has type UINT32(). Replace the % operator with a DivU64x32Remainder() call. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.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: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-09-12MdeModulePkg/PartitionDxe: Initialize the array after declarationDandan Bi1-3/+10
Initialize the array DescriptorLBAs[] after declaration to fix non-constant aggregate initializer warning in VS tool chains. Cc: Eric Dong <eric.dong@intel.com> Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-08MdeModulePkg/PartitionDxe: Add UDF file system supportPaulo Alcantara4-7/+355
Scan for UDF file systems on all block devices, as specified by OSTA Universal Disk Format Specification 2.60, and install a Vendor-Defined Media Device Path for each file system found. The Vendor-Defined Media Device Path for the UDF file system is then checked by UdfDxe to decide whether or not start the driver. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-07-11MdeModulePkg/PartitionDxe: Add impl of Partition Information ProtocolHao Wu6-88/+135
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-03-29MdeModulePkg PartitionDxe: Add Re-entry handling logic for BindingStopHao Wu2-21/+110
There are scenario when the BindingStop service of PartitionDxe driver be re-entered. An example will be ejecting a DVD from a SATA DVDROM and then run "reconnect -r" under shell. In this specific case, part of the calling stack will be: PartitionDriverBindingStop() (PartitionDxe) -> Stop first child handle (PartitionDxe) -> ScsiDiskFlushBlocksEx() (ScsiDiskDxe) -> A media change is detected (ScsiDiskDxe) -> Reinstall of BlockIO(2) protocols (ScsiDiskDxe) -> Entering PartitionDriverBindingStop() again (PartitionDxe) -> Potential risk of referencing already stopped child handle (PartitionDxe) ... The current code has potential issue of referencing of already stopped child handle. This commit adds re-entry handling logic to resolve such issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-03-29MdeModulePkg PartitionDxe: Some ISO images cannot be recognized properlyHao Wu1-7/+7
Some ISO images cannot be recognized properly when they are on media whose block size is not 2048 bytes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-23MdeModulePkg/Partition: Fix 64bit build failure caused by last patchNi, Ruiyu1-1/+1
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-19MdeModulePkg/Partition: Use proper partition number for MBRRuiyu Ni1-6/+4
UEFI Spec 2.3.1.D Section 9.3.5.1 says Partitions are numbered according to their entry in their respective partition table, starting with 1. Update the code for MBR partition to follow this rule. Ref: https://github.com/tianocore/edk2/issues/50 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2015-12-15MdeModulePkg: Convert all .uni files to utf-8Jordan Justen2-0/+0
To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07MdeModulePkg/PartitionDxe: Fix media probeRonald Cron1-2/+6
The call in ProbeMediaStatus() to the ReadDisk() function of the EFI_DISK_IO_PROTOCOL interface implemented in DiskIoDxe/DiskIo.c crashed in DiskIo2ReadWriteDisk() because of the NULL value of the destination buffer pointer. Pass the address of a buffer in the stack instead of a NULL pointer. In addition to avoiding the crash, that way, the media probe does not depend anymore on the way the EFI_DISK_IO_PROTOCOL implementation deals with a NULL value of the destination buffer pointer as the UEFI specification does not specify the expected behaviour. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17859 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13Fix IA32 build failure: Use MultU64x32 for 64bit * 32bit.Ruiyu Ni1-2/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16604 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-12MdeModulePkg/PartitionDxe: Fixed El Torito support when the medium is not a ↵Olivier Martin1-33/+25
CDROM El Torito format can be used on different media (eg: USB). A ISO image can be dumped onto a USB mass-storage. These media might not have the same block size as the CDROM media (ie: 2KB). The El Torito code and the specification assumes a LBA 2KB. In addition, the specification says in "12.3.4.4 CD-ROM and DVD-ROM": UEFI code does not assume a fixed block size. I was able to dupliacte the issue by copying a debian ISO on a USB driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16600 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-27MdeModulePkg: Misc comments and DEBUG messagesSamer El-Haj-Mahmoud1-0/+4
Fixed some spelling typos in some comments. Added a couple of useful DEBUG messages Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16450 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03MdeModulePkg: Convert non DOS format files to DOS format and remove unused ↵Gao, Liming1-0/+0
module UNI files. 1. Module UNI and Package UNI files are not DOS format. Convert them to DOS format. 2. Remove unused SectionExtractionDxeModStrs.uni and SectionExtractionPeiModStrs.uni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16044 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28MdeModulePkg: INF/DEC file updates to EDK II packagesZeng, Star2-0/+0
2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module. a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion. c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion. 3. Add Module Extra UNI file that provides the localized Name of a module. a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file. b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation. c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zeng, Star <star.zeng@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15963 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28MdeModulePkg: INF/DEC file updates to EDK II packagesZeng, Star1-11/+18
1. Usage information in INF file comment blocks are either incomplete or incorrect. This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes. The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zeng, Star <star.zeng@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15962 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19MdeModulePkg/PartitionDxe: Simplify the error handling of ↵Sergey Isakov1-5/+2
DriverBindingSupported(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sergey Isakov <isakov-sl@bk.ru> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15828 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-17Fix 3 bugs in DiskIoDxe and PartitionDxe drivers introduced in DiskIo2 ↵Ruiyu Ni1-3/+3
implementation. 1. DiskIo2 shouldn't signal the event when the *Ex interface returns failure status per the UEFI spec. 2. PartitionDxe should close DiskIo2 protocol when error happens in DriverBindingStart() otherwise Fat driver cannot open the DiskIo2 BY_DRIVER. 3. PartitionDxe should create event using TPL_NOTIFY instead of TPL_CALLBACK otherwise asynchronous FileIo may be blocked. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14680 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-20Add DiskIo2 protocol definition to MdePkg.Ruiyu Ni6-86/+178
Change DiskIoDxe to produce DiskIo2 protocol when the BlockIo2 protocol is available. Change PartitionDxe to produce BlockIo2 protocol based on DiskIo2 protocol instead of BlockIo2 protocol. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Kinney Michael <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14570 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-31MdeModulePkg PartitionDxe: Ensure the NumberOfPartitionEntries * ↵Star Zeng1-3/+12
SizeOfPartitionEntry doesn't overflow. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14520 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-12Add comment for modules which have external input.jyao12-8/+43
signed-off-by: jiewen.yao@intel.com reviewed-by: guo.dong@intel.com reviewed-by: ting.ye@intel.com reviewed-by: liming.gao@intel.com reviewed-by: elvin.li@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13446 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-09Use PartitionHeader->SizeOfPartitionEntry instead of sizeof ↵niruiyu1-32/+32
(EFI_PARTITION_ENTRY). Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13296 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-011. Remove the unnecessary check of the existing of BlockIo2 in ↵qianouyang1-29/+4
PartitionDriverBindingSupported(). 2. Remove the comments of the BlockIo2 check in PartitionDriverBindingStart(). Signed-off-by: qianouyang Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12806 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-12Grub4Dos copies the BPB of the first partition to the MBR. If the ↵niruiyu1-1/+9
DriverBindingStart() of the Fat driver gets run before that of Partition driver only the first partition can be recognized. Let the driver binding version of Partition driver be higher than that of Fat driver to make sure the DriverBindingStart() of the Partition driver gets run before that of Fat driver so that all the partitions can be recognized. Signed-off-by: niruiyu Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12528 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-19The patch enhances the Partition driver to return the media status ↵niruiyu1-12/+53
(EFI_NO_MEDIA/EFI_MEDIA_CHANGED) even the other parameters are not valid for BlockIo2 interfaces. Signed-off-by: niruiyu Reviewed-by: erictian Reviewed-by: qianouyang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12378 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is ↵niruiyu1-2/+2
valid/invalid. Signed-off-by: niruiyu Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11987 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-27MdeModulePkg: Fixed memory corruption when BlockIo2 is not presentgeekboy15a1-6/+6
Fixed NULL pointer reference of BlockIo2.Media in partition code. This resulted in the interrupt vector table being corrupted in a legacy (CSM) based system. Signed-off-by: geekboy15a Reviewed-by: mdkinney Reviewed-by: niruiyu Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11711 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-23Change Partition/ScsiDxe driver to produce Block IO revision 3.niruiyu1-3/+9
Signed-off-by: niruiyu Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11692 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-19Update the function's descriptions (which is in AtaBus, AtaAtapiPassThru, ↵qianouyang2-2/+1
Partition drivers) to make them be consistent with the code. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11678 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-06Add Pointer check for NULL before referring it and remove unnecessary ↵qianouyang1-48/+29
pointer check in AtaAtapiPassThru and Partition Drivers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11627 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-03Add BlockIO2 Protocol.qianouyang6-217/+646
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11606 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-25Change BlockIo drivers to return EFI_NO_MEDIA or EFI_MEDIA_CHANGED even the ↵niruiyu1-4/+35
Buffer/BufferSize/Lba is invalid so that caller can probe the media status easier. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11584 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-01Set the BlockIo.Media.IoAlign to 0 because the BlockIo produced by Partition ↵niruiyu1-2/+7
driver consumes DiskIo for read/write operation which doesn't have IO alignment requirement. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11493 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-20Per UEFI Spec, LowestAlignedLba and LogicalBlocksPerPhysicalBlock must be 0 ↵niruiyu1-1/+10
for logical partitions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10668 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-05raise TPL to TPL_CALLBACK level at DriverBindingStart() for all usb-related ↵erictian1-4/+9
modules, which prevent DriverBindingStop() from being invoked when DriverBindingStart() runs. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10460 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24Update the copyright notice formathhtian7-14/+14
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10418 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-241. Correct File header to ## @filelgao41-4/+4
2. Remove unnecessary .common] postfix on section. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-21Update partition driver to not produce BlockIo if a GPT with OS-specific ↵qhuang82-3/+15
field (BIT1) set in its partition attributes. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9293 6f19259b-4bc3-4df7-8a09-765794883524