aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/platform_hypercall.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-12 10:17:34 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-12 10:17:34 +0200
commit7aa9625cc4b549a6316b43c5f07cc2dec1d7a8ce (patch)
treeef21c0647953f717ea89209808c7ddbd5b5adf88 /xen/arch/x86/platform_hypercall.c
parent9badeb5dcd4deaebcab6d736943b8ffc2afdacb3 (diff)
downloadxen-7aa9625cc4b549a6316b43c5f07cc2dec1d7a8ce.tar.gz
xen-7aa9625cc4b549a6316b43c5f07cc2dec1d7a8ce.tar.bz2
xen-7aa9625cc4b549a6316b43c5f07cc2dec1d7a8ce.zip
x86: retrieve keyboard shift status flags from BIOS
Recent Linux tries to make use of this, and has no way of getting at these bits without Xen assisting it. There doesn't appear to be a way to obtain the same information from UEFI. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/platform_hypercall.c')
-rw-r--r--xen/arch/x86/platform_hypercall.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c
index 88880b0d63..d75a83f2bc 100644
--- a/xen/arch/x86/platform_hypercall.c
+++ b/xen/arch/x86/platform_hypercall.c
@@ -29,6 +29,7 @@
#include <asm/edd.h>
#include <asm/mtrr.h>
#include <asm/io_apic.h>
+#include <asm/setup.h>
#include "cpu/mtrr/mtrr.h"
#include <xsm/xsm.h>
@@ -319,6 +320,18 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op)
u.firmware_info.u.efi_info) )
ret = -EFAULT;
break;
+ case XEN_FW_KBD_SHIFT_FLAGS:
+ ret = -ESRCH;
+ if ( op->u.firmware_info.index != 0 )
+ break;
+
+ op->u.firmware_info.u.kbd_shift_flags = bootsym(kbd_shift_flags);
+
+ ret = 0;
+ if ( copy_field_to_guest(u_xenpf_op, op,
+ u.firmware_info.u.kbd_shift_flags) )
+ ret = -EFAULT;
+ break;
default:
ret = -EINVAL;
break;