Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
- index ec5b082f3de6..9d0d956b7fbb 100644
- --- a/arch/arm/xen/enlighten.c
- +++ b/arch/arm/xen/enlighten.c
- @@ -67,6 +67,52 @@ static __read_mostly phys_addr_t xen_grant_frames;
- uint32_t xen_start_flags;
- EXPORT_SYMBOL(xen_start_flags);
- +static void __init xen_init_vga(void)
- +{
- + struct xen_platform_op op = {
- + .cmd = XENPF_firmware_info,
- + .interface_version = XENPF_INTERFACE_VERSION,
- + .u.firmware_info.type = XEN_FW_VGA_INFO,
- + };
- + const struct dom0_vga_console_info *info;
- +
- + if (HYPERVISOR_platform_op(&op) != 0)
- + return;
- +
- + info = &op.u.firmware_info.u.vga;
- +
- + /* This is drawn from a dump from vgacon:startup in
- + * standard Linux. */
- + screen_info.orig_video_mode = 3;
- + screen_info.orig_video_isVGA = 1;
- + screen_info.orig_video_lines = 25;
- + screen_info.orig_video_cols = 80;
- + screen_info.orig_video_ega_bx = 3;
- + screen_info.orig_video_points = 16;
- + screen_info.orig_y = screen_info.orig_video_lines - 1;
- +
- + switch (info->video_type) {
- + case XEN_VGATYPE_EFI_LFB:
- + screen_info.orig_video_isVGA = VIDEO_TYPE_EFI;
- + screen_info.lfb_width = info->u.vesa_lfb.width;
- + screen_info.lfb_height = info->u.vesa_lfb.height;
- + screen_info.lfb_depth = info->u.vesa_lfb.bits_per_pixel;
- + screen_info.lfb_base = info->u.vesa_lfb.lfb_base;
- + screen_info.lfb_size = info->u.vesa_lfb.lfb_size;
- + screen_info.lfb_linelength = info->u.vesa_lfb.bytes_per_line;
- + screen_info.red_size = info->u.vesa_lfb.red_size;
- + screen_info.red_pos = info->u.vesa_lfb.red_pos;
- + screen_info.green_size = info->u.vesa_lfb.green_size;
- + screen_info.green_pos = info->u.vesa_lfb.green_pos;
- + screen_info.blue_size = info->u.vesa_lfb.blue_size;
- + screen_info.blue_pos = info->u.vesa_lfb.blue_pos;
- + screen_info.rsvd_size = info->u.vesa_lfb.rsvd_size;
- + screen_info.rsvd_pos = info->u.vesa_lfb.rsvd_pos;
- +
- + break;
- + }
- +}
- +
- int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
- int nr, struct page **pages)
- {
- @@ -455,6 +501,8 @@ static int __init xen_guest_init(void)
- if (efi_enabled(EFI_RUNTIME_SERVICES))
- xen_efi_runtime_setup();
- + xen_init_vga();
- +
- shared_info_page = (struct shared_info *)get_zeroed_page(GFP_KERNEL);
- if (!shared_info_page) {
- diff --git a/include/xen/interface/platform.h b/include/xen/interface/platform.h
- index 655d92e803e1..5f5cef820a21 100644
- --- a/include/xen/interface/platform.h
- +++ b/include/xen/interface/platform.h
- @@ -206,6 +206,7 @@ DEFINE_GUEST_HANDLE_STRUCT(xenpf_efi_runtime_call);
- #define XEN_FW_VBEDDC_INFO 3 /* from int 10 AX=4f15 */
- #define XEN_FW_EFI_INFO 4 /* from EFI */
- #define XEN_FW_KBD_SHIFT_FLAGS 5 /* Int16, Fn02: Get keyboard shift flags. */
- +#define XEN_FW_VGA_INFO 6
- struct xenpf_firmware_info {
- /* IN variables. */
- @@ -259,6 +260,8 @@ struct xenpf_firmware_info {
- } efi_info; /* XEN_FW_EFI_INFO */
- uint8_t kbd_shift_flags; /* XEN_FW_KBD_SHIFT_FLAGS */
- +
- + struct dom0_vga_console_info vga;
- } u;
- };
- DEFINE_GUEST_HANDLE_STRUCT(xenpf_firmware_info_t);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement