<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/x86/platform, branch v3.2.55</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/x86/platform?h=v3.2.55</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/x86/platform?h=v3.2.55'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-03T04:33:30Z</updated>
<entry>
<title>x86, efi: Don't use (U)EFI time services on 32 bit</title>
<updated>2014-01-03T04:33:30Z</updated>
<author>
<name>Matthew Garrett</name>
<email>matthew.garrett@nebula.com</email>
</author>
<published>2013-11-29T19:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7b05fbb31ac1c454c5bbf303da75b3e1810de51'/>
<id>urn:sha1:d7b05fbb31ac1c454c5bbf303da75b3e1810de51</id>
<content type='text'>
commit 04bf9ba720fcc4fa313fa122b799ae0989b6cd50 upstream.

UEFI time services are often broken once we're in virtual mode. We were
already refusing to use them on 64-bit systems, but it turns out that
they're also broken on some 32-bit firmware, including the Dell Venue.
Disable them for now, we can revisit once we have the 1:1 mappings code
incorporated.

Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Link: http://lkml.kernel.org/r/1385754283-2464-1-git-send-email-matthew.garrett@nebula.com
Cc: 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: deleted code is slightly different]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86, efi: Don't map Boot Services on i386</title>
<updated>2013-10-26T20:06:05Z</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2013-04-18T14:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1dbbbf3262547a7f2d28a40224c8e3d017201c66'/>
<id>urn:sha1:1dbbbf3262547a7f2d28a40224c8e3d017201c66</id>
<content type='text'>
commit 700870119f49084da004ab588ea2b799689efaf7 upstream.

Add patch to fix 32bit EFI service mapping (rhbz 726701)

Multiple people are reporting hitting the following WARNING on i386,

  WARNING: at arch/x86/mm/ioremap.c:102 __ioremap_caller+0x3d3/0x440()
  Modules linked in:
  Pid: 0, comm: swapper Not tainted 3.9.0-rc7+ #95
  Call Trace:
   [&lt;c102b6af&gt;] warn_slowpath_common+0x5f/0x80
   [&lt;c1023fb3&gt;] ? __ioremap_caller+0x3d3/0x440
   [&lt;c1023fb3&gt;] ? __ioremap_caller+0x3d3/0x440
   [&lt;c102b6ed&gt;] warn_slowpath_null+0x1d/0x20
   [&lt;c1023fb3&gt;] __ioremap_caller+0x3d3/0x440
   [&lt;c106007b&gt;] ? get_usage_chars+0xfb/0x110
   [&lt;c102d937&gt;] ? vprintk_emit+0x147/0x480
   [&lt;c1418593&gt;] ? efi_enter_virtual_mode+0x1e4/0x3de
   [&lt;c102406a&gt;] ioremap_cache+0x1a/0x20
   [&lt;c1418593&gt;] ? efi_enter_virtual_mode+0x1e4/0x3de
   [&lt;c1418593&gt;] efi_enter_virtual_mode+0x1e4/0x3de
   [&lt;c1407984&gt;] start_kernel+0x286/0x2f4
   [&lt;c1407535&gt;] ? repair_env_string+0x51/0x51
   [&lt;c1407362&gt;] i386_start_kernel+0x12c/0x12f

