Apple device properties
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 2 repliesIn review
- v33 patches 7 repliesSuperseded
- v23 patches 8 repliesSuperseded
Changes in v4 from the cover letter
- 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.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | efi: Add device path parserdrivers/ drivers/ drivers/ +1 more | +229 | 0 replies | |
| 2/4 | efi: Allow bitness-agnostic protocol callsarch/ arch/ arch/ | +17 | 1 reply | |
| 3/4 | x86/efi: Retrieve and assign Apple device propertiesDocumentation/ arch/ arch/ +4 more | +350 | 0 replies | |
| 4/4 | thunderbolt: Use Device ROM retrieved from EFIdrivers/ drivers/ drivers/ | +45 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Lukas Wunner | Pierre Moreau | Andreas Noever |
|---|---|---|---|
| 1/4 | |||
| 2/4 | |||
| 3/4 | T-b | T-b | |
| 4/4 | T-b | T-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 0/4] Apple device properties
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
Signature · 1 line
2.10.1