* [PATCH] efi: Quirk out SGI UV
@ 2014-03-04 16:02 Borislav Petkov
2014-03-04 17:27 ` Matt Fleming
2014-03-04 23:06 ` Russ Anderson
0 siblings, 2 replies; 3+ messages in thread
From: Borislav Petkov @ 2014-03-04 16:02 UTC (permalink / raw)
To: Russ Anderson, Alex Thorlton
Cc: Matt Fleming, Linux EFI, LKML, Borislav Petkov
From: Borislav Petkov <bp@suse.de>
Getting this thing to work with the new mapping scheme would need more
work.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/include/asm/efi.h | 1 +
arch/x86/kernel/setup.c | 10 ++--------
arch/x86/platform/efi/efi.c | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index e985d6bf7d3a..86d1fd4bf24c 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -135,6 +135,7 @@ extern void __init old_map_region(efi_memory_desc_t *md);
extern void __init runtime_code_page_mkexec(void);
extern void __init efi_runtime_mkexec(void);
extern void __init efi_dump_pagetable(void);
+extern void __init efi_apply_memmap_quirks(void);
struct efi_setup_data {
u64 fw_vendor;
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 830ae2d95450..09c76d265550 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1238,14 +1238,8 @@ void __init setup_arch(char **cmdline_p)
register_refined_jiffies(CLOCK_TICK_RATE);
#ifdef CONFIG_EFI
- /* Once setup is done above, unmap the EFI memory map on
- * mismatched firmware/kernel archtectures since there is no
- * support for runtime services.
- */
- if (efi_enabled(EFI_BOOT) && !efi_is_native()) {
- pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
- efi_unmap_memmap();
- }
+ if (efi_enabled(EFI_BOOT))
+ efi_apply_memmap_quirks();
#endif
}
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 482986c3afc5..518aa8540a6d 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -52,6 +52,7 @@
#include <asm/tlbflush.h>
#include <asm/x86_init.h>
#include <asm/rtc.h>
+#include <asm/uv/uv.h>
#define EFI_DEBUG
@@ -1298,3 +1299,22 @@ static int __init parse_efi_cmdline(char *str)
return 0;
}
early_param("efi", parse_efi_cmdline);
+
+void __init efi_apply_memmap_quirks(void)
+{
+ /*
+ * Once setup is done earlier, unmap the EFI memory map on mismatched
+ * firmware/kernel architectures since there is no support for runtime
+ * services.
+ */
+ if (!efi_is_native()) {
+ pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
+ efi_unmap_memmap();
+ }
+
+ /*
+ * UV doesn't support the new EFI pagetable mapping yet.
+ */
+ if (is_uv_system())
+ set_bit(EFI_OLD_MEMMAP, &efi.flags);
+}
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] efi: Quirk out SGI UV
2014-03-04 16:02 [PATCH] efi: Quirk out SGI UV Borislav Petkov
@ 2014-03-04 17:27 ` Matt Fleming
2014-03-04 23:06 ` Russ Anderson
1 sibling, 0 replies; 3+ messages in thread
From: Matt Fleming @ 2014-03-04 17:27 UTC (permalink / raw)
To: Borislav Petkov
Cc: Russ Anderson, Alex Thorlton, Linux EFI, LKML, Borislav Petkov
On Tue, 04 Mar, at 05:02:17PM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Getting this thing to work with the new mapping scheme would need more
> work.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> arch/x86/include/asm/efi.h | 1 +
> arch/x86/kernel/setup.c | 10 ++--------
> arch/x86/platform/efi/efi.c | 20 ++++++++++++++++++++
> 3 files changed, 23 insertions(+), 8 deletions(-)
Thanks, applied to 'urgent' with an updated commit message.
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: Quirk out SGI UV
2014-03-04 16:02 [PATCH] efi: Quirk out SGI UV Borislav Petkov
2014-03-04 17:27 ` Matt Fleming
@ 2014-03-04 23:06 ` Russ Anderson
1 sibling, 0 replies; 3+ messages in thread
From: Russ Anderson @ 2014-03-04 23:06 UTC (permalink / raw)
To: Borislav Petkov
Cc: Alex Thorlton, Matt Fleming, Linux EFI, LKML, Borislav Petkov
On Tue, Mar 04, 2014 at 05:02:17PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Getting this thing to work with the new mapping scheme would need more
> work.
Thanks Boris. Allows SGI UV to boot (without the extra bootline).
Acked-by: Russ Anderson <rja@sgi.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> arch/x86/include/asm/efi.h | 1 +
> arch/x86/kernel/setup.c | 10 ++--------
> arch/x86/platform/efi/efi.c | 20 ++++++++++++++++++++
> 3 files changed, 23 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> index e985d6bf7d3a..86d1fd4bf24c 100644
> --- a/arch/x86/include/asm/efi.h
> +++ b/arch/x86/include/asm/efi.h
> @@ -135,6 +135,7 @@ extern void __init old_map_region(efi_memory_desc_t *md);
> extern void __init runtime_code_page_mkexec(void);
> extern void __init efi_runtime_mkexec(void);
> extern void __init efi_dump_pagetable(void);
> +extern void __init efi_apply_memmap_quirks(void);
>
> struct efi_setup_data {
> u64 fw_vendor;
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 830ae2d95450..09c76d265550 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -1238,14 +1238,8 @@ void __init setup_arch(char **cmdline_p)
> register_refined_jiffies(CLOCK_TICK_RATE);
>
> #ifdef CONFIG_EFI
> - /* Once setup is done above, unmap the EFI memory map on
> - * mismatched firmware/kernel archtectures since there is no
> - * support for runtime services.
> - */
> - if (efi_enabled(EFI_BOOT) && !efi_is_native()) {
> - pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
> - efi_unmap_memmap();
> - }
> + if (efi_enabled(EFI_BOOT))
> + efi_apply_memmap_quirks();
> #endif
> }
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 482986c3afc5..518aa8540a6d 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -52,6 +52,7 @@
> #include <asm/tlbflush.h>
> #include <asm/x86_init.h>
> #include <asm/rtc.h>
> +#include <asm/uv/uv.h>
>
> #define EFI_DEBUG
>
> @@ -1298,3 +1299,22 @@ static int __init parse_efi_cmdline(char *str)
> return 0;
> }
> early_param("efi", parse_efi_cmdline);
> +
> +void __init efi_apply_memmap_quirks(void)
> +{
> + /*
> + * Once setup is done earlier, unmap the EFI memory map on mismatched
> + * firmware/kernel architectures since there is no support for runtime
> + * services.
> + */
> + if (!efi_is_native()) {
> + pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
> + efi_unmap_memmap();
> + }
> +
> + /*
> + * UV doesn't support the new EFI pagetable mapping yet.
> + */
> + if (is_uv_system())
> + set_bit(EFI_OLD_MEMMAP, &efi.flags);
> +}
> --
> 1.9.0
--
Russ Anderson, Kernel and Performance Software Team Manager
SGI - Silicon Graphics Inc rja@sgi.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-04 23:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 16:02 [PATCH] efi: Quirk out SGI UV Borislav Petkov
2014-03-04 17:27 ` Matt Fleming
2014-03-04 23:06 ` Russ Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox