~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/xen/vga.c

Version: ~ [ linux-5.12-rc7 ] ~ [ linux-5.11.13 ] ~ [ linux-5.10.29 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.111 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.186 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.230 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.266 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.266 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #include <linux/screen_info.h>
  2 #include <linux/init.h>
  3 
  4 #include <asm/bootparam.h>
  5 #include <asm/setup.h>
  6 
  7 #include <xen/interface/xen.h>
  8 
  9 #include "xen-ops.h"
 10 
 11 void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
 12 {
 13         struct screen_info *screen_info = &boot_params.screen_info;
 14 
 15         /* This is drawn from a dump from vgacon:startup in
 16          * standard Linux. */
 17         screen_info->orig_video_mode = 3;
 18         screen_info->orig_video_isVGA = 1;
 19         screen_info->orig_video_lines = 25;
 20         screen_info->orig_video_cols = 80;
 21         screen_info->orig_video_ega_bx = 3;
 22         screen_info->orig_video_points = 16;
 23         screen_info->orig_y = screen_info->orig_video_lines - 1;
 24 
 25         switch (info->video_type) {
 26         case XEN_VGATYPE_TEXT_MODE_3:
 27                 if (size < offsetof(struct dom0_vga_console_info, u.text_mode_3)
 28                     + sizeof(info->u.text_mode_3))
 29                         break;
 30                 screen_info->orig_video_lines = info->u.text_mode_3.rows;
 31                 screen_info->orig_video_cols = info->u.text_mode_3.columns;
 32                 screen_info->orig_x = info->u.text_mode_3.cursor_x;
 33                 screen_info->orig_y = info->u.text_mode_3.cursor_y;
 34                 screen_info->orig_video_points =
 35                         info->u.text_mode_3.font_height;
 36                 break;
 37 
 38         case XEN_VGATYPE_EFI_LFB:
 39         case XEN_VGATYPE_VESA_LFB:
 40                 if (size < offsetof(struct dom0_vga_console_info,
 41                                     u.vesa_lfb.gbl_caps))
 42                         break;
 43                 screen_info->orig_video_isVGA = VIDEO_TYPE_VLFB;
 44                 screen_info->lfb_width = info->u.vesa_lfb.width;
 45                 screen_info->lfb_height = info->u.vesa_lfb.height;
 46                 screen_info->lfb_depth = info->u.vesa_lfb.bits_per_pixel;
 47                 screen_info->lfb_base = info->u.vesa_lfb.lfb_base;
 48                 screen_info->lfb_size = info->u.vesa_lfb.lfb_size;
 49                 screen_info->lfb_linelength = info->u.vesa_lfb.bytes_per_line;
 50                 screen_info->red_size = info->u.vesa_lfb.red_size;
 51                 screen_info->red_pos = info->u.vesa_lfb.red_pos;
 52                 screen_info->green_size = info->u.vesa_lfb.green_size;
 53                 screen_info->green_pos = info->u.vesa_lfb.green_pos;
 54                 screen_info->blue_size = info->u.vesa_lfb.blue_size;
 55                 screen_info->blue_pos = info->u.vesa_lfb.blue_pos;
 56                 screen_info->rsvd_size = info->u.vesa_lfb.rsvd_size;
 57                 screen_info->rsvd_pos = info->u.vesa_lfb.rsvd_pos;
 58 
 59                 if (info->video_type == XEN_VGATYPE_EFI_LFB) {
 60                         screen_info->orig_video_isVGA = VIDEO_TYPE_EFI;
 61                         break;
 62                 }
 63 
 64                 if (size >= offsetof(struct dom0_vga_console_info,
 65                                      u.vesa_lfb.gbl_caps)
 66                     + sizeof(info->u.vesa_lfb.gbl_caps))
 67                         screen_info->capabilities = info->u.vesa_lfb.gbl_caps;
 68                 if (size >= offsetof(struct dom0_vga_console_info,
 69                                      u.vesa_lfb.mode_attrs)
 70                     + sizeof(info->u.vesa_lfb.mode_attrs))
 71                         screen_info->vesa_attributes = info->u.vesa_lfb.mode_attrs;
 72                 break;
 73         }
 74 }
 75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp