[kernel] r22256 - in dists/sid/linux/debian: . patches patches/features/all

Ben Hutchings benh at moszumanska.debian.org
Mon Jan 12 14:34:44 UTC 2015


Author: benh
Date: Mon Jan 12 14:34:44 2015
New Revision: 22256

Log:
efi: Expose underlying UEFI firmware platform size to userland, to support installation on Bay Trail systems (Closes: #775191)

Added:
   dists/sid/linux/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch
Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/patches/series

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Mon Jan 12 14:27:37 2015	(r22255)
+++ dists/sid/linux/debian/changelog	Mon Jan 12 14:34:44 2015	(r22256)
@@ -105,6 +105,8 @@
   * [x86] ACPI / video: Run _BCL before deciding registering backlight
     (regression in 3.16) (Closes: #762285)
   * [amd64] Enable EFI_MIXED to support Bay Trail systems
+  * efi: Expose underlying UEFI firmware platform size to userland, to
+    support installation on Bay Trail systems (Closes: #775191)
   * [x86] tls: Validate TLS entries to protect espfix (CVE-2014-8133)
   * [x86] kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit
     (CVE-2014-8134)

Added: dists/sid/linux/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch	Mon Jan 12 14:34:44 2015	(r22256)
@@ -0,0 +1,49 @@
+From: Steve McIntyre <steve at einval.com>
+Date: Fri, 9 Jan 2015 15:29:53 +0000
+Subject: efi: Expose underlying UEFI firmware platform size to userland
+Origin: https://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git//commit?id=2859dff97e54db4795b8b7d9606cb8efcec722ff
+
+In some cases (e.g. Intel Bay Trail machines), the kernel will happily
+run in 64-bit even if the underlying UEFI firmware platform is
+32-bit. That's great, but it's difficult for userland utilities like
+grub-install to do the right thing in such a situation.
+
+The kernel already knows about the size of the firmware via
+efi_enabled(EFI_64BIT). Add an extra sysfs interface
+/sys/firmware/efi/fw_platform_size to expose that information to
+userland for low-level utilities to use.
+
+Signed-off-by: Steve McIntyre <steve at einval.com>
+Cc: Matthew Garrett <mjg59 at srcf.ucam.org>
+Signed-off-by: Matt Fleming <matt.fleming at intel.com>
+---
+ drivers/firmware/efi/efi.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/firmware/efi/efi.c
++++ b/drivers/firmware/efi/efi.c
+@@ -90,15 +90,24 @@ EFI_ATTR_SHOW(fw_vendor);
+ EFI_ATTR_SHOW(runtime);
+ EFI_ATTR_SHOW(config_table);
+ 
++static ssize_t fw_platform_size_show(struct kobject *kobj,
++				     struct kobj_attribute *attr, char *buf)
++{
++	return sprintf(buf, "%d\n", efi_enabled(EFI_64BIT) ? 64 : 32);
++}
++
+ static struct kobj_attribute efi_attr_fw_vendor = __ATTR_RO(fw_vendor);
+ static struct kobj_attribute efi_attr_runtime = __ATTR_RO(runtime);
+ static struct kobj_attribute efi_attr_config_table = __ATTR_RO(config_table);
++static struct kobj_attribute efi_attr_fw_platform_size =
++	__ATTR_RO(fw_platform_size);
+ 
+ static struct attribute *efi_subsys_attrs[] = {
+ 	&efi_attr_systab.attr,
+ 	&efi_attr_fw_vendor.attr,
+ 	&efi_attr_runtime.attr,
+ 	&efi_attr_config_table.attr,
++	&efi_attr_fw_platform_size.attr,
+ 	NULL,
+ };
+ 

Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series	Mon Jan 12 14:27:37 2015	(r22255)
+++ dists/sid/linux/debian/patches/series	Mon Jan 12 14:34:44 2015	(r22256)
@@ -195,6 +195,7 @@
 features/all/of-correct-of_console_check-s-return-value.patch
 features/all/of-add-optional-options-parameter-to-of_find_node_by.patch
 features/all/of-support-passing-console-options-with-stdout-path.patch
+features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch
 
 # Update r8723au to 3.17
 features/all/r8723au/0001-staging-rtl8723au-rtw_get_wps_ie23a-Remove-unused-de.patch



More information about the Kernel-svn-changes mailing list