diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-09-21 12:30:35 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-09-24 09:24:20 -0400 |
commit | ffb8b233c2261b7978dc3bd759aaa19bd1a7fadf (patch) | |
tree | 63cced33b1740de8c02c871035a29c6ec5e1d0e8 /arch/x86/xen/enlighten.c | |
parent | a5f95155709cb854e96aa27969d110668cdbda9d (diff) |
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/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 8 |
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) | |||
1440 | const struct dom0_vga_console_info *info = | 1440 | const struct dom0_vga_console_info *info = |
1441 | (void *)((char *)xen_start_info + | 1441 | (void *)((char *)xen_start_info + |
1442 | xen_start_info->console.dom0.info_off); | 1442 | xen_start_info->console.dom0.info_off); |
1443 | struct xen_platform_op op = { | ||
1444 | .cmd = XENPF_firmware_info, | ||
1445 | .interface_version = XENPF_INTERFACE_VERSION, | ||
1446 | .u.firmware_info.type = XEN_FW_KBD_SHIFT_FLAGS, | ||
1447 | }; | ||
1443 | 1448 | ||
1444 | xen_init_vga(info, xen_start_info->console.dom0.info_size); | 1449 | xen_init_vga(info, xen_start_info->console.dom0.info_size); |
1445 | xen_start_info->console.domU.mfn = 0; | 1450 | xen_start_info->console.domU.mfn = 0; |
1446 | xen_start_info->console.domU.evtchn = 0; | 1451 | xen_start_info->console.domU.evtchn = 0; |
1447 | 1452 | ||
1453 | if (HYPERVISOR_dom0_op(&op) == 0) | ||
1454 | boot_params.kbd_status = op.u.firmware_info.u.kbd_shift_flags; | ||
1455 | |||
1448 | xen_init_apic(); | 1456 | xen_init_apic(); |
1449 | 1457 | ||
1450 | /* Make sure ACS will be enabled */ | 1458 | /* Make sure ACS will be enabled */ |