From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bhaPh-0006ic-Al for mharc-grub-devel@gnu.org; Wed, 07 Sep 2016 06:49:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhaPe-0006g6-Fp for grub-devel@gnu.org; Wed, 07 Sep 2016 06:49:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhaPb-0000VN-82 for grub-devel@gnu.org; Wed, 07 Sep 2016 06:49:02 -0400 Received: from mailout3.hostsharing.net ([176.9.242.54]:45825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhaPb-0000VE-1B for grub-devel@gnu.org; Wed, 07 Sep 2016 06:48:59 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout3.hostsharing.net (Postfix) with ESMTPS id CAB82101E9E7E; Wed, 7 Sep 2016 12:48:54 +0200 (CEST) Received: from localhost (4-38-90-81.adsl.cmo.de [81.90.38.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 5BA39602934B; Wed, 7 Sep 2016 12:48:53 +0200 (CEST) X-Mailbox-Line: From c7da04f16d1d4ed6a3767dfb1897532d20fd7b2f Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Wed, 7 Sep 2016 12:49:18 +0200 Subject: [PATCH v2 0/4] Apple device properties To: linux-efi@vger.kernel.org, Matt Fleming , linux-kernel@vger.kernel.org Cc: Andreas Noever , grub-devel@gnu.org, x86@kernel.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 176.9.242.54 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 10:49:03 -0000 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 [2/4]). As a first use case, amend the Thunderbolt driver to take advantage of the Device ROM supplied by EFI (patch [4/4]). Patch [1/4] is already queued in Rafael J. Wysocki's tree for 4.9 and is included here only because patch [2/4] wouldn't compile without it. The series also depends on these two patches which are already queued in Matt's tree for 4.9: - x86/efi: Optimize away setup_gop32/64 if unused https://patchwork.kernel.org/patch/9315763/ - x86/efi: Allow invocation of arbitrary boot services https://patchwork.kernel.org/patch/9293371/ Changes since v1: - Previously there were two separate patches for retrieving properties and assigning them to devices. These are now squashed together in patch [3/4]. (Requested by Matt Fleming.) - The version of the EFI properties protocol as well as the properties payload is now checked. - Applied a bit of polish all over. Link to v1: https://lkml.org/lkml/2016/7/27/218 Browseable on GitHub: https://github.com/l1k/linux/commits/apple_properties_v2 Thanks, Lukas Lukas Wunner (4): ACPI / bus: Make acpi_get_first_physical_node() public efi: Add device path parser x86/efi: Retrieve and assign Apple device properties thunderbolt: Use Device ROM retrieved from EFI Documentation/kernel-parameters.txt | 5 + arch/x86/boot/compressed/eboot.c | 63 +++++++++ arch/x86/include/uapi/asm/bootparam.h | 1 + drivers/acpi/internal.h | 1 - drivers/firmware/efi/Kconfig | 18 +++ drivers/firmware/efi/Makefile | 2 + drivers/firmware/efi/apple-properties.c | 230 ++++++++++++++++++++++++++++++++ drivers/firmware/efi/dev-path-parser.c | 186 ++++++++++++++++++++++++++ drivers/thunderbolt/Kconfig | 1 + drivers/thunderbolt/eeprom.c | 42 ++++++ drivers/thunderbolt/switch.c | 2 +- include/linux/acpi.h | 7 + include/linux/efi.h | 38 ++++++ 13 files changed, 594 insertions(+), 2 deletions(-) create mode 100644 drivers/firmware/efi/apple-properties.c create mode 100644 drivers/firmware/efi/dev-path-parser.c -- 2.9.3