u-boot/disk
Philipp Tomsich 02e43537b3 part_efi: support padding between the GPT header and partition entries
Some architectures require their SPL loader at a fixed address within
the first 16KB of the disk. To avoid an overlap with the partition
entries of the EFI partition table, the first safe offset (in bytes,
from the start of the device) for the entries can be set through
CONFIG_EFI_PARTITION_ENTRIES_OFF (via Kconfig)

When formatting a device with an EFI partition table, we may need to
leave a gap between the GPT header (always in LBA 1) and the partition
entries. The GPT header already contains a field to specify the
on-disk location, which has so far always been set to LBA 2. With this
change, a configurable offset will be translated into a LBA address
indicating where to put the entries.

Now also allows an override via device-tree using a config-node (see
doc/device-tree-bindings/config.txt for documentation).

Tested (exporting an internal MMC formatted with this) against Linux,
MacOS X and Windows.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: __maybe_unused on config_offset to avoid warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-20 18:04:18 -04:00
..
Kconfig part_efi: support padding between the GPT header and partition entries 2017-03-20 18:04:18 -04:00
Makefile disk: convert CONFIG_EFI_PARTITION to Kconfig 2017-01-28 08:47:42 -05:00
part.c cmd, disk: convert CONFIG_PARTITION_UUIDS, CMD_PART and CMD_GPT 2017-01-28 08:48:03 -05:00
part_amiga.c disk: part: implement generic function part_get_info_by_name() 2016-10-01 20:04:45 -04:00
part_amiga.h disk: convert CONFIG_ISO_PARTITION to Kconfig 2017-01-28 08:47:35 -05:00
part_dos.c SPL: add support to boot from a partition type 2017-02-17 14:15:14 -05:00
part_dos.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part_efi.c part_efi: support padding between the GPT header and partition entries 2017-03-20 18:04:18 -04:00
part_iso.c disk: part: refactor generic name creation for DOS and ISO 2016-10-01 20:04:56 -04:00
part_iso.h iso: Make little endian and 64bit safe 2016-04-18 17:11:33 -04:00
part_mac.c disk: part: implement generic function part_get_info_by_name() 2016-10-01 20:04:45 -04:00
part_mac.h disk: convert CONFIG_ISO_PARTITION to Kconfig 2017-01-28 08:47:35 -05:00