Skip to content

Commit 335e4dd

Browse files
jbeulichjgross1
authored andcommitted
xen/x86: obtain upper 32 bits of video frame buffer address for Dom0
The hypervisor has been supplying this information for a couple of major releases. Make use of it. The need to set a flag in the capabilities field also points out that the prior setting of that field from the hypervisor interface's gbl_caps one was wrong, so that code gets deleted (there's also no equivalent of this in native boot code). Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent ce2f46f commit 335e4dd

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

arch/x86/xen/vga.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,18 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
6262
break;
6363
}
6464

65-
if (size >= offsetof(struct dom0_vga_console_info,
66-
u.vesa_lfb.gbl_caps)
67-
+ sizeof(info->u.vesa_lfb.gbl_caps))
68-
screen_info->capabilities = info->u.vesa_lfb.gbl_caps;
6965
if (size >= offsetof(struct dom0_vga_console_info,
7066
u.vesa_lfb.mode_attrs)
7167
+ sizeof(info->u.vesa_lfb.mode_attrs))
7268
screen_info->vesa_attributes = info->u.vesa_lfb.mode_attrs;
69+
70+
if (size >= offsetof(struct dom0_vga_console_info,
71+
u.vesa_lfb.ext_lfb_base)
72+
+ sizeof(info->u.vesa_lfb.ext_lfb_base)
73+
&& info->u.vesa_lfb.ext_lfb_base) {
74+
screen_info->ext_lfb_base = info->u.vesa_lfb.ext_lfb_base;
75+
screen_info->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
76+
}
7377
break;
7478
}
7579
}

include/xen/interface/xen.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,9 @@ struct dom0_vga_console_info {
722722
uint32_t gbl_caps;
723723
/* Mode attributes (offset 0x0, VESA command 0x4f01). */
724724
uint16_t mode_attrs;
725+
uint16_t pad;
726+
/* high 32 bits of lfb_base */
727+
uint32_t ext_lfb_base;
725728
} vesa_lfb;
726729
} u;
727730
};

0 commit comments

Comments
 (0)