u-boot-brain/lib/efi_loader
Rob Clark 884bcf6f65 efi_loader: use proper device-paths for partitions
Also, create disk objects for the disk itself, in addition to the
partitions.  (UEFI terminology is a bit confusing, a "disk" object is
really a partition.)  This helps grub properly identify the boot device
since it is trying to match up partition "disk" object with it's parent
device.

Now instead of seeing devices like:

  /File(sdhci@07864000.blk)/EndEntire
  /File(usb_mass_storage.lun0)/EndEntire

You see:

  /ACPI(133741d0,0)/UnknownMessaging(1d)/EndEntire
  /ACPI(133741d0,0)/UnknownMessaging(1d)/HD(0,800,64000,dd904a8c00000000,1,1)/EndEntire
  /ACPI(133741d0,0)/UnknownMessaging(1d)/HD(1,64800,200000,dd904a8c00000000,1,1)/EndEntire
  /ACPI(133741d0,0)/UnknownMessaging(1d)/HD(2,264800,19a000,dd904a8c00000000,1,1)/EndEntire
  /ACPI(133741d0,0)/USB(0,0)/USB(0,0)/USB(0,0)/EndEntire
  /ACPI(133741d0,0)/USB(0,0)/USB(0,0)/USB(0,0)/HD(0,800,60000,38ca680200000000,1,1)/EndEntire
  /ACPI(133741d0,0)/USB(0,0)/USB(0,0)/USB(0,0)/HD(1,61000,155000,38ca680200000000,1,1)/EndEntire
  /ACPI(133741d0,0)/USB(0,0)/USB(0,0)/USB(0,0)/HD(2,20fa800,1bbf8800,38ca680200000000,1,1)/EndEntire
  /ACPI(133741d0,0)/USB(0,0)/USB(0,0)/USB(0,0)/HD(3,1b6800,1f44000,38ca680200000000,1,1)/EndEntire

This is on a board with single USB disk and single sd-card.  The
UnknownMessaging(1d) node in the device-path is the MMC device,
but grub_efi_print_device_path() hasn't been updated yet for some
of the newer device-path sub-types.

This patch is inspired by a patch originally from Peter Jones, but
re-worked to use efi_device_path, so it doesn't much resemble the
original.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-20 10:34:42 +02:00
..
.gitignore lib: gitignore *.elf and *.so generated by efi_loader 2017-01-09 10:30:24 -05:00
efi_boottime.c efi_loader: add device-path utils 2017-09-20 10:31:55 +02:00
efi_console.c efi_loader: implement queueing of the notification function 2017-09-18 23:53:57 +02:00
efi_device_path_to_text.c efi_loader: flesh out device-path to text 2017-09-20 10:32:54 +02:00
efi_device_path.c efi_loader: add device-path utils 2017-09-20 10:31:55 +02:00
efi_disk.c efi_loader: use proper device-paths for partitions 2017-09-20 10:34:42 +02:00
efi_gop.c efi_loader: GOP fix for no display 2017-08-11 13:49:23 +02:00
efi_image_loader.c efi_loader: refactor efi_open_protocol 2017-07-19 14:14:23 +02:00
efi_memory.c efi_loader: fix bug in efi_get_memory_map 2017-07-26 22:09:49 +02:00
efi_net.c efi_loader: refactor efi_open_protocol 2017-07-19 14:14:23 +02:00
efi_runtime.c efi_loader: avoid obscure constants in efi_runtime.c 2017-09-18 23:53:56 +02:00
efi_smbios.c smbios: Expose in efi_loader as table 2016-10-19 09:01:52 +02:00
helloworld.c efi: Add support for a hello world test program 2016-11-14 23:24:03 +01:00
Kconfig x86: Enable EFI loader support 2016-11-14 23:24:04 +01:00
Makefile efi_loader: add device-path utils 2017-09-20 10:31:55 +02:00