/* * * Common boot and setup code. * * Copyright (C) 2001 PPC64 Team, IBM Corp * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */#undef DEBUG#include<linux/config.h>#include<linux/module.h>#include<linux/string.h>#include<linux/sched.h>#include<linux/init.h>#include<linux/kernel.h>#include<linux/reboot.h>#include<linux/delay.h>#include<linux/initrd.h>#include<linux/ide.h>#include<linux/seq_file.h>#include<linux/ioport.h>#include<linux/console.h>#include<linux/version.h>#include<linux/tty.h>#include<linux/root_dev.h>#include<linux/notifier.h>#include<linux/cpu.h>#include<linux/unistd.h>#include<linux/serial.h>#include<linux/serial_8250.h>#include<asm/io.h>#include<asm/prom.h>#include<asm/processor.h>#include<asm/pgtable.h>#include<asm/bootinfo.h>#include<asm/smp.h>#include<asm/elf.h>#include<asm/machdep.h>#include<asm/paca.h>#include<asm/ppcdebug.h>#include<asm/time.h>#include<asm/cputable.h>#include<asm/sections.h>#include<asm/btext.h>#include<asm/nvram.h>#include<asm/setup.h>#include<asm/system.h>#include<asm/rtas.h>#include<asm/iommu.h>#include<asm/serial.h>#include<asm/cache.h>#include<asm/page.h>#include<asm/mmu.h>#include<asm/lmb.h>#include<asm/iSeries/ItLpNaca.h>#ifdef DEBUG#define DBG(fmt...) udbg_printf(fmt)#else#define DBG(fmt...)#endif/* * Here are some early debugging facilities. You can enable one * but your kernel will not boot on anything else if you do so *//* This one is for use on LPAR machines that support an HVC console * on vterm 0 */externvoidudbg_init_debug_lpar(void);/* This one is for use on Apple G5 machines */externvoidudbg_init_pmac_realmode(void);/* That's RTAS panel debug */externvoidcall_rtas_display_status_delay(unsignedcharc);/* Here's maple real mode debug */externvoidudbg_init_maple_realmode(void);#define EARLY_DEBUG_INIT() do {} while(0)#if 0#define EARLY_DEBUG_INIT() udbg_init_debug_lpar()#define EARLY_DEBUG_INIT() udbg_init_maple_realmode()#define EARLY_DEBUG_INIT() udbg_init_pmac_realmode()#define EARLY_DEBUG_INIT() \ do { ppc_md.udbg_putc = call_rtas_display_status_delay; } while(0)#endif/* extern void *stab; */externunsignedlongklimit;externvoidmm_init_ppc64(void);externvoidstab_initialize(unsignedlongstab);externvoidhtab_initialize(void);externvoidearly_init_devtree(void*flat_dt);externvoidunflatten_device_tree(void);externvoidsmp_release_cpus(void