mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for David Woodhouse <David.Woodhouse@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	matt.fleming@intel.com, stable@kernel.org, tglx@linutronix.de,
	hpa@linux.intel.com, David.Woodhouse@intel.com
Subject: [tip:x86/efi] x86, efi: Fix PCI ROM handing in EFI boot stub, in 32-bit mode
Date: Sun, 27 Jan 2013 20:32:15 -0800	[thread overview]
Message-ID: <tip-b607e2126705ca28ecf21aa051172882bbdaae8a@git.kernel.org> (raw)
In-Reply-To: <1358513837.2397.247.camel@shinybook.infradead.org>

Commit-ID:  b607e2126705ca28ecf21aa051172882bbdaae8a
Gitweb:     http://git.kernel.org/tip/b607e2126705ca28ecf21aa051172882bbdaae8a
Author:     David Woodhouse <David.Woodhouse@intel.com>
AuthorDate: Mon, 7 Jan 2013 22:09:49 +0000
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Sun, 27 Jan 2013 20:19:37 -0800

x86, efi: Fix PCI ROM handing in EFI boot stub, in 32-bit mode

The 'Attributes' argument to pci->Attributes() function is 64-bit. So
when invoking in 32-bit mode it takes two registers, not just one.

This fixes memory corruption when booting via the 32-bit EFI boot stub.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>
---
 arch/x86/boot/compressed/eboot.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 448a86e..b7f2208 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -295,10 +295,15 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
 		if (!pci)
 			continue;
 
+#ifdef CONFIG_X86_64
 		status = efi_call_phys4(pci->attributes, pci,
 					EfiPciIoAttributeOperationGet, 0,
 					&attributes);
-
+#else
+		status = efi_call_phys5(pci->attributes, pci,
+					EfiPciIoAttributeOperationGet, 0, 0,
+					&attributes);
+#endif
 		if (status != EFI_SUCCESS)
 			continue;
 

  parent reply	other threads:[~2013-01-28  4:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 10:29 [GIT PULL] EFI fixes for v3.8 Matt Fleming
2013-01-18 12:57 ` David Woodhouse
2013-01-28  4:29   ` [tip:x86/efi] x86, efi: Fix display detection in EFI boot stub tip-bot for David Woodhouse
2013-01-28  4:31   ` [tip:x86/efi] x86, efi: Fix 32-bit EFI handover protocol entry point tip-bot for David Woodhouse
2013-01-28  4:32   ` tip-bot for David Woodhouse [this message]
2013-01-28  4:33   ` [tip:x86/efi] x86, build: Dynamically find entry points in compressed startup code tip-bot for David Woodhouse
2013-01-29 19:03 ` [GIT PULL] EFI fixes for v3.8 Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-b607e2126705ca28ecf21aa051172882bbdaae8a@git.kernel.org \
    --to=david.woodhouse@intel.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@kernel.org \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome