[U-Boot] [PATCH v1 0/2] disk: efi: allow gap before partition entries
Dr. Philipp Tomsich
philipp.tomsich at theobroma-systems.com
Wed Feb 22 10:08:58 UTC 2017
> On 22 Feb 2017, at 07:11, Rask Ingemann Lambertsen <rask at formelder.dk> wrote:
>
> On Fri, Feb 17, 2017 at 06:31:29PM +0100, Philipp Tomsich wrote:
>> Motivated by the the SPL layout for SD/MMC devices on Allwinner SoCs
>> (the SPL code needs to reside an 8K offset into the device), we add
>> support for leaving a gap between the MBR (LBA#0), GPT header (LBA#1)
>> and GPT partition entries (linked from field in the GPT header).
>>
>> Note that this affects the creation of partition from U-Boot only and
>> has no effect on reading existing partition tables.
>>
>> If defined, EFI_PARTITION_ENTRIES_OFF specifies a byte-offset into
>> a device and the parititon entries will be located starting at the
>> next LBA folling this offset.
>
> In principle, this isn't really EFI specific, because all partition table
> formats will need to avoid the SPL area, so the configuration string
> shouldn't include the word EFI. EFI just happens to be the only(?) partition
> table format which is bloated enough to not easily fit into the space before
> the SPL area.
>
> Also, it seems to me that there should also be a way of specifying how much
> room is available before the SPL area. So you could have
> CONFIG_SPL_AREA_START and CONFIG_SPL_AREA_SIZE, which added together gives
> the same value as your EFI_PARTITION_ENTRIES_OFF.
I would rather keep it simple for now, as it’s not just the SPL that we worry
about. In our default configuration, we punch a hole (of blocks not covered
by the partition tables, as they reside between the GPT header and the
partition entries) of at least 1MB (in some applications more) into the device
and then keep all of the following there:
1/ SPL
2/ FIT boot payload
3/ U-Boot environment
Regards,
Philipp.
More information about the U-Boot
mailing list