Beispiel #1
0
void __init
setup_arch(char **cmdline_p)
{
        /*
         * print what head.S has found out about the machine
         */
#ifndef CONFIG_64BIT
	if (MACHINE_IS_VM)
		pr_info("Linux is running as a z/VM "
			"guest operating system in 31-bit mode\n");
	else if (MACHINE_IS_LPAR)
		pr_info("Linux is running natively in 31-bit mode\n");
	if (MACHINE_HAS_IEEE)
		pr_info("The hardware system has IEEE compatible "
			"floating point units\n");
	else
		pr_info("The hardware system has no IEEE compatible "
			"floating point units\n");
#else /* CONFIG_64BIT */
	if (MACHINE_IS_VM)
		pr_info("Linux is running as a z/VM "
			"guest operating system in 64-bit mode\n");
	else if (MACHINE_IS_KVM)
		pr_info("Linux is running under KVM in 64-bit mode\n");
	else if (MACHINE_IS_LPAR)
		pr_info("Linux is running natively in 64-bit mode\n");
#endif /* CONFIG_64BIT */

	/* Have one command line that is parsed and saved in /proc/cmdline */
	/* boot_command_line has been already set up in early.c */
	*cmdline_p = boot_command_line;

        ROOT_DEV = Root_RAM0;

	init_mm.start_code = PAGE_OFFSET;
	init_mm.end_code = (unsigned long) &_etext;
	init_mm.end_data = (unsigned long) &_edata;
	init_mm.brk = (unsigned long) &_end;

	if (MACHINE_HAS_MVCOS)
		memcpy(&uaccess, &uaccess_mvcos, sizeof(uaccess));
	else
		memcpy(&uaccess, &uaccess_std, sizeof(uaccess));

	parse_early_param();

	setup_ipl();
	setup_memory_end();
	setup_addressing_mode();
	setup_memory();
	setup_resources();
	setup_lowcore();

        cpu_init();
	s390_init_cpu_topology();

	/*
	 * Setup capabilities (ELF_HWCAP & ELF_PLATFORM).
	 */
	setup_hwcaps();

	/*
	 * Create kernel page tables and switch to virtual addressing.
	 */
        paging_init();

        /* Setup default console */
	conmode_default();
	set_preferred_console();

	/* Setup zfcpdump support */
	setup_zfcpdump(console_devno);
}
Beispiel #2
0
void __init
setup_arch(char **cmdline_p)
{
        /*
         * print what head.S has found out about the machine
         */
#ifndef CONFIG_64BIT
    printk((MACHINE_IS_VM) ?
           "We are running under VM (31 bit mode)\n" :
           "We are running native (31 bit mode)\n");
    printk((MACHINE_HAS_IEEE) ?
           "This machine has an IEEE fpu\n" :
           "This machine has no IEEE fpu\n");
#else /* CONFIG_64BIT */
    if (MACHINE_IS_VM)
        printk("We are running under VM (64 bit mode)\n");
    else if (MACHINE_IS_KVM) {
        printk("We are running under KVM (64 bit mode)\n");
        add_preferred_console("ttyS", 1, NULL);
    } else
        printk("We are running native (64 bit mode)\n");
#endif /* CONFIG_64BIT */

    /* Save unparsed command line copy for /proc/cmdline */
    strlcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);

    *cmdline_p = COMMAND_LINE;
    *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0';

        ROOT_DEV = Root_RAM0;

    init_mm.start_code = PAGE_OFFSET;
    init_mm.end_code = (unsigned long) &_etext;
    init_mm.end_data = (unsigned long) &_edata;
    init_mm.brk = (unsigned long) &_end;

    if (MACHINE_HAS_MVCOS)
        memcpy(&uaccess, &uaccess_mvcos, sizeof(uaccess));
    else
        memcpy(&uaccess, &uaccess_std, sizeof(uaccess));

    parse_early_param();

    setup_ipl();
    setup_memory_end();
    setup_addressing_mode();
    setup_memory();
    setup_resources();
    setup_lowcore();

        cpu_init();
        __cpu_logical_map[0] = S390_lowcore.cpu_data.cpu_addr;
    s390_init_cpu_topology();

    /*
     * Setup capabilities (ELF_HWCAP & ELF_PLATFORM).
     */
    setup_hwcaps();

    /*
     * Create kernel page tables and switch to virtual addressing.
     */
        paging_init();

        /* Setup default console */
    conmode_default();

    /* Setup zfcpdump support */
    setup_zfcpdump(console_devno);
}