816c25e7d4
reserve_ebda_region needs to be called befor start_kernel. Moorestown needs to override it. Make it a x86_init_ops function and initialize it with the default reserve_ebda_region. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
/*
|
|
* linux/arch/i386/kernel/head32.c -- prepare to run common code
|
|
*
|
|
* Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
|
|
* Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com>
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/start_kernel.h>
|
|
|
|
#include <asm/setup.h>
|
|
#include <asm/sections.h>
|
|
#include <asm/e820.h>
|
|
#include <asm/page.h>
|
|
#include <asm/trampoline.h>
|
|
|
|
void __init i386_start_kernel(void)
|
|
{
|
|
reserve_trampoline_memory();
|
|
|
|
reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
|
|
|
|
#ifdef CONFIG_BLK_DEV_INITRD
|
|
/* Reserve INITRD */
|
|
if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
|
|
u64 ramdisk_image = boot_params.hdr.ramdisk_image;
|
|
u64 ramdisk_size = boot_params.hdr.ramdisk_size;
|
|
u64 ramdisk_end = ramdisk_image + ramdisk_size;
|
|
reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
|
|
}
|
|
#endif
|
|
/* Initilize 32bit specific setup functions */
|
|
x86_init.resources.probe_roms = probe_roms;
|
|
x86_init.resources.reserve_resources = i386_reserve_resources;
|
|
|
|
x86_init.resources.reserve_ebda_region();
|
|
|
|
/*
|
|
* At this point everything still needed from the boot loader
|
|
* or BIOS or kernel text should be early reserved or marked not
|
|
* RAM in e820. All other memory is free game.
|
|
*/
|
|
|
|
start_kernel();
|
|
}
|