[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5036C297.80402@zytor.com>
Date: Thu, 23 Aug 2012 16:53:59 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jacob Shin <jacob.shin@....com>
CC: X86-ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Yinghai Lu <yinghai@...nel.org>,
Andreas Herrmann <andreas.herrmann3@....com>,
Tejun Heo <tj@...nel.org>,
Borislav Petkov <borislav.petkov@....com>,
Dave Young <dyoung@...hat.com>,
Chao Wang <chaowang@...hat.com>,
Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH 3/4] x86: Only direct map addresses that are marked as
E820_RAM
On 08/23/2012 03:35 PM, Jacob Shin wrote:
>
> I looked into this a bit more, and I think what's happening is that this
> user defined memory map leaves out the region where the kernel is loaded on
> to during the boot process. The kernel and the direct mapped page tables up
> to initial max_pfn_mapped reside somwhere under 512M (KERNEL_IMAGE_SIZE),
> I guess it depends on how big your uncompressed kernel is.
>
> And at the first attempt to set_fixmap_nocache(FIX_APIC_BASE, address) in
> arch/x86/apic/apic.c: register_lapic_address runs into badness because the
> memory region where the initial page tables live is no longer mapped
> because of the above user supplied memory map.
>
> So I guess there is a disconnect between really early code that seems to
> rely on the boot loader as to where in physical memory it resides and its
> initial page tables live, and the later memory initialization code where
> it looks at the E820 (and here user can interject their own memory map
> using the command line arguments)
>
> Not really sure how to handle this case .. any advice?
>
We have two options: one scream really loud and die, assuming the
bootloader actually loaded us on top of non-memory and we're going to
die anyway; or scream really loud but try to continue (i.e. override the
memory type). I would suggest doing the latter in the near term, and
shift to the former a bit further down the line.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists