Commit | Line | Data |
---|---|---|
700efc1b EB |
1 | /* |
2 | * linux/arch/i386/kernel/head32.c -- prepare to run common code | |
3 | * | |
4 | * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE | |
5 | * Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com> | |
6 | */ | |
7 | ||
8 | #include <linux/init.h> | |
9 | #include <linux/start_kernel.h> | |
10 | ||
a4c81cf6 YL |
11 | #include <asm/setup.h> |
12 | #include <asm/sections.h> | |
13 | #include <asm/e820.h> | |
816c25e7 | 14 | #include <asm/page.h> |
3e1e9002 | 15 | #include <asm/trampoline.h> |
de934103 TG |
16 | #include <asm/apic.h> |
17 | #include <asm/io_apic.h> | |
a4c81cf6 | 18 | |
700efc1b EB |
19 | void __init i386_start_kernel(void) |
20 | { | |
3e1e9002 RW |
21 | reserve_trampoline_memory(); |
22 | ||
93dbda7c | 23 | reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS"); |
a4c81cf6 YL |
24 | |
25 | #ifdef CONFIG_BLK_DEV_INITRD | |
26 | /* Reserve INITRD */ | |
27 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { | |
28 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; | |
29 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; | |
30 | u64 ramdisk_end = ramdisk_image + ramdisk_size; | |
31 | reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); | |
32 | } | |
33 | #endif | |
f7cf5a5b TG |
34 | /* Initilize 32bit specific setup functions */ |
35 | x86_init.resources.probe_roms = probe_roms; | |
8fee697d | 36 | x86_init.resources.reserve_resources = i386_reserve_resources; |
de934103 | 37 | x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc; |
f7cf5a5b | 38 | |
816c25e7 | 39 | x86_init.resources.reserve_ebda_region(); |
a4c81cf6 YL |
40 | |
41 | /* | |
42 | * At this point everything still needed from the boot loader | |
43 | * or BIOS or kernel text should be early reserved or marked not | |
44 | * RAM in e820. All other memory is free game. | |
45 | */ | |
46 | ||
700efc1b EB |
47 | start_kernel(); |
48 | } |