From c464b02c90e448ea45772709f741dbcde6c8a08c Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Sun, 13 Sep 2020 17:36:40 +0600 Subject: [PATCH] [NTOS:PNP] Install mouse driver on NEC PC-98 series (#3173) The current implementation of device tree enumeration does not distinguish between possible identifier strings. This change is not a hack, NT 5.2 still creates a new device node for this hardware ID. The entire function should be rewritten to match Windows implementation. --- ntoskrnl/io/pnpmgr/pnpmgr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c index ac9d71a9b99..50e608e3730 100644 --- a/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1065,7 +1065,15 @@ IopEnumerateDetectedDevices( UNICODE_STRING HardwareIdKeyboard = RTL_CONSTANT_STRING(L"*PNP0303\0"); static ULONG DeviceIndexKeyboard = 0; const UNICODE_STRING IdentifierMouse = RTL_CONSTANT_STRING(L"PointerController"); + /* FIXME: IopEnumerateDetectedDevices() should be rewritten. + * The PnP identifiers can either be hardcoded or parsed from a LegacyXlate + * sections of driver INF files. + */ +#if defined(SARCH_PC98) + UNICODE_STRING HardwareIdMouse = RTL_CONSTANT_STRING(L"*nEC1F00\0"); +#else UNICODE_STRING HardwareIdMouse = RTL_CONSTANT_STRING(L"*PNP0F13\0"); +#endif static ULONG DeviceIndexMouse = 0; const UNICODE_STRING IdentifierParallel = RTL_CONSTANT_STRING(L"ParallelController"); UNICODE_STRING HardwareIdParallel = RTL_CONSTANT_STRING(L"*PNP0400\0");