Exemple #1
0
void setup_misc(void)
{
	extern const uint32_t mboot_info;

	struct multiboot_info *pmboot_info = (void *)((uintptr_t)mboot_info);

	setup_memory_map(pmboot_info);
	setup_cmdline(pmboot_info);
}
Exemple #2
0
void __init setup_arch(char **cmdline_p)
{
#ifdef CONFIG_64BIT
	extern int parisc_narrow_firmware;
#endif
	unwind_init();

	init_per_cpu(smp_processor_id());	/* Set Modes & Enable FP */

#ifdef CONFIG_64BIT
	printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else
	printk(KERN_INFO "The 32-bit Kernel has started...\n");
#endif

	printk(KERN_INFO "Default page size is %dKB.\n", (int)(PAGE_SIZE / 1024));

	pdc_console_init();

#ifdef CONFIG_64BIT
	if(parisc_narrow_firmware) {
		printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
	}
#endif
	setup_pdc();
	setup_cmdline(cmdline_p);
	collect_boot_cpu_data();
	do_memory_inventory();  /* probe for physical memory */
	parisc_cache_init();
	paging_init();

#ifdef CONFIG_CHASSIS_LCD_LED
	/* initialize the LCD/LED after boot_cpu_data is available ! */
	led_init();		/* LCD/LED initialization */
#endif

#ifdef CONFIG_PA11
	dma_ops_init();
#endif

#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
	conswitchp = &dummy_con;	/* we use take_over_console() later ! */
#endif

}
Exemple #3
0
void
_main(void) {
	
	shdr = (struct startup_header *)boot_args.shdr_addr;

	board_init();

	setup_cmdline();

	cpu_startup();

	#define INIT_SYSPAGE_SIZE 0x600
	init_syspage_memory(ws_alloc(INIT_SYSPAGE_SIZE), INIT_SYSPAGE_SIZE);

	if(shdr->imagefs_paddr != 0) {
		avoid_ram(shdr->imagefs_paddr, shdr->stored_size);
	}

	main(_argc, _argv, envv);

	//
	// Tell the mini-drivers that the next time they're called, they're
	// going to be in the kernel. Also flip the handler & data pointers
	// to the proper values for that environment.
	//
	mdriver_hook();

	//
	// Copy the local version of the system page we've built to the real
	// system page location we allocated in init_system_private().
	//
	write_syspage_memory();

	//
	// Tell the AP's that that the syspage is now present.
	//
	smp_hook_rtn();

	startnext();
}
Exemple #4
0
void __init setup_arch(char **cmdline_p)
{
	init_per_cpu(smp_processor_id());	/* Set Modes & Enable FP */

#ifdef __LP64__
	printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else
	printk(KERN_INFO "The 32-bit Kernel has started...\n");
#endif

	pdc_console_init();

#ifdef CONFIG_PDC_NARROW
	printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
#endif
	setup_pdc();
	setup_cmdline(cmdline_p);
	collect_boot_cpu_data();
	do_memory_inventory();  /* probe for physical memory */
	cache_init();
	paging_init();

#ifdef CONFIG_CHASSIS_LCD_LED
	/* initialize the LCD/LED after boot_cpu_data is available ! */
        led_init();				/* LCD/LED initialization */
#endif

#ifdef CONFIG_PA11
	dma_ops_init();
#endif

#ifdef CONFIG_VT
# if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
        conswitchp = &dummy_con;        /* we use take_over_console() later ! */
# endif
#endif

}
Exemple #5
0
Fichier : main.c Projet : BrEacK/mc
gboolean
do_load_prompt (void)
{
    gboolean ret = FALSE;

    if (!read_subshell_prompt ())
        return ret;

    /* Don't actually change the prompt if it's invisible */
    if (top_dlg != NULL && ((Dlg_head *) top_dlg->data == midnight_dlg) && command_prompt)
    {
        setup_cmdline ();

        /* since the prompt has changed, and we are called from one of the
         * tty_get_event channels, the prompt updating does not take place
         * automatically: force a cursor update and a screen refresh
         */
        update_cursor (midnight_dlg);
        mc_refresh ();
        ret = TRUE;
    }
    update_subshell_prompt = TRUE;
    return ret;
}
Exemple #6
0
void __init setup_arch(char **cmdline_p)
{
#ifdef CONFIG_64BIT
	extern int parisc_narrow_firmware;
#endif
	unwind_init();

	init_per_cpu(smp_processor_id());	/* Set Modes & Enable FP */

#ifdef CONFIG_64BIT
	printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else
	printk(KERN_INFO "The 32-bit Kernel has started...\n");
#endif

	printk(KERN_INFO "Kernel default page size is %d KB. Huge pages ",
		(int)(PAGE_SIZE / 1024));
#ifdef CONFIG_HUGETLB_PAGE
	printk(KERN_CONT "enabled with %d MB physical and %d MB virtual size",
		 1 << (REAL_HPAGE_SHIFT - 20), 1 << (HPAGE_SHIFT - 20));
#else
	printk(KERN_CONT "disabled");
#endif
	printk(KERN_CONT ".\n");

	/*
	 * Check if initial kernel page mappings are sufficient.
	 * panic early if not, else we may access kernel functions
	 * and variables which can't be reached.
	 */
	if (__pa((unsigned long) &_end) >= KERNEL_INITIAL_SIZE)
		panic("KERNEL_INITIAL_ORDER too small!");

	pdc_console_init();

#ifdef CONFIG_64BIT
	if(parisc_narrow_firmware) {
		printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
	}
#endif
	setup_pdc();
	setup_cmdline(cmdline_p);
	collect_boot_cpu_data();
	do_memory_inventory();  /* probe for physical memory */
	parisc_cache_init();
	paging_init();

#ifdef CONFIG_CHASSIS_LCD_LED
	/* initialize the LCD/LED after boot_cpu_data is available ! */
	led_init();		/* LCD/LED initialization */
#endif

#ifdef CONFIG_PA11
	dma_ops_init();
#endif

#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
	conswitchp = &dummy_con;	/* we use do_take_over_console() later ! */
#endif

	clear_sched_clock_stable();
}
Exemple #7
0
Fichier : layout.c Projet : m32/mc
void
setup_panels (void)
{
    int start_y;

    if (mc_global.tty.console_flag != '\0')
    {
        int minimum;

        if (output_lines < 0)
            output_lines = 0;
        height =
            LINES - mc_global.keybar_visible - (command_prompt ? 1 : 0) - menubar_visible -
            output_lines - mc_global.message_visible;
        minimum = MINHEIGHT * (1 + panels_layout.horizontal_split);
        if (height < minimum)
        {
            output_lines -= minimum - height;
            height = minimum;
        }
    }
    else
    {
        height =
            LINES - menubar_visible - (command_prompt ? 1 : 0) - mc_global.keybar_visible -
            mc_global.message_visible;
    }

    check_split (&panels_layout);
    start_y = menubar_visible;

    /* The column computing is deferred until panel_do_cols */
    if (panels_layout.horizontal_split)
    {
        widget_set_size (panels[0].widget, start_y, 0, panels_layout.top_panel_size, 0);
        widget_set_size (panels[1].widget, start_y + panels_layout.top_panel_size, 0,
                         height - panels_layout.top_panel_size, 0);
    }
    else
    {
        widget_set_size (panels[0].widget, start_y, 0, height, 0);
        widget_set_size (panels[1].widget, start_y, panels_layout.left_panel_size, height, 0);
    }

    panel_do_cols (0);
    panel_do_cols (1);

    widget_set_size (WIDGET (the_menubar), 0, 0, 1, COLS);

    if (command_prompt)
    {
#ifdef ENABLE_SUBSHELL
        if (!mc_global.tty.use_subshell || !do_load_prompt ())
#endif
            setup_cmdline ();
    }
    else
    {
        widget_set_size (WIDGET (cmdline), 0, 0, 0, 0);
        widget_set_size (WIDGET (the_prompt), LINES, COLS, 0, 0);
    }

    widget_set_size (WIDGET (the_bar), LINES - 1, 0, mc_global.keybar_visible, COLS);
    buttonbar_set_visible (the_bar, mc_global.keybar_visible);

    /* Output window */
    if (mc_global.tty.console_flag != '\0' && output_lines)
    {
        output_start_y = LINES - (command_prompt ? 1 : 0) - mc_global.keybar_visible - output_lines;
        show_console_contents (output_start_y,
                               LINES - output_lines - mc_global.keybar_visible - 1,
                               LINES - mc_global.keybar_visible - 1);
    }

    if (mc_global.message_visible)
        widget_set_size (WIDGET (the_hint), height + start_y, 0, 1, COLS);
    else
        widget_set_size (WIDGET (the_hint), 0, 0, 0, 0);

    update_xterm_title_path ();
}