Re: [PATCH v2] efi: take size of partition entry from GPT header

From: Davidlohr Bueso
Date: Tue Sep 11 2018 - 12:27:55 EST


On Tue, 11 Sep 2018, Eugene Korenevsky wrote:

Use gpt_header.sizeof_partition_entry instead of sizeof(gpt_entry)
for GPT entry size.
According to UEFI 2.7 spec 5.3.1 "GPT overview":, the size of a GUID Partition
Entry element is defined in the Size Of Partition Entry field of GPT header.
The GPT with entries sized more than sizeof(gpt_entry) is not illegal.
OVMF firmware from EDK2 perfectly works with it, see edk2-tianocore source
code.

But _why_ is this needed? Does this firmware need larger sized entries (ie: does
not work without it)?

Thanks,
Davidlohr