[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cbd5a22-c3af-471c-bc25-1b1a7230f816@email.android.com>
Date: Tue, 28 Aug 2012 09:11:26 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jacob Shin <jacob.shin@....com>, Yinghai Lu <yinghai@...nel.org>
CC: X86-ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Tejun Heo <tj@...nel.org>, Dave Young <dyoung@...hat.com>,
Chao Wang <chaowang@...hat.com>,
Vivek Goyal <vgoyal@...hat.com>,
Andreas Herrmann <andreas.herrmann3@....com>,
Borislav Petkov <borislav.petkov@....com>
Subject: Re: [PATCH 3/5] x86: Only direct map addresses that are marked as E820_RAM
The EFI runtime code we need to map, but we shouldn't use as RAM. I suspect this is also true for the ACPI areas.
Jacob Shin <jacob.shin@....com> wrote:
>On Fri, Aug 24, 2012 at 09:54:04PM -0700, Yinghai Lu wrote:
>> On Fri, Aug 24, 2012 at 9:24 PM, Jacob Shin <jacob.shin@....com>
>wrote:
>> > On Fri, Aug 24, 2012 at 06:07:01PM -0700, Yinghai Lu wrote:
>> >> On Fri, Aug 24, 2012 at 4:55 PM, Jacob Shin <jacob.shin@....com>
>wrote:
>> >>
>> >> looks like you could avoid add pfn_mapped[] array.
>> >>
>> >> pfn_range_is_mapped() should be
>> >> check max_low_pfn_mapped, max_pfn_mapped with
>> >> e820_all_mapped(start, end, E820_RAM).
>> >
>> > Hmm .. I guess that could work .. but what about EFI code that keys
>off of
>> > EFI memory map? Does the EFI code update e820 and mark as E820_RAM
>whatever
>> > ranges that it calls init_memory_mapping on (via efi_ioremap?)
>>
>> they are converted to e820 memmap before init_memory_mapping is
>called.
>
>Yinghai, looking into this further on my EFI enabled machine, there is
>a
>memory range where:
>
>- e820 marks it as E820_RESERVED
>- EFI memory map marks it as EFI_RUNTIME_SERVICES_DATA
>
>During EFI init, the range is added (redundantly) to e820 as
>E820_RESERVED,
>but during efi_enter_virtual_mode, direct mappings are created for the
>range with a call to efi_ioremap.
>
>Another such region is EFI_RUNTIME_SERVICES_CODE which is marked as
>ACPI NVS.
>
>So these are not E820_RAM, but direct mapped by EFI code path .. what
>do
>we do here? I think we should just stick with keeping the pfn_mapped[]
>array .. no?
>
>-Jacob
>
>>
>> Thanks
>>
>> Yinghai
>>
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
--
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