setup.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/init.h>
  12. #include <linux/delay.h>
  13. #include <linux/kernel.h>
  14. #include <linux/kdev_t.h>
  15. #include <linux/string.h>
  16. #include <linux/screen_info.h>
  17. #include <linux/console.h>
  18. #include <linux/timex.h>
  19. #include <linux/sched.h>
  20. #include <linux/root_dev.h>
  21. #include <asm/io.h>
  22. #include <asm/machvec.h>
  23. #include <asm/setup.h>
  24. void __init
  25. dig_setup (char **cmdline_p)
  26. {
  27. unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
  28. /*
  29. * Default to /dev/sda2. This assumes that the EFI partition
  30. * is physical disk 1 partition 1 and the Linux root disk is
  31. * physical disk 1 partition 2.
  32. */
  33. ROOT_DEV = Root_SDA2; /* default to second partition on first drive */
  34. #ifdef CONFIG_SMP
  35. init_smp_config();
  36. #endif
  37. memset(&screen_info, 0, sizeof(screen_info));
  38. if (!ia64_boot_param->console_info.num_rows
  39. || !ia64_boot_param->console_info.num_cols)
  40. {
  41. printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
  42. orig_x = 0;
  43. orig_y = 0;
  44. num_cols = 80;
  45. num_rows = 25;
  46. font_height = 16;
  47. } else {
  48. orig_x = ia64_boot_param->console_info.orig_x;
  49. orig_y = ia64_boot_param->console_info.orig_y;
  50. num_cols = ia64_boot_param->console_info.num_cols;
  51. num_rows = ia64_boot_param->console_info.num_rows;
  52. font_height = 400 / num_rows;
  53. }
  54. screen_info.orig_x = orig_x;
  55. screen_info.orig_y = orig_y;
  56. screen_info.orig_video_cols = num_cols;
  57. screen_info.orig_video_lines = num_rows;
  58. screen_info.orig_video_points = font_height;
  59. screen_info.orig_video_mode = 3; /* XXX fake */
  60. screen_info.orig_video_isVGA = 1; /* XXX fake */
  61. screen_info.orig_video_ega_bx = 3; /* XXX fake */
  62. }