Re: [PATCH v6 19/27] x86, boot: update comments about entries for64bit image

From: H. Peter Anvin
Date: Thu Dec 13 2012 - 20:04:59 EST


On 12/13/2012 05:00 PM, Yinghai Lu wrote:
> On Thu, Dec 13, 2012 at 4:54 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>> On 12/13/2012 04:51 PM, Yinghai Lu wrote:
>
>>> also need to make sure zero page and command line get ident mapping.
>>> because arch/x86/boot/compressed/head_64.S is using them.
>>>
>>
>> ... or we need to do the same kind of thing there.
>>
> your #PF handler approach will handle accessing kernel code together
> with zero_page, command_line, ramdisk ?
> so only need to map first 2M?
>

Well, it needs to map enough that it can bootstrap itself -- 2M is
certainly sufficient, but right now it touches memory which isn't
necessarily guaranteed to be in the same 2M chunk (specifically
.init.data and .init.text).

We can do the equivalent in the decompressor, there the memory layout is
even simpler, and it may very well be practical to say we only need the
caller to map a single 2M page RWX.

-hpa

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