source: trunk/packages/xen-3.1/xen-3.1/linux-2.6-xen-sparse/arch/ia64/dig/setup.c @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 2.5 KB
Line 
1/*
2 * Platform dependent support for DIG64 platforms.
3 *
4 * Copyright (C) 1999 Intel Corp.
5 * Copyright (C) 1999, 2001 Hewlett-Packard Co
6 * Copyright (C) 1999, 2001, 2003 David Mosberger-Tang <davidm@hpl.hp.com>
7 * Copyright (C) 1999 VA Linux Systems
8 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
9 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
10 */
11
12#include <linux/init.h>
13#include <linux/delay.h>
14#include <linux/kernel.h>
15#include <linux/kdev_t.h>
16#include <linux/string.h>
17#include <linux/screen_info.h>
18#include <linux/console.h>
19#include <linux/timex.h>
20#include <linux/sched.h>
21#include <linux/root_dev.h>
22
23#include <asm/io.h>
24#include <asm/machvec.h>
25#include <asm/system.h>
26
27#include <xen/xencons.h>
28
29void __init
30dig_setup (char **cmdline_p)
31{
32        unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
33
34        /*
35         * Default to /dev/sda2.  This assumes that the EFI partition
36         * is physical disk 1 partition 1 and the Linux root disk is
37         * physical disk 1 partition 2.
38         */
39        ROOT_DEV = Root_SDA2;           /* default to second partition on first drive */
40
41#ifdef CONFIG_SMP
42        init_smp_config();
43#endif
44
45        memset(&screen_info, 0, sizeof(screen_info));
46
47        if (!ia64_boot_param->console_info.num_rows
48            || !ia64_boot_param->console_info.num_cols)
49        {
50                printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
51                orig_x = 0;
52                orig_y = 0;
53                num_cols = 80;
54                num_rows = 25;
55                font_height = 16;
56        } else {
57                orig_x = ia64_boot_param->console_info.orig_x;
58                orig_y = ia64_boot_param->console_info.orig_y;
59                num_cols = ia64_boot_param->console_info.num_cols;
60                num_rows = ia64_boot_param->console_info.num_rows;
61                font_height = 400 / num_rows;
62        }
63
64        screen_info.orig_x = orig_x;
65        screen_info.orig_y = orig_y;
66        screen_info.orig_video_cols  = num_cols;
67        screen_info.orig_video_lines = num_rows;
68        screen_info.orig_video_points = font_height;
69        screen_info.orig_video_mode = 3;        /* XXX fake */
70        screen_info.orig_video_isVGA = 1;       /* XXX fake */
71        screen_info.orig_video_ega_bx = 3;      /* XXX fake */
72#ifdef CONFIG_XEN
73        if (!is_running_on_xen() || !is_initial_xendomain())
74                return;
75
76        if (xen_start_info->console.dom0.info_size >=
77            sizeof(struct dom0_vga_console_info)) {
78                const struct dom0_vga_console_info *info =
79                        (struct dom0_vga_console_info *)(
80                                (char *)xen_start_info +
81                                xen_start_info->console.dom0.info_off);
82                dom0_init_screen_info(info);
83        }
84        xen_start_info->console.domU.mfn = 0;
85        xen_start_info->console.domU.evtchn = 0;
86#endif
87}
Note: See TracBrowser for help on using the repository browser.