lkml.org 
[lkml]   [2013]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v7u1 05/31] x86, 64bit: copy zero-page early
    Date
    real_mode_data aka zero-page could be above 4g.
    We will have #PF handler to set page table for not accessible ram
    early, but could limit it before x86_64_start_reservations to limit
    the change to native path.

    Also we will need to ramdisk info in zero-page to access microcode
    blob in ramdisk in x86_64_start_kernel, so copy zero-page early make
    it accessing ramdisk info simple.

    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Cc: Alexander Duyck <alexander.h.duyck@intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    ---
    arch/x86/kernel/head64.c | 6 +++++-
    1 file changed, 5 insertions(+), 1 deletion(-)

    diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
    index 7b215a5..c0a25e0 100644
    --- a/arch/x86/kernel/head64.c
    +++ b/arch/x86/kernel/head64.c
    @@ -87,6 +87,8 @@ void __init x86_64_start_kernel(char * real_mode_data)
    }
    load_idt((const struct desc_ptr *)&idt_descr);

    + copy_bootdata(__va(real_mode_data));
    +
    if (console_loglevel == 10)
    early_printk("Kernel alive\n");

    @@ -95,7 +97,9 @@ void __init x86_64_start_kernel(char * real_mode_data)

    void __init x86_64_start_reservations(char *real_mode_data)
    {
    - copy_bootdata(__va(real_mode_data));
    + /* version is always not zero if it is copied */
    + if (!boot_params.hdr.version)
    + copy_bootdata(__va(real_mode_data));

    memblock_reserve(__pa_symbol(_text),
    (unsigned long)__bss_stop - (unsigned long)_text);
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2013-01-04 03:21    [W:4.348 / U:0.708 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site