ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/dig/setup.c @ 11257:8293018c1a24

[IA64] only setup extra vga console support on dom0

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Wed Aug 23 11:14:52 2006 -0600 (2006-08-23)
parents 3e75d9b1d556
children d8bceca5f07d
line source
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 #include <linux/config.h>
13 #include <linux/init.h>
14 #include <linux/delay.h>
15 #include <linux/kernel.h>
16 #include <linux/kdev_t.h>
17 #include <linux/string.h>
18 #include <linux/tty.h>
19 #include <linux/console.h>
20 #include <linux/timex.h>
21 #include <linux/sched.h>
22 #include <linux/root_dev.h>
24 #include <asm/io.h>
25 #include <asm/machvec.h>
26 #include <asm/system.h>
28 void __init
29 dig_setup (char **cmdline_p)
30 {
31 unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
33 /*
34 * Default to /dev/sda2. This assumes that the EFI partition
35 * is physical disk 1 partition 1 and the Linux root disk is
36 * physical disk 1 partition 2.
37 */
38 ROOT_DEV = Root_SDA2; /* default to second partition on first drive */
40 #ifdef CONFIG_SMP
41 init_smp_config();
42 #endif
44 memset(&screen_info, 0, sizeof(screen_info));
46 if (!ia64_boot_param->console_info.num_rows
47 || !ia64_boot_param->console_info.num_cols)
48 {
49 printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
50 orig_x = 0;
51 orig_y = 0;
52 num_cols = 80;
53 num_rows = 25;
54 font_height = 16;
55 } else {
56 orig_x = ia64_boot_param->console_info.orig_x;
57 orig_y = ia64_boot_param->console_info.orig_y;
58 num_cols = ia64_boot_param->console_info.num_cols;
59 num_rows = ia64_boot_param->console_info.num_rows;
60 font_height = 400 / num_rows;
61 }
63 screen_info.orig_x = orig_x;
64 screen_info.orig_y = orig_y;
65 screen_info.orig_video_cols = num_cols;
66 screen_info.orig_video_lines = num_rows;
67 screen_info.orig_video_points = font_height;
68 screen_info.orig_video_mode = 3; /* XXX fake */
69 screen_info.orig_video_isVGA = 1; /* XXX fake */
70 screen_info.orig_video_ega_bx = 3; /* XXX fake */
71 #ifdef CONFIG_XEN
72 if (!is_running_on_xen() || !is_initial_xendomain())
73 return;
75 if (xen_start_info->console.dom0.info_size >=
76 sizeof(struct dom0_vga_console_info)) {
77 const struct dom0_vga_console_info *info =
78 (struct dom0_vga_console_info *)(
79 (char *)xen_start_info +
80 xen_start_info->console.dom0.info_off);
81 screen_info.orig_video_mode = info->txt_mode;
82 screen_info.orig_video_isVGA = info->video_type;
83 screen_info.orig_video_lines = info->video_height;
84 screen_info.orig_video_cols = info->video_width;
85 screen_info.orig_video_points = info->txt_points;
86 screen_info.lfb_width = info->video_width;
87 screen_info.lfb_height = info->video_height;
88 screen_info.lfb_depth = info->lfb_depth;
89 screen_info.lfb_base = info->lfb_base;
90 screen_info.lfb_size = info->lfb_size;
91 screen_info.lfb_linelength = info->lfb_linelen;
92 screen_info.red_size = info->red_size;
93 screen_info.red_pos = info->red_pos;
94 screen_info.green_size = info->green_size;
95 screen_info.green_pos = info->green_pos;
96 screen_info.blue_size = info->blue_size;
97 screen_info.blue_pos = info->blue_pos;
98 screen_info.rsvd_size = info->rsvd_size;
99 screen_info.rsvd_pos = info->rsvd_pos;
100 }
101 screen_info.orig_y = screen_info.orig_video_lines - 1;
102 xen_start_info->console.domU.mfn = 0;
103 xen_start_info->console.domU.evtchn = 0;
104 #endif
105 }
107 void __init
108 dig_irq_init (void)
109 {
110 }