lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [tip:x86/urgent] x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops
From
On Wed, Feb 22, 2012 at 5:16 PM, tip-bot for Matt Fleming
<matt.fleming@intel.com> wrote:
> Commit-ID:  f75bd1837564657b21431e44243e064a77276589
> Gitweb:     http://git.kernel.org/tip/f75bd1837564657b21431e44243e064a77276589
> Author:     Matt Fleming <matt.fleming@intel.com>
> AuthorDate: Mon, 20 Feb 2012 13:30:26 +0000
> Committer:  H. Peter Anvin <hpa@zytor.com>
> CommitDate: Wed, 22 Feb 2012 14:49:55 -0800
>
> x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops
>
...
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index d7d5099..e22bb08 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -690,6 +690,8 @@ early_param("reservelow", parse_reservelow);
>
>  void __init setup_arch(char **cmdline_p)
>  {
> +       unsigned long end_pfn;
> +
>  #ifdef CONFIG_X86_32
>        memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
>        visws_early_detect();
> @@ -926,7 +928,24 @@ void __init setup_arch(char **cmdline_p)
>        init_gbpages();
>
>        /* max_pfn_mapped is updated here */
> -       max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
> +       end_pfn = max_low_pfn;
> +
> +#ifdef CONFIG_X86_64
> +       /*
> +        * There may be regions after the last E820_RAM region that we
> +        * want to include in the kernel direct mapping because their
> +        * contents are needed at runtime.
> +        */
> +       if (efi_enabled) {
> +               unsigned long efi_end;
> +
> +               efi_end = e820_end_pfn(MAXMEM>>PAGE_SHIFT, E820_RESERVED_EFI);

> +               if (efi_end > end_pfn)
> +                       end_pfn = efi_end;
> +       }
> +#endif
> +
> +       max_low_pfn_mapped = init_memory_mapping(0, end_pfn << PAGE_SHIFT);


Why is MAXMEM used here?

EFI reserved area could be above 4G?

if that is the case, you will map all mmio hole below 4g.

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-23 03:23    [from the cache]
©2003-2011 Jasper Spaans