Paul Durrant [Thu, 1 Feb 2018 14:33:14 +0000 (14:33 +0000)]
Dynamically build key-code to usage map
This patch creates a header defining the linux keycodes used by the
vkbd protocol and macros to map those (by name) to HID usage codes.
A new function then makes use of these of the new definitions and macros
to create a direct mapping from key-code to usage dynamically during
ring initialization.
The patch also adds missing locking inside the DPC and a shutdown race
which could occasionally free the ring structure from underneath the DPC.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Wed, 31 Jan 2018 17:06:11 +0000 (17:06 +0000)]
Fix HID code for KEY_ENTER
The VkbdKeyCodeToUsage array has the value for KEY_ESCAPE (0x29)
incorrectly placed in this entry. This patch replaces that with 0x28, which
is the correct code for the ENTER key.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Thu, 25 Jan 2018 14:11:08 +0000 (14:11 +0000)]
Make sure Mdl->StartVa is set by __AllocatePages()
wdm.h carries this comment:
// Notice that while in the context of the subject thread, the base virtual
// address of a buffer mapped by an MDL may be referenced using the
// following:
//
// Mdl->StartVa | Mdl->ByteOffset
//
Hence it is important that a mapped MDL has a valid StartVa field as well
as a valid MappedSystemVa field. Unfortunately, for reasons best known to
Microsoft, MmMapLockedPagesSpecifyCache() does not ensure this is the
case, so it needs to be fixed up by __AllocatePages() itself.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Owen Smith [Thu, 20 Jul 2017 11:22:54 +0000 (12:22 +0100)]
Update kbdif.h and use feature-raw-pointer
Updates the xen public header to include the definition of
[feature|request]-raw-pointer.
Renames VkbdStandalone to RawPointer and uses the newly defined feature
and request names.
Paul Durrant [Mon, 12 Jun 2017 10:15:21 +0000 (11:15 +0100)]
Remove the SDV run from build.py
SDV appears to be broken for this driver as follows:
SDV is building for <Windows 10 Release|x64>
Build 'xenvkbd' ... Done
The call to Slamcl returned with exit code:=1.
This happened while compiling compile6.cmd.
The compile step failed for 'xenvkbd' .
SDV exit code: 5
SDV encountered errors when scanning the driver. Please ensure roletypes are present and/or consult SDV documentation.
C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(120,9): error MSB3075: The command "staticdv.exe /check:default.sdv" exited with code 5. Please verify that you have sufficient rights to run this command. [C:\Jenkins\Workspace\XENVKBD-master\vs2015\xenvkbd\xenvkbd.vcxproj]
Done Building Project "C:\Jenkins\Workspace\XENVKBD-master\vs2015\xenvkbd\xenvkbd.vcxproj" (sdv target(s)) -- FAILED.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>