summaryrefslogtreecommitdiff
path: root/include/part_efi.h
Commit message (Collapse)AuthorAgeFilesLines
* disk: efi: ignore 'IGNOREME' GPT header found on cros eMMCsUrja Rannikko2019-08-231-0/+2
| | | | | | | | | | | | | Some ChromeOS devices (atleast veyron speedy) have the first 8MiB of the eMMC write protected and equipped with a dummy 'IGNOREME' GPT header - instead of spewing error messages about it, just silently try the backup GPT. Note: this does not touch the gpt cmd writing/verifying functions, those will still complain. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* Rename GPT_HEADER_SIGNATURE to avoid conflictSimon Glass2018-10-091-1/+1
| | | | | | | | The current name conflicts with the Chrome OS verified boot library, which prevents it being built. That library uses a string whereas U-Boot uses a 64-bit hex value. Rename this in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* disk: efi: Correct backing up the MBR boot codeSam Protsenko2018-06-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | In commit e163a931af34 ("cmd: gpt: backup boot code before writing MBR") there was added the procedure for storing old boot code when doing "gpt write". But instead of storing just backup code, the whole MBR was stored, and only specific fields were replaced further, keeping everything else intact. That's obviously not what we want. Fix the code to actually store only old boot code and zero out everything else. This fixes next testing case: => mmc write $loadaddr 0x0 0x7b => gpt write mmc 1 $partitions In case when $loadaddr address and further memory contains 0xff, the board was bricked (ROM-code probably didn't like partition entries that were clobbered with 0xff). With this patch applied, commands above don't brick the board. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Cc: Alejandro Hernandez <ajhernandez@ti.com> Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* part: efi: Add a Kconfig option for the number of partition entriesMaxime Ripard2017-12-071-1/+1
| | | | | | | | | | | | | On some SoCs, the SPL needs to be located right in the middle of the GPT partition entries. One way to work around that is to create partition entries for a smaller number of partitions to accomodate with where the SPL will be. Create a Kconfig option to allow to do that. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* part: move efi_guid_tRob Clark2017-09-201-4/+0
| | | | | | | | Prep work for next patch. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* fastboot: move FASTBOOT_FLASH options into KconfigPetr Kulhavy2016-10-011-1/+0
| | | | | | | | | | | | | Move FASTBOOT_MBR_NAME and FASTBOOT_GPT_NAME into Kconfig. Add dependency on the FASTBOOT_FLASH setting (also for FASTBOOT_MBR_NAME). Remove the now redundant GPT_ENTRY_NAME. Signed-off-by: Petr Kulhavy <brain@jikos.cz> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Add FIXME about xxx_PARTITION needing to be in Kconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
* part:efi: add GUID for linux file system dataPatrick Delaunay2015-11-121-0/+3
| | | | | | | | | | | Previously, Linux used the same GUID for the data partitions as Windows (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). This created problems when dual-booting Linux and Windows in UEFI-GPT Setup, so a new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4) was defined jointly by GPT fdisk and GNU Parted developers. Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
* efi: Add start-up library codeSimon Glass2015-08-051-7/+2
| | | | | | | | | | | When running as an EFI application, U-Boot must request memory from EFI, and provide access to the boot services U-Boot needs. Add library code to perform these tasks. This includes efi_main() which is the entry point from EFI. U-Boot is built as a shared library. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-141-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* disk/gpt: Fix GPT partition handling for blocksize != 512Egbert Eich2013-05-011-2/+0
| | | | | | | | Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of code in u-boot still assumes a 512 byte blocksize. This patch fixes the handling of GPTs. Signed-off-by: Egbert Eich <eich@suse.com>
* gpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>Chang Hyun Park2012-12-131-43/+46
| | | | | | | | | | | | Custom definitions of le_XX_to_int functions have been replaced with standard ones, defined at <compiler.h> Replacement of several GPT related structures members with ones indicating its endianness and proper size. Signed-off-by: Chang Hyun Park <heartinpiece@outlook.com> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* part:efi: Move part_efi.h file to ./includeLukasz Majewski2012-12-131-0/+144
This move is necessary to export gpt header and GPT partition entries to be used with other commands or subsystems. Additionally the part_efi.h file has been cleaned-up to supress checkpatch's warnings. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>