mirror of
https://git.freebsd.org/ports.git
synced 2025-06-18 03:00:42 -04:00
While there also update SeaBIOS to 1.16.1. Sponsored by: Citrix Systems R&D Approved by: bapt (implicit)
84 lines
2.8 KiB
Diff
84 lines
2.8 KiB
Diff
From 4dd160583c798d3a5a451ea74633836891d15354 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= <roger.pau@citrix.com>
|
|
Date: Tue, 6 Dec 2022 13:53:43 +0100
|
|
Subject: [PATCH] x86/platform: introduce hypercall to get initial video
|
|
console settings
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
This is required so PVH dom0 can get the initial video console state
|
|
as handled by Xen. PV dom0 will get this as part of the start_info,
|
|
but it doesn't seem necessary to place such information in the
|
|
HVM start info.
|
|
|
|
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
|
|
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
|
---
|
|
xen/arch/x86/platform_hypercall.c | 11 +++++++++++
|
|
xen/drivers/video/vga.c | 2 +-
|
|
xen/include/public/platform.h | 6 ++++++
|
|
3 files changed, 18 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c
|
|
index a7341dc3d7..3f0d0389af 100644
|
|
--- a/xen/arch/x86/platform_hypercall.c
|
|
+++ b/xen/arch/x86/platform_hypercall.c
|
|
@@ -839,6 +839,17 @@ ret_t do_platform_op(
|
|
}
|
|
break;
|
|
|
|
+ case XENPF_get_dom0_console:
|
|
+ if ( !fill_console_start_info(&op->u.dom0_console) )
|
|
+ {
|
|
+ ret = -ENODEV;
|
|
+ break;
|
|
+ }
|
|
+
|
|
+ if ( copy_field_to_guest(u_xenpf_op, op, u.dom0_console) )
|
|
+ ret = -EFAULT;
|
|
+ break;
|
|
+
|
|
default:
|
|
ret = -ENOSYS;
|
|
break;
|
|
diff --git a/xen/drivers/video/vga.c b/xen/drivers/video/vga.c
|
|
index 29a88e8241..0a03508bee 100644
|
|
--- a/xen/drivers/video/vga.c
|
|
+++ b/xen/drivers/video/vga.c
|
|
@@ -205,7 +205,7 @@ static void cf_check vga_text_puts(const char *s, size_t nr)
|
|
}
|
|
}
|
|
|
|
-int __init fill_console_start_info(struct dom0_vga_console_info *ci)
|
|
+int fill_console_start_info(struct dom0_vga_console_info *ci)
|
|
{
|
|
memcpy(ci, &vga_console_info, sizeof(*ci));
|
|
return 1;
|
|
diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
|
|
index 5e1494fe9a..14784dfa77 100644
|
|
--- a/xen/include/public/platform.h
|
|
+++ b/xen/include/public/platform.h
|
|
@@ -605,6 +605,11 @@ struct xenpf_symdata {
|
|
typedef struct xenpf_symdata xenpf_symdata_t;
|
|
DEFINE_XEN_GUEST_HANDLE(xenpf_symdata_t);
|
|
|
|
+/* Fetch the video console information and mode setup by Xen. */
|
|
+#define XENPF_get_dom0_console 64
|
|
+typedef struct dom0_vga_console_info xenpf_dom0_console_t;
|
|
+DEFINE_XEN_GUEST_HANDLE(xenpf_dom0_console_t);
|
|
+
|
|
/*
|
|
* ` enum neg_errnoval
|
|
* ` HYPERVISOR_platform_op(const struct xen_platform_op*);
|
|
@@ -635,6 +640,7 @@ struct xen_platform_op {
|
|
xenpf_core_parking_t core_parking;
|
|
xenpf_resource_op_t resource_op;
|
|
xenpf_symdata_t symdata;
|
|
+ xenpf_dom0_console_t dom0_console;
|
|
uint8_t pad[128];
|
|
} u;
|
|
};
|
|
--
|
|
2.39.0
|
|
|