/**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(char*str,int*ints);#endif#ifdefined(CONFIG_SYSVIPC)externvoidipc_init(void);#endif#ifdefined
(CONFIG_QUOTA)externvoiddquot_init_hash(void);#endif#ifdefCONFIG_MD_BOOTexternvoidmd_setup(char*str,int*ints)__init;#endif/**Bootcommand-linearguments*/#defineM
AX_INIT_ARGS8#defineMAX_INIT_ENVS8externvoidtime_init(void);staticunsignedlongmemory_start=0;staticunsignedlongmemory_end=0;introws,cols;#ifdefCONFIG_BLK_DEV_RA
Mexternintrd_doload;/*1=loadramdisk,0=don'tload*/externintrd_prompt;/*1=promptforramdisk,0=don'tprompt*/externintrd_size;/*Sizeoftheramdisk(s)*/externintrd_imag
e_start;/*startingblock#ofimage*/#ifdefCONFIG_BLK_DEV_INITRDkdev_treal_root_dev;#endif#endifintroot_mountflags=MS_RDONLY;char*execute_command=NULL;staticchar*ar
gv_init[MAX_INIT_ARGS+2]={"init",NULL,};staticchar*envp_init[MAX_INIT_ENVS+2]={"HOME=/","TERM=linux",NULL,};char*get_options(char*str,int*ints){char*cur=str;int
i=1;while(cur&&(*cur=='-'||isdigit(*cur))&&i<=10){ints[i++]=simple_strtol(cur,NULL,0);if((cur=strchr(cur,','))!=NULL)cur++;}ints[0]=i-1;return(cur);}staticvoid_
_initprofile_setup(char*str,int*ints){if(ints[0]>0)prof_shift=(unsignedlong)ints[1];elseprof_shift=2;}staticstructdev_name_struct{constchar*name;constintnum;}ro
ot_dev_names[]__initdata={#ifdefCONFIG_ROOT_NFS{"nfs",0x00ff},#endif#ifdefCONFIG_BLK_DEV_IDE{"hda",0x0300},{"hdb",0x0340},{"hdc",0x1600},{"hdd",0x1640},{"hde",0
x2100},{"hdf",0x2140},{"hdg",0x2200},{"hdh",0x2240},{"hdi",0x3800},{"hdj",0x3840},{"hdk",0x3900},{"hdl",0x3940},#endif#ifdefCONFIG_BLK_DEV_SD{"sda",0x0800},{"sd
b",0x0810},{"sdc",0x0820},{"sdd",0x0830},{"sde",0x0840},{"sdf",0x0850},{"sdg",0x0860},{"sdh",0x0870},{"sdi",0x0880},{"sdj",0x0890},{"sdk",0x08a0},{"sdl",0x08b0}
,{"sdm",0x08c0},{"sdn",0x08d0},{"sdo",0x08e0},{"sdp",0x08f0},#endif#ifdefCONFIG_ATARI_ACSI{"ada",0x1c00},{"adb",0x1c10},{"adc",0x1c20},{"add",0x1c30},{"ade",0x1
c40},#endif#ifdefCONFIG_BLK_DEV_FD{"fd",0x0200},#endif#ifdefCONFIG_MD_BOOT{"md",0x0900},#endif#ifdefCONFIG_BLK_DEV_XD{"xda",0x0d00},{"xdb",0x0d40},#endif#ifdefC
ONFIG_BLK_DEV_RAM{"ram",0x0100},#endif#ifdefCONFIG_BLK_DEV_SR{"scd",0x0b00},#endif#ifdefCONFIG_MCD{"mcd",0x1700},#endif#ifdefCONFIG_CDU535{"cdu535",0x1800},{"so
nycd",0x1800},#endif#ifdefCONFIG_AZTCD{"aztcd",0x1d00},#endif#ifdefCONFIG_CM206{"cm206cd",0x2000},#endif#ifdefCONFIG_GSCD{"gscd",0x1000},#endif#ifdefCONFIG_SBPC
D{"sbpcd",0x1900},#endif#ifdefCONFIG_BLK_DEV_PS2{"eda",0x2400},{"edb",0x2440},#endif#ifdefCONFIG_PARIDE_PD{"pda",0x2d00},{"pdb",0x2d10},{"pdc",0x2d20},{"pdd",0x
2d30},#endif#ifdefCONFIG_PARIDE_PCD{"pcd",0x2e00},#endif#ifdefCONFIG_PARIDE_PF{"pf",0x2f00},#endif#ifCONFIG_APBLOCK{"apblock",APBLOCK_MAJOR<<8},#endif#ifCONFIG_
DDV{"ddv",DDV_MAJOR<<8},#endif{NULL,0}};kdev_t__initname_to_kdev_t(char*line){intbase=0;if(strncmp(line,"/dev/",5)==0){structdev_name_struct*dev=root_dev_names;
line+=5;do{intlen=strlen(dev->name);if(strncmp(line,dev->name,len)==0){line+=len;base=dev->num;break;}dev++;}while(dev->name);}returnto_kdev_t(base+simple_strto
ul(line,NULL,base?10:16));}staticvoid__initroot_dev_setup(char*line,int*num){ROOT_DEV=name_to_kdev_t(line);}/**Listofkernelcommandlineparameters.Thefirsttableli
stsparameters*whicharesubjecttovaluesparsing(leadingnumbersareconvertedto*anarrayofintsandchoppedoffthestring),thesecondtablecontains*thefewexceptionswhichobeyt
heirownsyntaxrules.*/structkernel_param{constchar*str;void(*setup_func)(char*,int*);};staticstructkernel_paramcooked_params[]__initdata={/*FIXME:makePNPjustbeco
mereserve_setup*/#ifndefCONFIG_KERNEL_PNP_RESOURCE{"reserve=",reserve_setup},#else{"reserve=",pnp_reserve_setup},#endif{"profile=",profile_setup},#ifdef__SMP__{
"nosmp",smp_setup},{"maxcpus=",smp_setup},#ifdefCONFIG_X86_IO_APIC{"noapic",ioapic_setup},{"pirq=",ioapic_pirq_setup},#endif#endif#ifdefCONFIG_BLK_DEV_RAM{"ramd
isk_start=",ramdisk_start_setup},{"load_ramdisk=",load_ramdisk},{"prompt_ramdisk=",prompt_ramdisk},{"ramdisk=",ramdisk_size},{"ramdisk_size=",ramdisk_size},#ifd
efCONFIG_BLK_DEV_INITRD{"noinitrd",no_initrd},#endif#endif#ifdefCONFIG_FB{"video=",video_setup},#endif{"panic=",panic_setup},{"console=",console_setup},#ifdefCO
NFIG_VGA_CONSOLE{"no-scroll",no_scroll},#endif#ifdefCONFIG_MDA_CONSOLE{"mdacon=",mdacon_setup},#endif#ifdefCONFIG_VT{"kbd-reset",kbd_reset_setup},#endif#ifdefCO
NFIG_BUGi386{"no-hlt",no_halt},{"no387",no_387},{"reboot=",reboot_setup},#endif#ifdefCONFIG_INET{"ether=",eth_setup},#endif#ifdefCONFIG_ARCNET_COM20020{"com2002

 

An other use of Urban's name

Generatore di nomi arabi

E-m@il: info _at_ urbands _dot_ net

hacker emblem

I nostri consigli:
BuyOn: Cashback dai tuoi acquisti online

DreamHost: Shared web hosting, VPS hosting, Dedicated hosting, WordPress hosting, Cloud storage & Cloud computing
Netsons: Hosting, VPS & Web solutions

360onlineprint.it: stampa online

Licenza Creative Commons
Quest'opera รจ distribuita con Licenza Creative Commons Attribuzione - Non commerciale - Non opere derivate 4.0 Internazionale.