summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-09-21 18:30:35 +0200
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-09-24 15:24:20 +0200
commitffb8b233c2261b7978dc3bd759aaa19bd1a7fadf (patch)
tree63cced33b1740de8c02c871035a29c6ec5e1d0e8 /arch/x86
parentMerge branch 'stable/late-swiotlb.v3.3' into stable/for-linus-3.7 (diff)
downloadlinux-ffb8b233c2261b7978dc3bd759aaa19bd1a7fadf.tar.xz
linux-ffb8b233c2261b7978dc3bd759aaa19bd1a7fadf.zip
xen/x86: retrieve keyboard shift status flags from hypervisor.
The xen c/s 25873 allows the hypervisor to retrieve the NUMLOCK flag. With this patch, the Linux kernel can get the state according to the data in the BIOS. Acked-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/xen/enlighten.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 47b3acdc2ac5..67897152237c 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1440,11 +1440,19 @@ asmlinkage void __init xen_start_kernel(void)
const struct dom0_vga_console_info *info =
(void *)((char *)xen_start_info +
xen_start_info->console.dom0.info_off);
+ struct xen_platform_op op = {
+ .cmd = XENPF_firmware_info,
+ .interface_version = XENPF_INTERFACE_VERSION,
+ .u.firmware_info.type = XEN_FW_KBD_SHIFT_FLAGS,
+ };
xen_init_vga(info, xen_start_info->console.dom0.info_size);
xen_start_info->console.domU.mfn = 0;
xen_start_info->console.domU.evtchn = 0;
+ if (HYPERVISOR_dom0_op(&op) == 0)
+ boot_params.kbd_status = op.u.firmware_info.u.kbd_shift_flags;
+
xen_init_apic();
/* Make sure ACS will be enabled */