mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 10:16:49 +07:00
0c51a965ed
This patch extracts the common part of head32.c and head64.c into head.c. Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: andi@firstfloor.org Cc: mingo@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
42 lines
1.1 KiB
C
42 lines
1.1 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/bios_ebda.h>
|
|
|
|
void __init i386_start_kernel(void)
|
|
{
|
|
reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "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
|
|
reserve_early(init_pg_tables_start, init_pg_tables_end,
|
|
"INIT_PG_TABLE");
|
|
|
|
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();
|
|
}
|