lkml.org 
[lkml]   [2012]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH -v2 13/13] x86, 64bit: Map first 1M ram early before memblock_x86_fill()
From
On Sun, Sep 2, 2012 at 10:50 PM, Pekka Enberg <penberg@kernel.org> wrote:
> On Sun, Sep 2, 2012 at 10:46 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>> This one intend to fix bugs:
>> when efi booting have too many memmap entries, will need to double memblock
>> memory array or reserved array.
>
> Okay, why do we need to do that?

memblock initial memory only have 128 entry, and some EFI system could
have more entries than that.

So during memblock_x86_fill need to double that array.

and efi_reserve_boot_services() could make thing more worse. aka need
more entries in memblock.memory.regions.

>
>> +RESERVE_BRK(early_pgt_alloc, 65536);
>
> What is this needed for?

for extra page table, and extend_brk will consume that.

>
>> +void __init early_init_mem_mapping(void)
>> +{
>> + unsigned long tables;
>> + phys_addr_t base;
>> + unsigned long start = 0, end = ISA_END_ADDRESS;
>> +
>> + probe_page_size_mask();
>> +
>> + if (max_pfn_mapped)
>> + return;
>
> I find this confusing - what is this protecting for? Why is
> 'max_pfn_mapped' set when someone calls early_init_mem_mappings()?

for 32 bit, it will non zero max_pfn_mapped set in head_32.S

>
> Side note: we have multiple "pfn_mapped" globals and it's not at all
> obvious to me what the semantics for them are. Maybe adding a comment
> or two in arch/x86/include/asm/page_types.h would help.

move the comments from arch/x86/kernel/setup.c to that header file ?

Thanks

Yinghai


\
 
 \ /
  Last update: 2012-09-03 09:02    [W:0.076 / U:7.732 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site