Skip to contentSkip to conversation

loader/efi/appleloader.c

DISCUSSION Robert Millan 2 participants 4 messages Jan 3, 2010 – Jan 7, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I've removed loader/efi/appleloader.c, because it contained blobs of binary data. If someone can provide a satisfactory explanation for them, it can be added back. However, this command seems to be seldom needed.

Please keep in mind binary blobs or other kind of obfuscated data is not acceptable in GRUB. If it's machine code, we need its source code. If it's a magic signature, we need a comment and/or macro explaining that, etc.

Signature · 3 lines
Robert Millan

  "Be the change you want to see in the world" -- Gandhi
#1 lore raw
Quoted 7 lines · Robert Millan

Hi,

I've removed loader/efi/appleloader.c, because it contained blobs of binary data. If someone can provide a satisfactory explanation for them, it can be added back. However, this command seems to be seldom needed.

Quoted 6 lines

Please keep in mind binary blobs or other kind of obfuscated data is not acceptable in GRUB. If it's machine code, we need its source code. If it's a magic signature, we need a comment and/or macro explaining that, etc.

They are device identifiers in EFI format. E.g. This

static grub_uint8_t devpath_5[] = {
    0x01, 0x03, 0x18, 0x00, 0x0B, 0x00, 0x00, 0x00,
    0x00, 0x40, 0xCB, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xBF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x04, 0x06, 0x14, 0x00, 0xEB, 0x85, 0x05, 0x2B,
    0xB8, 0xD8, 0xA9, 0x49, 0x8B, 0x8C, 0xE2, 0x1B,
    0x01, 0xAE, 0xF2, 0xB7, 0x7F, 0xFF, 0x04, 0x00,
};

Means MMIO(EfiMemoryMappedIO, 0xffcb4000-0xffffbfff)/PIWGVolume(2B0585EB-D8B8-49A9-8B8CE21B01AEF2B7) I can add necessary prototypes and structures

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 26 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 7 lines · Robert Millan

Hi,

I've removed loader/efi/appleloader.c, because it contained blobs of binary data. If someone can provide a satisfactory explanation for them, it can be added back. However, this command seems to be seldom needed.

Quoted 7 lines

Please keep in mind binary blobs or other kind of obfuscated data is not acceptable in GRUB. If it's machine code, we need its source code. If it's a magic signature, we need a comment and/or macro explaining that, etc.

They are device identifiers in EFI format. E.g. This

static grub_uint8_t devpath_5[] = {
    0x01, 0x03, 0x18, 0x00, 0x0B, 0x00, 0x00, 0x00,
    0x00, 0x40, 0xCB, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xBF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x04, 0x06, 0x14, 0x00, 0xEB, 0x85, 0x05, 0x2B,
    0xB8, 0xD8, 0xA9, 0x49, 0x8B, 0x8C, 0xE2, 0x1B,
    0x01, 0xAE, 0xF2, 0xB7, 0x7F, 0xFF, 0x04, 0x00,
};
Quoted 5 lines

Means MMIO(EfiMemoryMappedIO, 0xffcb4000-0xffffbfff)/PIWGVolume(2B0585EB-D8B8-49A9-8B8CE21B01AEF2B7) I can add necessary prototypes and structures

Deblobing patch attached. Binary is the same (checked)

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'include/grub/efi/api.h'

grub/efi/api.h +10 -0
@@ -584,6 +584,16 @@
 };
 typedef struct grub_efi_protocol_device_path grub_efi_protocol_device_path_t;
 
+#define GRUB_EFI_PIWG_DEVICE_PATH_SUBTYPE		6
+
+struct grub_efi_piwg_device_path
+{
+  grub_efi_device_path_t header;
+  grub_efi_guid_t guid __attribute__ ((packed));
+};
+typedef struct grub_efi_piwg_device_path grub_efi_piwg_device_path_t;
+
+
 /* BIOS Boot Specification Device Path.  */
 #define GRUB_EFI_BIOS_DEVICE_PATH_TYPE			5
 

=== modified file 'loader/efi/appleloader.c'

efi/appleloader.c +153 -40

222 lines not on this page · raw message

#3 lore raw
Quoted 10 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 10 lines

They are device identifiers in EFI format. E.g. This

static grub_uint8_t devpath_5[] = {
    0x01, 0x03, 0x18, 0x00, 0x0B, 0x00, 0x00, 0x00,
    0x00, 0x40, 0xCB, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xBF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x04, 0x06, 0x14, 0x00, 0xEB, 0x85, 0x05, 0x2B,
    0xB8, 0xD8, 0xA9, 0x49, 0x8B, 0x8C, 0xE2, 0x1B,
    0x01, 0xAE, 0xF2, 0xB7, 0x7F, 0xFF, 0x04, 0x00,
};
Quoted 6 lines
Quoted 5 lines

Means MMIO(EfiMemoryMappedIO, 0xffcb4000-0xffffbfff)/PIWGVolume(2B0585EB-D8B8-49A9-8B8CE21B01AEF2B7) I can add necessary prototypes and structures

Deblobing patch attached. Binary is the same (checked)

Nice!

Signature · 3 lines
Robert Millan

  "Be the change you want to see in the world" -- Gandhi