Skip to content

Commit f34c4f2

Browse files
jbeulichjgross1
authored andcommitted
xen/x86: obtain full video frame buffer address for Dom0 also under EFI
The initial change would not work when Xen was booted from EFI: There is an early exit from the case block in that case. Move the necessary code ahead of that. Fixes: 335e4dd ("xen/x86: obtain upper 32 bits of video frame buffer address for Dom0") Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent e25a8d9 commit f34c4f2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/x86/xen/vga.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
5757
screen_info->rsvd_size = info->u.vesa_lfb.rsvd_size;
5858
screen_info->rsvd_pos = info->u.vesa_lfb.rsvd_pos;
5959

60+
if (size >= offsetof(struct dom0_vga_console_info,
61+
u.vesa_lfb.ext_lfb_base)
62+
+ sizeof(info->u.vesa_lfb.ext_lfb_base)
63+
&& info->u.vesa_lfb.ext_lfb_base) {
64+
screen_info->ext_lfb_base = info->u.vesa_lfb.ext_lfb_base;
65+
screen_info->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
66+
}
67+
6068
if (info->video_type == XEN_VGATYPE_EFI_LFB) {
6169
screen_info->orig_video_isVGA = VIDEO_TYPE_EFI;
6270
break;
@@ -66,14 +74,6 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
6674
u.vesa_lfb.mode_attrs)
6775
+ sizeof(info->u.vesa_lfb.mode_attrs))
6876
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-
}
7777
break;
7878
}
7979
}

0 commit comments

Comments
 (0)