Due to the workaround described in commit 916f676f8 ("x86, efi: Retain
boot service code until after switching to virtual mode") EFI Boot
Service regions are mapped for a period during boot. Unfortunately, with
the limited size of the i386 direct kernel map it's possible that some
of the Boot Service regions will not be directly accessible, which
causes them to be ioremap()'d, triggering the above warning as the
regions are marked as E820_RAM in the e820 memmap.

There are currently only two situations where we need to map EFI Boot
Service regions,

  1. To workaround the firmware bug described in 916f676f8
  2. To access the ACPI BGRT image

but since we haven't seen an i386 implementation that requires either,
this simple fix should suffice for now.

[ Added to changelog - Matt ]

Reported-by: Bryan O'Donoghue &lt;bryan.odonoghue.lkml@nexus-software.ie&gt;
Acked-by: Tom Zanussi &lt;tom.zanussi@intel.com&gt;
Acked-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86/efi: Fix dummy variable buffer allocation</title>
<updated>2013-06-29T03:06:32Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-06-16T20:27:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b35b16d2be61943373f16ceb6184a66da84ab229'/>
<id>urn:sha1:b35b16d2be61943373f16ceb6184a66da84ab229</id>
<content type='text'>
commit b8cb62f82103083a6e8fa5470bfe634a2c06514d upstream.

1. Check for allocation failure
2. Clear the buffer contents, as they may actually be written to flash
3. Don't leak the buffer

Compile-tested only.

[ Tested successfully on my buggy ASUS machine - Matt ]

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>Modify UEFI anti-bricking code</title>
<updated>2013-06-29T03:06:32Z</updated>
<author>
<name>Matthew Garrett</name>
<email>matthew.garrett@nebula.com</email>
</author>
<published>2013-06-01T20:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=134c3faa909c12ae1b9c3a37a5e733b1f6c3dfab'/>
<id>urn:sha1:134c3faa909c12ae1b9c3a37a5e733b1f6c3dfab</id>
<content type='text'>
commit f8b8404337de4e2466e2e1139ea68b1f8295974f upstream.

This patch reworks the UEFI anti-bricking code, including an effective
reversion of cc5a080c and 31ff2f20. It turns out that calling
QueryVariableInfo() from boot services results in some firmware
implementations jumping to physical addresses even after entering virtual
mode, so until we have 1:1 mappings for UEFI runtime space this isn't
going to work so well.

Reverting these gets us back to the situation where we'd refuse to create
variables on some systems because they classify deleted variables as "used"
until the firmware triggers a garbage collection run, which they won't do
until they reach a lower threshold. This results in it being impossible to
install a bootloader, which is unhelpful.

Feedback from Samsung indicates that the firmware doesn't need more than
5KB of storage space for its own purposes, so that seems like a reasonable
threshold. However, there's still no guarantee that a platform will attempt
garbage collection merely because it drops below this threshold. It seems
that this is often only triggered if an attempt to write generates a
genuine EFI_OUT_OF_RESOURCES error. We can force that by attempting to
create a variable larger than the remaining space. This should fail, but if
it somehow succeeds we can then immediately delete it.

I've tested this on the UEFI machines I have available, but I don't have
a Samsung and so can't verify that it avoids the bricking problem.

Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Lee, Chun-Y &lt;jlee@suse.com&gt; [ dummy variable cleanup ]
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
[bwh: Backported to 3.2: the reverted changes were never applied here]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86,efi: Implement efi_no_storage_paranoia parameter</title>
<updated>2013-05-30T13:35:11Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2013-04-16T23:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a068400fcef7b1563d60f294b584b728236307f'/>
<id>urn:sha1:2a068400fcef7b1563d60f294b584b728236307f</id>
<content type='text'>
commit 8c58bf3eec3b8fc8162fe557e9361891c20758f2 upstream.

Using this parameter one can disable the storage_size/2 check if
he is really sure that the UEFI does sane gc and fulfills the spec.

This parameter is useful if a devices uses more than 50% of the
storage by default.
The Intel DQSW67 desktop board is such a sucker for exmaple.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86,efi: Check max_size only if it is non-zero.</title>
<updated>2013-05-30T13:35:11Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2013-04-10T08:59:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b12bcd7b3fe04a5fcca945aaf5b74181d9a223f4'/>
<id>urn:sha1:b12bcd7b3fe04a5fcca945aaf5b74181d9a223f4</id>
<content type='text'>
commit 7791c8423f1f7f4dad94e753bae67461d5b80be8 upstream.

Some EFI implementations return always a MaximumVariableSize of 0,
check against max_size only if it is non-zero.
My Intel DQ67SW desktop board has such an implementation.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efi: Export efi_query_variable_store() for efivars.ko</title>
<updated>2013-05-30T13:35:10Z</updated>
<author>
<name>Sergey Vlasov</name>
<email>vsu@altlinux.ru</email>
</author>
<published>2013-04-16T14:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c5ba30a73ebcca1b4068363ca08410fa3729ebeb'/>
<id>urn:sha1:c5ba30a73ebcca1b4068363ca08410fa3729ebeb</id>
<content type='text'>
commit 3668011d4ad556224f7c012c1e870a6eaa0e59da upstream.

Fixes build with CONFIG_EFI_VARS=m which was broken after the commit
"x86, efivars: firmware bug workarounds should be in platform code".

Signed-off-by: Sergey Vlasov &lt;vsu@altlinux.ru&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86, efivars: firmware bug workarounds should be in platform code</title>
<updated>2013-05-30T13:35:10Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-03-25T09:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=649aeb46c8ff0aa527e73e8f847f9895c835d8cb'/>
<id>urn:sha1:649aeb46c8ff0aa527e73e8f847f9895c835d8cb</id>
<content type='text'>
commit a6e4d5a03e9e3587e88aba687d8f225f4f04c792 upstream.

Let's not burden ia64 with checks in the common efivars code that we're not
writing too much data to the variable store. That kind of thing is an x86
firmware bug, plain and simple.

efi_query_variable_store() provides platforms with a wrapper in which they can
perform checks and workarounds for EFI variable storage bugs.

Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>x86, efi: Make "noefi" really disable EFI runtime serivces</title>
<updated>2013-03-06T03:24:08Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-02-20T20:36:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1a116473beaf0b6c1ca6bfe18967094ce513f029'/>
<id>urn:sha1:1a116473beaf0b6c1ca6bfe18967094ce513f029</id>
<content type='text'>
commit fb834c7acc5e140cf4f9e86da93a66de8c0514da upstream.

commit 1de63d60cd5b ("efi: Clear EFI_RUNTIME_SERVICES rather than
EFI_BOOT by "noefi" boot parameter") attempted to make "noefi" true to
its documentation and disable EFI runtime services to prevent the
bricking bug described in commit e0094244e41c ("samsung-laptop:
Disable on EFI hardware"). However, it's not possible to clear
EFI_RUNTIME_SERVICES from an early param function because
EFI_RUNTIME_SERVICES is set in efi_init() *after* parse_early_param().

This resulted in "noefi" effectively becoming a no-op and no longer
providing users with a way to disable EFI, which is bad for those
users that have buggy machines.

Reported-by: Walt Nelson Jr &lt;walt0924@gmail.com&gt;
Cc: Satoru Takeuchi &lt;takeuchi_satoru@jp.fujitsu.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Link: http://lkml.kernel.org/r/1361392572-25657-1-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
[bwh: Backported to 3.2: efi_runtime_init() is not a separate function,
 so put a whole set of statements in an if (!disable_runtime) block]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efi: Clear EFI_RUNTIME_SERVICES rather than EFI_BOOT by "noefi" boot parameter</title>
<updated>2013-03-06T03:23:59Z</updated>
<author>
<name>Satoru Takeuchi</name>
<email>takeuchi_satoru@jp.fujitsu.com</email>
</author>
<published>2013-02-14T00:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce75086eb205efa219fb9975ba53bdc1a1390839'/>
<id>urn:sha1:ce75086eb205efa219fb9975ba53bdc1a1390839</id>
<content type='text'>
commit 1de63d60cd5b0d33a812efa455d5933bf1564a51 upstream.

There was a serious problem in samsung-laptop that its platform driver is
designed to run under BIOS and running under EFI can cause the machine to
become bricked or can cause Machine Check Exceptions.

    Discussion about this problem:
    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557
    https://bugzilla.kernel.org/show_bug.cgi?id=47121

    The patches to fix this problem:
    efi: Make 'efi_enabled' a function to query EFI facilities
    83e68189745ad931c2afd45d8ee3303929233e7f

    samsung-laptop: Disable on EFI hardware
    e0094244e41c4d0c7ad69920681972fc45d8ce34

Unfortunately this problem comes back again if users specify "noefi" option.
This parameter clears EFI_BOOT and that driver continues to run even if running
under EFI. Refer to the document, this parameter should clear
EFI_RUNTIME_SERVICES instead.

Documentation/kernel-parameters.txt:
===============================================================================
...
	noefi		[X86] Disable EFI runtime services support.
...
===============================================================================

Documentation/x86/x86_64/uefi.txt:
===============================================================================
...
- If some or all EFI runtime services don't work, you can try following
  kernel command line parameters to turn off some or all EFI runtime
  services.
	noefi		turn off all EFI runtime services
...
===============================================================================

Signed-off-by: Satoru Takeuchi &lt;takeuchi_satoru@jp.fujitsu.com&gt;
Link: http://lkml.kernel.org/r/511C2C04.2070108@jp.fujitsu.com
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
