lkml.org 
[lkml]   [2009]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/12] SFI, x86: hook e820() for memory map initialization
On Thu, 9 Jul 2009 05:37:08 +0800
"H. Peter Anvin" <hpa@zytor.com> wrote:

> This bothers me... we keep saying that memory map initialization
> belongs to the boot loader, and yet we keep doing the opposite. This
> isn't just an arbitrary difference, either: it is pretty essential to
> being able to use the early range allocator safely.
>
> -hpa

Hi hpa,

I understand your concern, and I've added that code into our boot loader
for Moosrestown which sets up a e820 memory table in boot parameters by
parsing SFI table.

The reason we still keep this piece of code is to be compatible with old
version boot loaders which may not know SFI info yet. And
sfi_init_memory_map() only get called when kernel can't find an e820 table
in boot parameters.

Anyway, I think we can remove the code if it really breaks the rule.

Thanks,
Feng

>
>
> Len Brown wrote:
> > From: Feng Tang <feng.tang@intel.com>
> >
> > Signed-off-by: Feng Tang <feng.tang@intel.com>
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > ---
> > arch/x86/kernel/e820.c | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> > index c4ca89d..e399d0e 100644
> > --- a/arch/x86/kernel/e820.c
> > +++ b/arch/x86/kernel/e820.c
> > @@ -20,6 +20,7 @@
> > #include <linux/pfn.h>
> > #include <linux/suspend.h>
> > #include <linux/firmware-map.h>
> > +#include <linux/sfi.h>
> >
> > #include <asm/pgtable.h>
> > #include <asm/page.h>
> > @@ -1437,6 +1438,10 @@ char *__init
> > default_machine_specific_memory_setup(void) < 0) {
> > u64 mem_size;
> >
> > + /* if SFI mmap table exists, use SFI to setup e820
> > mmap */
> > + if (!sfi_init_memory_map())
> > + return "SFI";
> > +
> > /* compare results from other methods and take the
> > greater */ if (boot_params.alt_mem_k
> > < boot_params.screen_info.ext_mem_k) {
>


\
 
 \ /
  Last update: 2009-07-09 03:17    [W:0.076 / U:5.224 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site