static void opd_26_init(void) { size_t i; size_t opd_buf_size; opd_create_vmlinux(vmlinux, kernel_range); opd_buf_size = opd_read_fs_int("/dev/oprofile/", "buffer_size", 1); kernel_pointer_size = opd_read_fs_int("/dev/oprofile/", "pointer_size", 1); s_buf_bytesize = opd_buf_size * kernel_pointer_size; sbuf = xmalloc(s_buf_bytesize); opd_reread_module_info(); for (i = 0; i < OPD_MAX_STATS; i++) opd_stats[i] = 0; perfmon_init(); cookie_init(); sfile_init(); anon_init(); /* must be /after/ perfmon_init() at least */ if (atexit(clean_exit)) { perfmon_exit(); perror("oprofiled: couldn't set exit cleanup: "); exit(EXIT_FAILURE); } }
static void opd_26_init(void) { size_t i; size_t opd_buf_size; unsigned long long start_time = 0ULL; struct timeval tv; opd_create_vmlinux(vmlinux, kernel_range); opd_create_xen(xenimage, xen_range); opd_buf_size = opd_read_fs_int("/dev/oprofile/", "buffer_size", 1); kernel_pointer_size = opd_read_fs_int("/dev/oprofile/", "pointer_size", 1); s_buf_bytesize = opd_buf_size * kernel_pointer_size; sbuf = xmalloc(s_buf_bytesize); opd_reread_module_info(); for (i = 0; i < OPD_MAX_STATS; i++) opd_stats[i] = 0; perfmon_init(); cookie_init(); sfile_init(); anon_init(); /* must be /after/ perfmon_init() at least */ if (atexit(clean_exit)) { perfmon_exit(); perror("oprofiled: couldn't set exit cleanup: "); exit(EXIT_FAILURE); } /* trigger kernel module setup before returning control to opcontrol */ opd_open_files(); gettimeofday(&tv, NULL); start_time = 0ULL; start_time = tv.tv_sec; sprintf(start_time_str, "%llu", start_time); }
static void bios_init(void) { KDEBUG(("bios_init()\n")); /* initialize Native Features, if available * do it as soon as possible so that kprintf can make use of them */ #if DETECT_NATIVE_FEATURES KDEBUG(("natfeat_init()\n")); natfeat_init(); #endif #if STONX_NATIVE_PRINT KDEBUG(("stonx_kprintf_init()\n")); stonx_kprintf_init(); #endif #if CONF_WITH_UAE KDEBUG(("amiga_uaelib_init()\n")); amiga_uaelib_init(); #endif /* Initialize the processor */ KDEBUG(("processor_init()\n")); processor_init(); /* Set CPU type, longframe and FPU type */ KDEBUG(("vecs_init()\n")); vecs_init(); /* setup all exception vectors (above) */ KDEBUG(("init_delay()\n")); init_delay(); /* set 'reasonable' default values for delay */ /* Detect optional hardware (video, sound, etc.) */ KDEBUG(("machine_detect()\n")); machine_detect(); /* detect hardware */ KDEBUG(("machine_init()\n")); machine_init(); /* initialise machine-specific stuff */ /* Initialize the screen */ KDEBUG(("screen_init()\n")); screen_init(); /* detect monitor type, ... */ /* Initialize the BIOS memory management */ KDEBUG(("bmem_init()\n")); bmem_init(); /* this must be done after screen_init() */ KDEBUG(("cookie_init()\n")); cookie_init(); /* sets a cookie jar */ KDEBUG(("fill_cookie_jar()\n")); fill_cookie_jar(); /* detect hardware features and fill the cookie jar */ /* Set up the BIOS console output */ KDEBUG(("linea_init()\n")); linea_init(); /* initialize screen related line-a variables */ font_init(); /* initialize font ring (requires cookie_akp) */ font_set_default(-1);/* set default font */ vt52_init(); /* initialize the vt52 console */ /* Now kcprintf() will also send debug info to the screen */ KDEBUG(("after vt52_init()\n")); /* misc. variables */ dumpflg = -1; sysbase = (LONG) os_entry; savptr = (LONG) trap_save_area; etv_timer = (void(*)(int)) just_rts; etv_critic = default_etv_critic; etv_term = just_rts; /* setup VBL queue */ nvbls = 8; vblqueue = vbl_list; { int i; for(i = 0 ; i < 8 ; i++) { vbl_list[i] = 0; } } #if CONF_WITH_MFP KDEBUG(("mfp_init()\n")); mfp_init(); #endif #if CONF_WITH_TT_MFP if (has_tt_mfp) { KDEBUG(("tt_mfp_init()\n")); tt_mfp_init(); } #endif /* Initialize the system 200 Hz timer */ KDEBUG(("init_system_timer()\n")); init_system_timer(); /* Initialize the RS-232 port(s) */ KDEBUG(("chardev_init()\n")); chardev_init(); /* Initialize low-memory bios vectors */ boot_status |= CHARDEV_AVAILABLE; /* track progress */ KDEBUG(("init_serport()\n")); init_serport(); boot_status |= RS232_AVAILABLE; /* track progress */ #if CONF_WITH_SCC if (has_scc) boot_status |= SCC_AVAILABLE; /* track progress */ #endif /* The sound init must be done before allowing MFC interrupts, * because of dosound stuff in the timer C interrupt routine. */ #if CONF_WITH_DMASOUND KDEBUG(("dmasound_init()\n")); dmasound_init(); #endif KDEBUG(("snd_init()\n")); snd_init(); /* Reset Soundchip, deselect floppies */ /* Init the two ACIA devices (MIDI and KBD). The three actions below can * be done in any order provided they happen before allowing MFP * interrupts. */ KDEBUG(("kbd_init()\n")); kbd_init(); /* init keyboard, disable mouse and joystick */ KDEBUG(("midi_init()\n")); midi_init(); /* init MIDI acia so that kbd acia irq works */ KDEBUG(("init_acia_vecs()\n")); init_acia_vecs(); /* Init the ACIA interrupt vector and related stuff */ KDEBUG(("after init_acia_vecs()\n")); boot_status |= MIDI_AVAILABLE; /* track progress */ /* Now we can enable the interrupts. * We need a timer for DMA timeouts in floppy and harddisk initialisation. * The VBL processing will be enabled later with the vblsem semaphore. */ #if CONF_WITH_ATARI_VIDEO /* Keep the HBL disabled */ set_sr(0x2300); #else set_sr(0x2000); #endif KDEBUG(("calibrate_delay()\n")); calibrate_delay(); /* determine values for delay() function */ /* - requires interrupts to be enabled */ KDEBUG(("blkdev_init()\n")); blkdev_init(); /* floppy and harddisk initialisation */ KDEBUG(("after blkdev_init()\n")); /* initialize BIOS components */ KDEBUG(("parport_init()\n")); parport_init(); /* parallel port */ //mouse_init(); /* init mouse driver */ KDEBUG(("clock_init()\n")); clock_init(); /* init clock */ KDEBUG(("after clock_init()\n")); #if CONF_WITH_NLS KDEBUG(("nls_init()\n")); nls_init(); /* init native language support */ nls_set_lang(get_lang_name()); #endif /* set start of user interface */ #if WITH_AES exec_os = ui_start; #elif WITH_CLI exec_os = coma_start; #else exec_os = NULL; #endif KDEBUG(("osinit()\n")); osinit(); /* initialize BDOS */ KDEBUG(("after osinit()\n")); boot_status |= DOS_AVAILABLE; /* track progress */ /* Enable VBL processing */ vblsem = 1; #if CONF_WITH_CARTRIDGE { WORD save_hz = v_hz_rez, save_vt = v_vt_rez, save_pl = v_planes; /* Run all boot applications from the application cartridge. * Beware: Hatari features a special cartridge which is used * for GEMDOS drive emulation. It will hack drvbits and hook Pexec(). * It will also hack Line A variables to enable extended VDI video modes. */ KDEBUG(("run_cartridge_applications(3)\n")); run_cartridge_applications(3); /* Type "Execute prior to bootdisk" */ KDEBUG(("after run_cartridge_applications()\n")); if ((v_hz_rez != save_hz) || (v_vt_rez != save_vt) || (v_planes != save_pl)) { set_rez_hacked(); font_set_default(-1); /* set default font */ vt52_init(); /* initialize the vt52 console */ } } #endif #if CONF_WITH_ALT_RAM #if CONF_WITH_FASTRAM /* add TT-RAM that was detected in memory.S */ if (ramtop != NULL) { KDEBUG(("xmaddalt()\n")); xmaddalt(FASTRAM_START, ramtop - FASTRAM_START); } #endif #if CONF_WITH_MONSTER /* Add MonSTer alt-RAM detected in machine.c */ if (has_monster) { /* Dummy read from MonSTer register to initiate write sequence. */ unsigned short monster_reg = *(volatile unsigned short *)MONSTER_REG; /* Only enable 6Mb when on a Mega STE due to address conflict with VME bus. Todo: This should be made configurable. */ if (has_vme) monster_reg = 6; else monster_reg = 8; /* Register write sequence: read - write - write */ *(volatile unsigned short *)MONSTER_REG = monster_reg; *(volatile unsigned short *)MONSTER_REG = monster_reg; KDEBUG(("xmaddalt()\n")); xmaddalt((UBYTE *)0x400000L, monster_reg*0x100000L); } #endif #ifdef MACHINE_AMIGA KDEBUG(("amiga_add_alt_ram()\n")); amiga_add_alt_ram(); #endif #endif /* CONF_WITH_ALT_RAM */ KDEBUG(("bios_init() end\n")); }