lkml.org 
[lkml]   [2008]   [Mar]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 30 Mar 2008 01:15:21 -0700
From"Yinghai Lu" <>
SubjectRe: [PATCH 2/4] x86_64 boot -v2: Add linked list of struct setup_data
On Thu, Mar 27, 2008 at 7:49 PM, Huang, Ying <ying.huang@intel.com> wrote:
> This patch add a field of 64-bit physical pointer to NULL terminated
>  single linked list of struct setup_data to real-mode kernel
>  header. This is used as a more extensible boot parameters passing
>  mechanism.
>
>  Signed-off-by: Huang Ying <ying.huang@intel.com>
>
>  ---
>   arch/x86/boot/header.S      |    6 +++++-
>   arch/x86/kernel/head64.c    |   20 ++++++++++++++++++++
>   arch/x86/kernel/setup_64.c  |   22 ++++++++++++++++++++++
>   include/asm-x86/bootparam.h |   14 ++++++++++++++
>   4 files changed, 61 insertions(+), 1 deletion(-)
>
...
>  +static void __init reserve_setup_data(void)
>  +{
>  +       struct setup_data *data;
>  +       unsigned long pa_data;
>  +       char buf[32];
>  +
>  +       if (boot_params.hdr.version < 0x0209)
>  +               return;
>  +       pa_data = boot_params.hdr.setup_data;
>  +       while (pa_data) {
>  +               data = early_ioremap(pa_data, sizeof(*data));
>  +               sprintf(buf, "setup data %x", data->type);
>  +               reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
>  +               pa_data = data->next;
>  +               early_iounmap(data, sizeof(*data));
>  +       }

current reserve_early will have limitation with 20 entries.

/*
 * Early reserved memory areas.
 */
#define MAX_EARLY_RES 20

or we need to make reserve_early a little bit smart, so it could merge
continuous region...
and then your free_early need to be updated too.

YH


\
 
 \ /
  Last update: 2008-03-30 10:17    [from the cache]
©2003-2008