[PATCH v4 0/4] Apple device properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Retrieve device properties from EFI on Macs before ExitBootServices is
called and assign them to devices (patch [3/4]). The devices that
properties pertain to are encoded as EFI Device Paths, so add a parser
for these (patch [1/4]). As a first use case, amend the Thunderbolt driver
to take advantage of the Device ROM supplied by EFI (patch [4/4]).

Changes since v3:

- New patch [2/4] which introduces efi_call_proto() and efi_table_attr()
  macros to allow bitness-agnostic EFI protocol calls and table lookups.
  Previously when retrieving the properties in patch [3/4], a ternary
  operator was used to make the code work in mixed-mode, but Matt
  correctly remarked that it impacted readability.  The new approach
  seeks to maintain readability while avoiding code duplication.

- Address all other comments by Matt on patch [3/4]:  In eboot.c, move
  comparison of fw_vendor and call to retrieve_apple_device_properties()
  out of efi_main() and into a separate setup_quirks() function which
  may accommodate future vendor- or device-specific quirks.  Fix up
  comments and curly braces, add newlines and suffix typedefs with "_t"
  as requested by Matt.

- Fix bug in comparison of fw_vendor in patch [3/4] wherein the system
  table was assumed to be the 64-bit version when compiling on x86_64,
  which obviously didn't work in mixed-mode.

- Fix double free in error path in patch [4/4] spotted by Andreas.

Link to v3:
http://www.spinics.net/lists/linux-efi/msg09647.html

Browseable on GitHub:
https://github.com/l1k/linux/commits/apple_properties_v4

Thanks,

Lukas


Lukas Wunner (4):
  efi: Add device path parser
  efi: Allow bitness-agnostic protocol calls
  x86/efi: Retrieve and assign Apple device properties
  thunderbolt: Use Device ROM retrieved from EFI

 Documentation/kernel-parameters.txt     |   5 +
 arch/arm/include/asm/efi.h              |   3 +
 arch/arm64/include/asm/efi.h            |   3 +
 arch/x86/boot/compressed/eboot.c        |  65 +++++++++
 arch/x86/include/asm/efi.h              |  16 ++-
 arch/x86/include/uapi/asm/bootparam.h   |   1 +
 drivers/firmware/efi/Kconfig            |  18 +++
 drivers/firmware/efi/Makefile           |   2 +
 drivers/firmware/efi/apple-properties.c | 248 ++++++++++++++++++++++++++++++++
 drivers/firmware/efi/dev-path-parser.c  | 203 ++++++++++++++++++++++++++
 drivers/thunderbolt/Kconfig             |   1 +
 drivers/thunderbolt/eeprom.c            |  43 ++++++
 drivers/thunderbolt/switch.c            |   2 +-
 include/linux/efi.h                     |  37 +++++
 14 files changed, 641 insertions(+), 6 deletions(-)
 create mode 100644 drivers/firmware/efi/apple-properties.c
 create mode 100644 drivers/firmware/efi/dev-path-parser.c

-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux