<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firmware, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/firmware?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/firmware?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-20T15:03:28Z</updated>
<entry>
<title>efi: be more paranoid about available space when creating variables</title>
<updated>2013-03-20T15:03:28Z</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2013-03-11T21:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7feecf3f2b587e535550bb3e7bf75b2fee06fccf'/>
<id>urn:sha1:7feecf3f2b587e535550bb3e7bf75b2fee06fccf</id>
<content type='text'>
commit 68d929862e29a8b52a7f2f2f86a0600423b093cd upstream.

UEFI variables are typically stored in flash. For various reasons, avaiable
space is typically not reclaimed immediately upon the deletion of a
variable - instead, the system will garbage collect during initialisation
after a reboot.

Some systems appear to handle this garbage collection extremely poorly,
failing if more than 50% of the system flash is in use. This can result in
the machine refusing to boot. The safest thing to do for the moment is to
forbid writes if they'd end up using more than half of the storage space.
We can make this more finegrained later if we come up with a method for
identifying the broken machines.

Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
[bwh: Backported to 3.2:
 - Drop efivarfs changes and unused check_var_size()
 - Add error codes to include/linux/efi.h, added upstream by
   commit 5d9db883761a ('efi: Add support for a UEFI variable filesystem')
 - Add efi_status_to_err(), added upstream by commit 7253eaba7b17
   ('efivarfs: Return an error if we fail to read a variable')]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efivars: Disable external interrupt while holding efivars-&gt;lock</title>
<updated>2013-03-20T15:03:27Z</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2013-03-11T21:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b048fc196139b840d79b316405bede9b5d3c4c2'/>
<id>urn:sha1:3b048fc196139b840d79b316405bede9b5d3c4c2</id>
<content type='text'>
commit 81fa4e581d9283f7992a0d8c534bb141eb840a14 upstream.

[Problem]
There is a scenario which efi_pstore fails to log messages in a panic case.

 - CPUA holds an efi_var-&gt;lock in either efivarfs parts
   or efi_pstore with interrupt enabled.
 - CPUB panics and sends IPI to CPUA in smp_send_stop().
 - CPUA stops with holding the lock.
 - CPUB kicks efi_pstore_write() via kmsg_dump(KSMG_DUMP_PANIC)
   but it returns without logging messages.

[Patch Description]
This patch disables an external interruption while holding efivars-&gt;lock
as follows.

In efi_pstore_write() and get_var_data(), spin_lock/spin_unlock is
replaced by spin_lock_irqsave/spin_unlock_irqrestore because they may
be called in an interrupt context.

In other functions, they are replaced by spin_lock_irq/spin_unlock_irq.
because they are all called from a process context.

By applying this patch, we can avoid the problem above with
a following senario.

 - CPUA holds an efi_var-&gt;lock with interrupt disabled.
 - CPUB panics and sends IPI to CPUA in smp_send_stop().
 - CPUA receives the IPI after releasing the lock because it is
   disabling interrupt while holding the lock.
 - CPUB waits for one sec until CPUA releases the lock.
 - CPUB kicks efi_pstore_write() via kmsg_dump(KSMG_DUMP_PANIC)
   And it can hold the lock successfully.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Mike Waychison &lt;mikew@google.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
[bwh: Backported to 3.2:
 - Drop efivarfs changes
 - Adjust context
 - Drop change to efi_pstore_erase(), which is implemented using
   efi_pstore_write() here]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efi_pstore: Check remaining space with QueryVariableInfo() before writing data</title>
<updated>2013-03-20T15:03:27Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2012-11-14T20:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=316d0bb70f66a2682c19494f2d1fdebfa00de1ac'/>
<id>urn:sha1:316d0bb70f66a2682c19494f2d1fdebfa00de1ac</id>
<content type='text'>
commit d80a361d779a9f19498943d1ca84243209cd5647 upstream.

[Issue]

As discussed in a thread below, Running out of space in EFI isn't a well-tested scenario.
And we wouldn't expect all firmware to handle it gracefully.
http://marc.info/?l=linux-kernel&amp;m=134305325801789&amp;w=2

On the other hand, current efi_pstore doesn't check a remaining space of storage at writing time.
Therefore, efi_pstore may not work if it tries to write a large amount of data.

[Patch Description]

To avoid handling the situation above, this patch checks if there is a space enough to log with
QueryVariableInfo() before writing data.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>dmi_scan: fix missing check for _DMI_ signature in smbios_present()</title>
<updated>2013-03-20T15:03:24Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-03-08T20:43:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f2551932b8733af396ba761995e6a65bcc82e633'/>
<id>urn:sha1:f2551932b8733af396ba761995e6a65bcc82e633</id>
<content type='text'>
commit a40e7cf8f06b4e322ba902e4e9f6a6b0c2daa907 upstream.

Commit 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version
from SMBIOS if it exists") hoisted the check for "_DMI_" into
dmi_scan_machine(), which means that we don't bother to check for
"_DMI_" at offset 16 in an SMBIOS entry.  smbios_present() may also call
dmi_present() for an address where we found "_SM_", if it failed further
validation.

Check for "_DMI_" in smbios_present() before calling dmi_present().

[akpm@linux-foundation.org: fix build]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Reported-by: Tim McGrath &lt;tmhikaru@gmail.com&gt;
Tested-by: Tim Mcgrath &lt;tmhikaru@gmail.com&gt;
Cc: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists</title>
<updated>2013-02-06T04:33:53Z</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@oracle.com</email>
</author>
<published>2012-12-20T23:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9a1f08a1a192f9177d7063d903773aed800b840f'/>
<id>urn:sha1:9a1f08a1a192f9177d7063d903773aed800b840f</id>
<content type='text'>
commit 9f9c9cbb60576a1518d0bf93fb8e499cffccf377 upstream.

The right dmi version is in SMBIOS if it's zero in DMI region

This issue was originally found from an oracle bug.
One customer noticed system UUID doesn't match between dmidecode &amp; uek2.

 - HP ProLiant BL460c G6 :
   # cat /sys/devices/virtual/dmi/id/product_uuid
   00000000-0000-4C48-3031-4D5030333531
   # dmidecode | grep -i uuid
   UUID: 00000000-0000-484C-3031-4D5030333531

From SMBIOS 2.6 on, spec use little-endian encoding for UUID other than
network byte order.

So we need to get dmi version to distinguish.  If version is 0.0, the
real version is taken from the SMBIOS version.  This is part of original
kernel comment in code.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Cc: Feng Jin &lt;joe.jin@oracle.com&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>drivers/firmware/dmi_scan.c: check dmi version when get system uuid</title>
<updated>2013-02-06T04:33:53Z</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@oracle.com</email>
</author>
<published>2012-12-20T23:05:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b5dc20f97e09e01e046f5ce8215ef2b000196ca'/>
<id>urn:sha1:9b5dc20f97e09e01e046f5ce8215ef2b000196ca</id>
<content type='text'>
commit f1d8e614d74b09531b9a85e812485340f3df7b1c upstream.

As of version 2.6 of the SMBIOS specification, the first 3 fields of the
UUID are supposed to be little-endian encoded.

Also a minor fix to match variable meaning and mute checkpatch.pl

[akpm@linux-foundation.org: tweak code comment]
Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Cc: Feng Jin &lt;joe.jin@oracle.com&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efi: Make 'efi_enabled' a function to query EFI facilities</title>
<updated>2013-02-06T04:33:50Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-14T09:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06c73e442edec7cda81193276c72fda1abb96fb0'/>
<id>urn:sha1:06c73e442edec7cda81193276c72fda1abb96fb0</id>
<content type='text'>
commit 83e68189745ad931c2afd45d8ee3303929233e7f upstream.

Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Corentin Chary &lt;corentincj@iksaif.net&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Peter Jones &lt;pjones@redhat.com&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Steve Langasek &lt;steve.langasek@canonical.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad@kernel.org&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
[bwh: Backported to 3.2:
 - Adjust context (a lot)
 - Add efi_is_native() function from commit 5189c2a7c776
   ('x86: efi: Turn off efi_enabled after setup on mixed fw/kernel')
 - Make efi_init() bail out when booted non-native, as it would previously
   not be called in this case
 - Drop inapplicable changes to start_kernel()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>firmware: Add missing attributes to EFI variable attribute print out from sysfs</title>
<updated>2012-10-17T02:48:20Z</updated>
<author>
<name>Khalid Aziz</name>
<email>khalid.aziz@hp.com</email>
</author>
<published>2012-09-10T18:52:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77ad5624ead898018901874d19671164d5ee741c'/>
<id>urn:sha1:77ad5624ead898018901874d19671164d5ee741c</id>
<content type='text'>
commit 7083909023bbe29b3176e92d2d089def1aa7aa1e upstream.

Some of the EFI variable attributes are missing from print out from
/sys/firmware/efi/vars/*/attributes. This patch adds those in. It also
updates code to use pre-defined constants for masking current value
of attributes.

Signed-off-by: Khalid Aziz &lt;khalid.aziz@hp.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>dmi: Feed DMI table to /dev/random driver</title>
<updated>2012-09-12T02:37:30Z</updated>
<author>
<name>Tony Luck</name>
<email>tony.luck@intel.com</email>
</author>
<published>2012-07-20T20:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d9033bcc75a39d79411c722502665ccaab0dd4d6'/>
<id>urn:sha1:d9033bcc75a39d79411c722502665ccaab0dd4d6</id>
<content type='text'>
commit d114a33387472555188f142ed8e98acdb8181c6d upstream.

Send the entire DMI (SMBIOS) table to the /dev/random driver to
help seed its pools.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>pcdp: use early_ioremap/early_iounmap to access pcdp table</title>
<updated>2012-08-09T23:25:00Z</updated>
<author>
<name>Greg Pearson</name>
<email>greg.pearson@hp.com</email>
</author>
<published>2012-07-30T21:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ffb709e6aa95c3ba44fa8af9f7815e3c6cfed04e'/>
<id>urn:sha1:ffb709e6aa95c3ba44fa8af9f7815e3c6cfed04e</id>
<content type='text'>
commit 6c4088ac3a4d82779903433bcd5f048c58fb1aca upstream.

efi_setup_pcdp_console() is called during boot to parse the HCDP/PCDP
EFI system table and setup an early console for printk output.  The
routine uses ioremap/iounmap to setup access to the HCDP/PCDP table
information.

The call to ioremap is happening early in the boot process which leads
to a panic on x86_64 systems:

    panic+0x01ca
    do_exit+0x043c
    oops_end+0x00a7
    no_context+0x0119
    __bad_area_nosemaphore+0x0138
    bad_area_nosemaphore+0x000e
    do_page_fault+0x0321
    page_fault+0x0020
    reserve_memtype+0x02a1
    __ioremap_caller+0x0123
    ioremap_nocache+0x0012
    efi_setup_pcdp_console+0x002b
    setup_arch+0x03a9
    start_kernel+0x00d4
    x86_64_start_reservations+0x012c
    x86_64_start_kernel+0x00fe

This replaces the calls to ioremap/iounmap in efi_setup_pcdp_console()
with calls to early_ioremap/early_iounmap which can be called during
early boot.

This patch was tested on an x86_64 prototype system which uses the
HCDP/PCDP table for early console setup.

Signed-off-by: Greg Pearson &lt;greg.pearson@hp.com&gt;
Acked-by: Khalid Aziz &lt;khalid.aziz@hp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
