/**linux/init/main.c**Copyright(C)1991,1992LinusTorvalds**GK2/5/95-ChangedtosupportmountingrootfsviaNFS*Addedinitrd&change_root:WernerAlmesberger&HansLermen,Feb '96*Moanearlyifgccisold,avoidingboguskernels-PaulGortmaker,May'96*Simplifiedstartingofinit:MichaelA.Griffith<grif@acm.org>*/#define__KERNEL_SYSCALLS__#include<l inux/config.h>#include<linux/proc_fs.h>#include<linux/unistd.h>#include<linux/ctype.h>#include<linux/delay.h>#include<linux/utsname.h>#include<linux/ioport.h>#i nclude<linux/init.h>#include<linux/smp_lock.h>#include<linux/blk.h>#include<linux/hdreg.h>#include<asm/io.h>#include<asm/bugs.h>#ifdefCONFIG_PCI#include<linux/p ci.h>#endif#ifdefCONFIG_DIO#include<linux/dio.h>#endif#ifdefCONFIG_ZORRO#include<linux/zorro.h>#endif#ifdefCONFIG_MTRR#include<asm/mtrr.h>#endif#ifdefCONFIG_APM #include<linux/apm_bios.h>#endif/**Versionsofgccolderthanthatlistedbelowmayactuallycompile*andlinkokay,buttheendproductcanhavesubtleruntimebugs.*Toavoidassociat edbogusbugreports,weflatlyrefusetocompile*withagccthatisknowntobetoooldfromtheverybeginning.*/#if__GNUC__<2||(__GNUC__==2&&__GNUC_MINOR__<6)#errorsorry,yourGCCi stooold.Itbuildsincorrectkernels.#endifexternchar_stext,_etext;externchar*linux_banner;externintconsole_loglevel;staticintinit(void*);externintbdflush(void*);ex ternintkswapd(void*);externvoidkswapd_setup(void);externvoidinit_IRQ(void);externvoidinit_modules(void);externlongconsole_init(long,long);externvoidsock_init(vo id);externvoiduidcache_init(void);externvoidmca_init(void);externvoidsbus_init(void);externvoidpowermac_init(void);externvoidsysctl_init(void);externvoidfilesca che_init(void);externvoidsignals_init(void);externvoiddevice_setup(void);externvoidbinfmt_setup(void);externvoidfree_initmem(void);externvoidfilesystem_setup(vo id);#ifdefCONFIG_ARCH_ACORNexternvoidecard_init(void);#endifexternvoidsmp_setup(char*str,int*ints);#ifdef__i386__externvoidioapic_pirq_setup(char*str,int*ints); externvoidioapic_setup(char*str,int*ints);#endifexternvoidno_scroll(char*str,int*ints);externvoidkbd_reset_setup(char*str,int*ints);externvoidpanic_setup(char*s tr,int*ints);externvoidbmouse_setup(char*str,int*ints);externvoidmsmouse_setup(char*str,int*ints);externvoidconsole_setup(char*str,int*ints);#ifdefCONFIG_PRINTE Rexternvoidlp_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_AMIGAexternvoidjs_am_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_ANALOGexternvoidjs_an_setup(c har*str,int*ints);#endif#ifdefCONFIG_JOY_ASSASINexternvoidjs_as_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_CONSOLEexternvoidjs_console_setup(char*str,int*i nts);#endif#ifdefCONFIG_JOY_DB9externvoidjs_db9_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_TURBOGRAFXexternvoidjs_tg_setup(char*str,int*ints);#endif#ifdefC ONFIG_JOY_LIGHTNINGexternvoidjs_l4_setup(char*str,int*ints);#endifexternvoideth_setup(char*str,int*ints);#ifdefCONFIG_ARCNET_COM20020externvoidcom20020_setup(ch ar*str,int*ints);#endif#ifdefCONFIG_ARCNET_RIM_Iexternvoidarcrimi_setup(char*str,int*ints);#endif#ifdefCONFIG_ARCNET_COM90xxIOexternvoidcom90io_setup(char*str,i nt*ints);#endif#ifdefCONFIG_ARCNET_COM90xxexternvoidcom90xx_setup(char*str,int*ints);#endif#ifdefCONFIG_DECNETexternvoiddecnet_setup(char*str,int*ints);#endif#i fdefCONFIG_BLK_DEV_XDexternvoidxd_setup(char*str,int*ints);externvoidxd_manual_geo_init(char*str,int*ints);#endif#ifdefCONFIG_BLK_DEV_IDEexternvoidide_setup(cha r*);#endif#ifdefCONFIG_PARIDE_PDexternvoidpd_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PFexternvoidpf_setup(char*str,int*ints);#endif#ifdefCONFIG_PARID E_PTexternvoidpt_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PGexternvoidpg_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PCDexternvoidpcd_setup(cha r*str,int*ints);#endifexternvoidfloppy_setup(char*str,int*ints);externvoidst_setup(char*str,int*ints);externvoidst0x_setup(char*str,int*ints);externvoidadvansys _setup(char*str,int*ints);externvoidtmc8xx_setup(char*str,int*ints);externvoidt128_setup(char*str,int*ints);externvoidpas16_setup(char*str,int*ints);externvoidg eneric_NCR5380_setup(char*str,int*intr);externvoidgeneric_NCR53C400_setup(char*str,int*intr);externvoidgeneric_NCR53C400A_setup(char*str,int*intr);externvoidgen eric_DTC3181E_setup(char*str,int*intr);externvoidaha152x_setup(char*str,int*ints);externvoidaha1542_setup(char*str,int*ints);externvoidgdth_setup(char*str,int*i nts);externvoidaic7xxx_setup(char*str,int*ints);externvoidAM53C974_setup(char*str,int*ints);externvoidBusLogic_Setup(char*str,int*ints);externvoidncr53c8xx_setu p(char*str,int*ints);externvoideata2x_setup(char*str,int*ints);externvoidu14_34f_setup(char*str,int*ints);externvoidfdomain_setup(char*str,int*ints);externvoidi bmmca_scsi_setup(char*str,int*ints);externvoidin2000_setup(char*str,int*ints);externvoidNCR53c406a_setup(char*str,int*ints);externvoidwd7000_setup(char*str,int* ints);externvoiddc390_setup(char*str,int*ints);externvoidscsi_luns_setup(char*str,int*ints);externvoidscsi_logging_setup(char*str,int*ints);externvoidsound_setu p(char*str,int*ints);externvoidreboot_setup(char*str,int*ints);externvoidvideo_setup(char*str,int*ints);#ifdefCONFIG_CDU31Aexternvoidcdu31a_setup(char*str,int*i nts);#endifCONFIG_CDU31A#ifdefCONFIG_BLK_DEV_PS2externvoided_setup(char*str,int*ints);externvoidtp720_setup(char*str,int*ints);#endifCONFIG_BLK_DEV_PS2#ifdefCON FIG_MCDexternvoidmcd_setup(char*str,int*ints);#endifCONFIG_MCD#ifdefCONFIG_MCDXexternvoidmcdx_setup(char*str,int*ints);#endifCONFIG_MCDX#ifdefCONFIG_SBPCDextern voidsbpcd_setup(char*str,int*ints);#endifCONFIG_SBPCD#ifdefCONFIG_AZTCDexternvoidaztcd_setup(char*str,int*ints);#endifCONFIG_AZTCD#ifdefCONFIG_CDU535externvoids onycd535_setup(char*str,int*ints);#endifCONFIG_CDU535#ifdefCONFIG_GSCDexternvoidgscd_setup(char*str,int*ints);#endifCONFIG_GSCD#ifdefCONFIG_CM206externvoidcm206 _setup(char*str,int*ints);#endifCONFIG_CM206#ifdefCONFIG_OPTCDexternvoidoptcd_setup(char*str,int*ints);#endifCONFIG_OPTCD#ifdefCONFIG_SJCDexternvoidsjcd_setup(c har*str,int*ints);#endifCONFIG_SJCD#ifdefCONFIG_ISP16_CDIexternvoidisp16_setup(char*str,int*ints);#endifCONFIG_ISP16_CDI#ifdefCONFIG_BLK_DEV_RAMstaticvoidramdis k_start_setup(char*str,int*ints);staticvoidload_ramdisk(char*str,int*ints);staticvoidprompt_ramdisk(char*str,int*ints);staticvoidramdisk_size(char*str,int*ints) ;#ifdefCONFIG_BLK_DEV_INITRDstaticvoidno_initrd(char*s,int*ints);#endif#endifCONFIG_BLK_DEV_RAM#ifdefCONFIG_ISDN_DRV_ICNexternvoidicn_setup(char*str,int*ints);# endif#ifdefCONFIG_ISDN_DRV_HISAXexternvoidHiSax_setup(char*str,int*ints);#endif#ifdefCONFIG_DIGIEPCAexternvoidepca_setup(char*str,int*ints);#endif#ifdefCONFIG_I SDN_DRV_PCBITexternvoidpcbit_setup(char*str,int*ints);#endif#ifdefCONFIG_ATARIMOUSEexternvoidatari_mouse_setup(char*str,int*ints);#endif#ifdefCONFIG_DMASOUNDext ernvoiddmasound_setup(char*str,int*ints);#endif#ifdefCONFIG_ATARI_SCSIexternvoidatari_scsi_setup(char*str,int*ints);#endifexternvoidstram_swap_setup(char*str,in t*ints);externvoidwd33c93_setup(char*str,int*ints);externvoidgvp11_setup(char*str,int*ints);externvoidncr53c7xx_setup(char*str,int*ints);#ifdefCONFIG_MAC_SCSIex ternvoidmac_scsi_setup(char*str,int*ints);#endif#ifdefCONFIG_CYCLADESexternvoidcy_setup(char*str,int*ints);#endif#ifdefCONFIG_DIGIexternvoidpcxx_setup(char*str, int*ints);#endif#ifdefCONFIG_RISCOM8externvoidriscom8_setup(char*str,int*ints);#endif#ifdefCONFIG_SPECIALIXexternvoidspecialix_setup(char*str,int*ints);#endif#i fdefCONFIG_DMASCCexternvoiddmascc_setup(char*str,int*ints);#endif#ifdefCONFIG_BAYCOM_PARexternvoidbaycom_par_setup(char*str,int*ints);#endif#ifdefCONFIG_BAYCOM_ SER_FDXexternvoidbaycom_ser_fdx_setup(char*str,int*ints);#endif#ifdefCONFIG_BAYCOM_SER_HDXexternvoidbaycom_ser_hdx_setup(char*str,int*ints);#endif#ifdefCONFIG_S OUNDMODEMexternvoidsm_setup(char*str,int*ints);#endif#ifdefCONFIG_ADBMOUSEexternvoidadb_mouse_setup(char*str,int*ints);#endif#ifdefCONFIG_WDTexternvoidwdt_setup (char*str,int*ints);#endif#ifdefCONFIG_PARPORTexternvoidparport_setup(char*str,int*ints);#endif#ifdefCONFIG_PLIPexternvoidplip_setup(char*str,int*ints);#endif#i fdefCONFIG_HFMODEMexternvoidhfmodem_setup(char*str,int*ints);#endif#ifdefCONFIG_IP_PNPexternvoidip_auto_config_setup(char*str,int*ints);#endif#ifdefCONFIG_ROOT_ NFSexternvoidnfs_root_setup(char*str,int*ints);#endif#ifdefCONFIG_FTAPEexternvoidftape_setup(char*str,int*ints);#endif#ifdefCONFIG_MDA_CONSOLEexternvoidmdacon_s etup(char*str,int*ints);#endif#ifdefCONFIG_LTPCexternvoidltpc_setup(