u-boot-brain/disk
Patrick Delaunay ae0e0228e6 disk: efi: correct the overlap check on GPT header and PTE
the partition starting at 0x4400 is refused with overlap error:
  $> gpt write mmc 0 "name=test,start=0x4400,size=0"
  Writing GPT: Partition overlap
  error!

even if the 0x4400 is the first available offset for LBA35 with default
value:
- MBR=LBA1
- GPT header=LBA2
- PTE= 32 LBAs (128 entry), 3 to 34

And the command to have one partition for all the disk failed also :
  $> gpt write mmc 0 "name=test,size=0"

After the patch :

  $> gpt write mmc 0 "name=test,size=0"
  Writing GPT: success!
  $> part list mmc 0

  Partition Map for MMC device 0  --   Partition Type: EFI

  Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000022	0x01ce9fde	"test"
	attrs:	0x0000000000000000
	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
	type:	data
	guid:	b4b84b8a-04e3-4000-0036-aff5c9c495b1

And 0x22 = 34 LBA => offset = 0x4400 is accepted as expected

Reviewed-by: Łukasz Majewski <lukma@denx.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-10-23 17:27:48 -04:00
..
Kconfig SPARC: Remove 2017-04-05 13:52:20 -04:00
Makefile disk: convert CONFIG_EFI_PARTITION to Kconfig 2017-01-28 08:47:42 -05:00
part_amiga.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
part_amiga.h disk: convert CONFIG_ISO_PARTITION to Kconfig 2017-01-28 08:47:35 -05:00
part_dos.c disk: part_dos: Use the original allocation scheme for the SPL case 2017-10-05 10:45:33 -04:00
part_dos.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part_efi.c disk: efi: correct the overlap check on GPT header and PTE 2017-10-23 17:27:48 -04:00
part_iso.c iso: Reduce verbosity on test and info calls 2017-10-16 09:42:51 -04:00
part_iso.h iso: Make little endian and 64bit safe 2016-04-18 17:11:33 -04:00
part_mac.c part: mac: Suppress the error message after reading ddb 2017-09-07 10:44:33 -04:00
part_mac.h disk: convert CONFIG_ISO_PARTITION to Kconfig 2017-01-28 08:47:35 -05:00
part.c disk: Provide API to get partition by name for specific type 2017-10-06 11:28:17 -04:00