summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Application
Commit message (Collapse)AuthorAgeFilesLines
* EmbeddedPkg: Unload image on EFI_SECURITY_VIOLATIONDandan Bi2019-09-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | For the LoadImage() boot service, with EFI_SECURITY_VIOLATION retval, the Image was loaded and an ImageHandle was created with a valid EFI_LOADED_IMAGE_PROTOCOL, but the image can not be started right now. This follows UEFI Spec. But if the caller of LoadImage() doesn't have the option to defer the execution of an image, we can not treat EFI_SECURITY_VIOLATION like any other LoadImage() error, we should unload image for the EFI_SECURITY_VIOLATION to avoid resource leak. This patch is to do error handling for EFI_SECURITY_VIOLATION explicitly for the callers in EmbeddedPkg which don't have the policy to defer the execution of the image. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Philippe Mathieu-Daude <philmd@redhat.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1992 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmbeddedPkg: Fix various typosCœur2019-07-042-2/+2
| | | | | | | Fix various typos in EmbeddedPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-097-47/+7
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastbootApp: only use ENTER or SPACE to exitHaojian Zhuang2018-08-241-2/+12
| | | | | | | | | | | | | Since hotkey 'f' is used to start AndroidFastbootApp. If user press 'f' key too long, it may be recognized pressing 'f' key multiple times. Then AndroidFastbootApp exists since it delcares any key press could make it exit. So only use ENTER or SPACE key to exit AndroidFastbootApp. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg: get rid of BdsLib dependency from Android*BootLeif Lindholm2017-11-253-4/+2
| | | | | | | | | | | | | The sum use these applications made of BdsLib was one invocation of the IS_DEVICE_PATH_NODE macro, and (incorrectly) being able to leave out a dependency on gEfiLoadedImageProtocolGuid. So expand the macro in place and add the missing dependency. Then clean up the .dsc, .inf and #includes accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg/AndroidBoot: boot android kernel from storageJun Nie2017-08-202-0/+204
| | | | | | | | | | | | | | Add an android kernel loader that could load kernel from storage device. This android boot image BDS add addtitional cmdline/dtb/ramfs support besides kernel that is introduced by Android boot header. This patch is derived from Haojian's code as below link. https://patches.linaro.org/patch/94683/ Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastboot: split android boot headerJun Nie2017-08-073-31/+7
| | | | | | | | | Split android boot header definition to share code among different applications and libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastbootApp: remove dependency on deprecated BdsLibArd Biesheuvel2017-04-192-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | One of the last remaining modules with a dependency on the deprecated BdsLib implementation from ArmPkg is the Android fastboot application. Its only dependency on BdsLib is BdsStartEfiApplication(), which is used in the most peculiar way: the fastboot app loads the kernel image into memory, and creates a MemoryMapped() device path for it. It then proceeds and calls BdsStartEfiApplication(), which explicitly loads the contents of the devicepath into memory, creating a second in-memory copy of the kernel image, after which it invokes gBS->LoadImage() with a buffer address and size (while it is perfectly capable of loading from a devicepath directly) Since we know the device path is fully qualified and connected, and does not require any of the additional processing that BdsStartEfiApplication() does when dereferencing a device path, we should be able to pass this devicepath into LoadImage() directly. So create a simplified local clone of BdsStartEfiApplication(), and drop the dependency on BdsLib. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastboot: drop dependency on the LinuxLoaderArd Biesheuvel2016-11-251-48/+22
| | | | | | | | | | | When booting the kernel via Fastboot, invoke the kernel image directly rather than passing it to the LinuxLoader app. This requires the kernel image to be built with UEFI stub support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* EmbeddedPkg/AndroidFastboot: eliminate deprecated string function callsArd Biesheuvel2016-10-282-6/+8
| | | | | | | | | | | | | | | Get rid of calls to unsafe string functions. These are deprecated and may be removed in the future. Note that this also addresses a latent potential issue in HandleDownload(), where NumBytesString[] (which comes from the wire) is assumed to contain a string representation of a number with all the significant digits in the first 8 bytes, which is not guaranteed by the protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastboot: fix size with 64bitHaojian Zhuang2016-02-291-2/+2
| | | | | | | | | | Since there's percentage calcution, multiply on 32bit variable will cause overflow. So fix the variables as 64bit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/AndroidFastboot: drop bogus ArmGlobalVariable dependenciesArd Biesheuvel2015-11-272-5/+0
| | | | | | | | | | | | Remove the GUID references to gArmGlobalVariableGuid and includes of ArmGlobalVariableHob.h since they are not used by the fastboot app. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18996 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/AndroidFastboot: Use Linux Loader instead of BdsLibOlivier Martin2015-07-142-7/+44
| | | | | | | | | | | | | | Android FastBoot EFI application was using the Linux Loader from BdsLib. This change makes use of the EFI Linux Loader application. 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@17967 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variableRonald Cron2015-02-261-14/+1
| | | | | | | | | | | | | | | | Remove the option to update the "Fdt" UEFI variable in the ARM BDS as the "setfdt" EFI Shell command provides this service from now. Remove the use of this variable in the legacy kernel boot loader and use the FDT installed in the configuration table instead. 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@16940 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Fixed missing braces (the warning was disabled by GCC)Olivier Martin2014-06-201-2/+1
| | | | | | | | | 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@15578 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Fixed memory leak after calling GetEnvironmentVariable()Olivier Martin2014-04-021-0/+2
| | | | | | | | | 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@15428 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/AndroidFastboot: Introduce Android FastBoot ApplicationOlivier Martin2014-03-055-0/+841
This application enables Android FastBoot on UEFI. 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@15312 6f19259b-4bc3-4df7-8a09-765794883524