summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/BdsLib/BdsFilePath.c
Commit message (Collapse)AuthorAgeFilesLines
* ArmPkg/BdsLib: eliminate calls to deprecated string functionsArd Biesheuvel2016-10-281-3/+5
| | | | | | | | | | | Remove calls to deprecated string functions like AsciiStrCpy() and UnicodeStrToAsciiStr() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg/BdsLib: Send RemainingDevicePath to PXE Load File protocolHeyi Guo2015-12-071-2/+2
| | | | | | | | | | | | Load File protocol requires remaining device path rather than whole device path. For PXE, it actually requires end node device path only, or else invalid parameter will be returned directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19148 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Increase fallback tftp buffer sizeAshutosh Singh2015-11-091-2/+2
| | | | | | | | | | | | | When performing a tftp download from a server which does not support rfc2349 transfer size option (such as netkit-tftpd), the existing code falls back to allocating an 8MB buffer. Since this is insufficient for an uncompressed AArch64 Linux kernel image, double the size to 16MB. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ashutosh Singh <ashutosh.singh@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18748 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fixed TFTP when there are directories in the nameOlivier Martin2015-05-291-13/+7
| | | | | | | | | | | | | | | The TFTP Device Path might contain a list of File Path device path nodes. ConvertDevicePathToText() allows to concatenate these File Path nodes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17539 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fixed line endingOlivier Martin2015-05-131-1/+1
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17438 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: fix pointer indirection bug in BdsFirmwareVolumeLoadImage()Ard Biesheuvel2015-05-071-1/+1
| | | | | | | | | | | | | | The EFI_FIRMWARE_VOLUME2_PROTOCOL::EFI_FV_READ_SECTION prototype takes a pointer to a pointer to an output buffer, so we should not dereference Image (which is a pointer to pointer type itself) but pass its value directly. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17357 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Added support to change the given DevicePath of a Boot EntryOlivier Martin2015-02-251-24/+24
| | | | | | | | | | | | | | Some boot entries might not have a EFI Device Path FilePath attached to it (eg: EFI device Path for removable device path). This patch allows a support loader to edit the EFI Device Path and for instance add \EFI\BOOT\BOOT(ARM|AA64).EFI Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16930 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Close file after reading an ImageRonald Cron2015-01-061-16/+32
| | | | | | | | | | | | | | When loading an image from a file, close the file after reading from it. Use OpenProtocol instead of HandleProtocol to retrieve the simple file system protocol interface. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16586 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fix DHCP4 configurationRonald Cron2015-01-061-17/+39
| | | | | | | | | | | | | | Fix DHCP4 configuration as part of TFTP boot process to get the IP address of the gateway and the subnet mask from the DHCP server. Fix a memory leak when the download from the TFTP server fails as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16582 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Rework TFTP bootRonald Cron2014-12-121-131/+474
| | | | | | | | | | | | | Rework the downloading of an image from a TFTP server to do not depend on any "PXE specific" setting of the DHCP server. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16516 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Prevent a hang in BdsConnectDevicePath() when a sub-device ↵Olivier Martin2014-08-191-8/+21
| | | | | | | | | | | | | | | | | | | | | path is not found Some device paths were making BdsConnectDevicePath() hang. To prevent these hangs we check if the handle returned by gBS->LocateDevicePath() is the same after each iteration. An example of a device path that hangs: PciRoot(0x0)/Pci(0x1,0x0)/USB(0x0,0x0)/USB(0x3,0x0)/HD(...) The connect controller function manages to find PciRoot()/Pci(0x1,0x0) but the USB driver does not produce USB(0x0,0x0)/USB(0x3,0x0) and returns EFI_SUCCESS on its initialization. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15835 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Removed trailing spacesRonald Cron2014-08-191-7/+7
| | | | | | | | | | | | Trailing spaces create issue/warning when generating/applying patches. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15833 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Corrected non-DOS line endingsRonald Cron2014-08-191-49/+49
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15832 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Prevent memory leak whith TFTPOlivier Martin2014-07-011-1/+3
| | | | | | | | | | | | | | In some case, the size of the downloaded TFTP image cannot be known. An arbitrary larger buffer is allocated to receive the image. We need to make sure when we free the buffer we free the size of the allocated buffer and not the size of the actual image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15609 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Added support for TFTP servers without 'tsize' extensionOlivier Martin2014-05-191-28/+70
| | | | | | | | | | | | | Some TFTP servers do not have 'tsize' extension. This change allows to download files from TFTP servers that do not have this extension by trying to download the file into a pre-allocated buffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15539 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fix allocating kernel buffer in TFTPBrendan Jackman2014-05-141-8/+11
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brendan Jackman <Brendan.JackMan@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15527 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fix booting with partial pathsMark Salter2014-05-081-27/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Boot entries created by efibootmgr may contain a partial device path to the EFI application to boot. These entries begin with a partition device path whereas entries created via ARM Boot Manager contain a full path to the EFI application. The ARM BDS code will fill in the missing parts of this partial device path as it does for removeable device paths. This allows the application to be loaded and started. However, the current code passes the original partial device path to gBS->LoadImage() and thus LoadImage is unable to find a DeviceHandle for the path. This means the application being booted cannot find the boot device from the Loaded Image Protocol structure. In the case of grub, this prevents the grub config file from being found. This patch fixes this by making sure the full path is propagated back to the caller of gBS->LoadImage() so that a proper DeviceHandle gets passed to the application being booted. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15518 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fixed TFTP and PXE Bootoliviermartin2013-03-121-13/+60
| | | | | | | | | | | | | - An Ascii filename must be passed to the TFTP service (was a Unicode filename) - If the PXE service had already configured the connection we need to restart when we want to download a new file or do a do a PXE Boot. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14195 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Fixed coding style and typosoliviermartin2013-03-121-63/+63
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14179 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Fixed line endingsoliviermartin2013-01-251-906/+906
| | | | | | | | | This large code change only modifies the line endings to be CRLF to be compliant with the EDK2 coding convention document. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14088 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Added FDT support for BdsLiboliviermartin2012-09-281-1/+1
| | | | | | | | Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13768 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fixed incorrect typecastingoliviermartin2012-02-091-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12995 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fix MemMap Device Path node supportoliviermartin2011-09-091-4/+8
| | | | | | | | | | The previous version was only checking if the Remaining Device Path node was a MemMap DevicePath node. This fix also checks if the Root DevicePath node is a MemMap DevicePath node. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12315 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Add support to pass argument to a loaded EFI applicationoliviermartin2011-09-091-2/+17
| | | | | | | | | OptionalData argument has to be set in the Loaded Image Protocol of the new EFI application. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12313 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Fixed parameters passed to AllocatePages()oliviermartin2011-08-191-2/+2
| | | | | | | | Typo issue ... git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12176 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Allocate memory with AnyPage type if it failed with the one ↵oliviermartin2011-08-181-4/+20
| | | | | | initially requested git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12170 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/Bds: Fix various bugs in the new BDSoliviermartin2011-06-151-1/+27
| | | | | | | | | | | | | The errors were: - uncaught returned error - used of uninitialized variables ArmPlatformPkg/Bds: Implement the update of MemMap Boot Device git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11830 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: Fix warnings raised by ARMGCColiviermartin2011-06-151-2/+5
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11829 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Upgrade the library to use natively the Device Patholiviermartin2011-06-111-126/+786
| | | | | | | | | | | | | | The previous version was using the string representation of the Device Path. This new version takes as paramater the binary representation of the Device Path It also tries to detect which kind of device support it refers by using the remaining part of the Device Path after it has been loaded by gBS->ConnectController() Lots of bug have been fixed as well in this new version. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11799 6f19259b-4bc3-4df7-8a09-765794883524
* Sync up ArmPkg with patch from mailing list. Changed name of BdsLib.h to ↵andrewfish2011-02-021-0/+182
BdsUnixLib.h and fixed a lot of issues with Xcode building. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11293 6f19259b-4bc3-4df7-8a09-765794883524