* [PATCH] x86: fix Intel Mac booting with EFI
@ 2008-07-02 21:48 Hugh Dickins
2008-07-03 6:18 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Hugh Dickins @ 2008-07-02 21:48 UTC (permalink / raw)
To: Linus Torvalds
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Peter Jones,
Glauber Costa, Andrew Morton, linux-kernel
Fedora reports that mem_init()'s zap_low_mappings(), extended to SMP in
61165d7a035f6571c7576e7f51e7230157724c8d x86: fix app crashes after SMP resume
causes 32-bit Intel Mac machines to reboot very early when booting with EFI.
The EFI code appears to manage low mappings for itself when needed; but like
many before it, confuses PSE with PAE. So it has only been mapping half the
space it needed when PSE but not PAE. This remained unnoticed until we moved
the SMP zap_low_mappings() before efi_enter_virtual_mode(). Presumably could
have been noticed years ago if anyone ran a UP kernel on such machines?
Reported-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Tested-by: Peter Jones <pjones@redhat.com>
---
arch/x86/kernel/efi_32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- 2.6.26-rc8/arch/x86/kernel/efi_32.c 2008-04-17 03:49:44.000000000 +0100
+++ linux/arch/x86/kernel/efi_32.c 2008-07-02 17:02:36.000000000 +0100
@@ -49,13 +49,13 @@ void efi_call_phys_prelog(void)
local_irq_save(efi_rt_eflags);
/*
- * If I don't have PSE, I should just duplicate two entries in page
- * directory. If I have PSE, I just need to duplicate one entry in
+ * If I don't have PAE, I should just duplicate two entries in page
+ * directory. If I have PAE, I just need to duplicate one entry in
* page directory.
*/
cr4 = read_cr4();
- if (cr4 & X86_CR4_PSE) {
+ if (cr4 & X86_CR4_PAE) {
efi_bak_pg_dir_pointer[0].pgd =
swapper_pg_dir[pgd_index(0)].pgd;
swapper_pg_dir[0].pgd =
@@ -93,7 +93,7 @@ void efi_call_phys_epilog(void)
cr4 = read_cr4();
- if (cr4 & X86_CR4_PSE) {
+ if (cr4 & X86_CR4_PAE) {
swapper_pg_dir[pgd_index(0)].pgd =
efi_bak_pg_dir_pointer[0].pgd;
} else {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86: fix Intel Mac booting with EFI
2008-07-02 21:48 [PATCH] x86: fix Intel Mac booting with EFI Hugh Dickins
@ 2008-07-03 6:18 ` Ingo Molnar
2008-07-03 6:28 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-07-03 6:18 UTC (permalink / raw)
To: Hugh Dickins
Cc: Linus Torvalds, Thomas Gleixner, H. Peter Anvin, Peter Jones,
Glauber Costa, Andrew Morton, linux-kernel, Yinghai Lu, Huang,
Ying
* Hugh Dickins <hugh@veritas.com> wrote:
> Fedora reports that mem_init()'s zap_low_mappings(), extended to SMP
> in 61165d7a035f6571c7576e7f51e7230157724c8d x86: fix app crashes after
> SMP resume causes 32-bit Intel Mac machines to reboot very early when
> booting with EFI.
>
> The EFI code appears to manage low mappings for itself when needed;
> but like many before it, confuses PSE with PAE. So it has only been
> mapping half the space it needed when PSE but not PAE. This remained
> unnoticed until we moved the SMP zap_low_mappings() before
> efi_enter_virtual_mode(). Presumably could have been noticed years
> ago if anyone ran a UP kernel on such machines?
good spotting!
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: fix Intel Mac booting with EFI
2008-07-03 6:18 ` Ingo Molnar
@ 2008-07-03 6:28 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-07-03 6:28 UTC (permalink / raw)
To: Hugh Dickins
Cc: Linus Torvalds, Thomas Gleixner, H. Peter Anvin, Peter Jones,
Glauber Costa, Andrew Morton, linux-kernel, Yinghai Lu, Huang,
Ying
* Ingo Molnar <mingo@elte.hu> wrote:
> * Hugh Dickins <hugh@veritas.com> wrote:
>
> > Fedora reports that mem_init()'s zap_low_mappings(), extended to SMP
> > in 61165d7a035f6571c7576e7f51e7230157724c8d x86: fix app crashes after
> > SMP resume causes 32-bit Intel Mac machines to reboot very early when
> > booting with EFI.
> >
> > The EFI code appears to manage low mappings for itself when needed;
> > but like many before it, confuses PSE with PAE. So it has only been
> > mapping half the space it needed when PSE but not PAE. This remained
> > unnoticed until we moved the SMP zap_low_mappings() before
> > efi_enter_virtual_mode(). Presumably could have been noticed years
> > ago if anyone ran a UP kernel on such machines?
>
> good spotting!
>
> Acked-by: Ingo Molnar <mingo@elte.hu>
and also applied to x86/urgent.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-03 7:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 21:48 [PATCH] x86: fix Intel Mac booting with EFI Hugh Dickins
2008-07-03 6:18 ` Ingo Molnar
2008-07-03 6:28 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox