ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
31 participants
165 discussions
Start a n
N
ew thread
[reactos] 01/01: [BUSLOGIC] Fix reference link to VMware driver source page
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5ee633f7d7e34b513b7f4…
commit 5ee633f7d7e34b513b7f4ee27e07c8e9a2ee0fca Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Fri May 13 17:24:02 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Fri May 13 17:24:02 2022 +0300 [BUSLOGIC] Fix reference link to VMware driver source page - Clarify driver version in 3rd Party Files. - Fix some minor formatting problems. - Also add missing OBJ_KERNEL_HANDLE to match Zw*() uses. (#4499) CORE-10207 CORE-18180 Co-authored-by: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> --- drivers/storage/port/buslogic/BT958.mof | 26 +++++++++++++------------- drivers/storage/port/buslogic/BusLogic958.rc | 6 +++--- drivers/storage/port/buslogic/Log.c | 4 ++-- drivers/storage/port/buslogic/README.ReactOS | 4 +++- media/doc/3rd Party Files.txt | 4 ++-- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/storage/port/buslogic/BT958.mof b/drivers/storage/port/buslogic/BT958.mof index 3566f0e23dc..878e09e9bcb 100644 --- a/drivers/storage/port/buslogic/BT958.mof +++ b/drivers/storage/port/buslogic/BT958.mof @@ -12,19 +12,19 @@ class BT958ExtendedSetupInfoGuid [read,key] String InstanceName; [read] boolean Active; - [read, WmiDataId(1), WmiVersion(1)] uint8 BusType; - [read, WmiDataId(2), WmiVersion(1)] uint8 BIOS_Address; - [read, WmiDataId(3), WmiVersion(1)] uint16 ScatterGatherLimit; - [read, WmiDataId(4), WmiVersion(1)] uint8 MailboxCount; - [read, WmiDataId(5), WmiVersion(1)] uint32 BaseMailboxAddress; - [read, WmiDataId(6), WmiVersion(1)] boolean FastOnEISA; - [read, WmiDataId(7), WmiVersion(1)] boolean LevelSensitiveInterrupt; - [read, WmiDataId(8), WmiVersion(1), max(3)] uint8 FirmwareRevision[]; - [read, WmiDataId(9), WmiVersion(1)] boolean HostWideSCSI; - [read, WmiDataId(10), WmiVersion(1)] boolean HostDifferentialSCSI; - [read, WmiDataId(11), WmiVersion(1)] boolean HostSupportsSCAM; - [read, WmiDataId(12), WmiVersion(1)] boolean HostUltraSCSI; - [read, WmiDataId(13), WmiVersion(1)] boolean HostSmartTermination; + [read, WmiDataId(1), WmiVersion(1)] uint8 BusType; + [read, WmiDataId(2), WmiVersion(1)] uint8 BIOS_Address; + [read, WmiDataId(3), WmiVersion(1)] uint16 ScatterGatherLimit; + [read, WmiDataId(4), WmiVersion(1)] uint8 MailboxCount; + [read, WmiDataId(5), WmiVersion(1)] uint32 BaseMailboxAddress; + [read, WmiDataId(6), WmiVersion(1)] boolean FastOnEISA; + [read, WmiDataId(7), WmiVersion(1)] boolean LevelSensitiveInterrupt; + [read, WmiDataId(8), WmiVersion(1), max(3)] uint8 FirmwareRevision[]; + [read, WmiDataId(9), WmiVersion(1)] boolean HostWideSCSI; + [read, WmiDataId(10), WmiVersion(1)] boolean HostDifferentialSCSI; + [read, WmiDataId(11), WmiVersion(1)] boolean HostSupportsSCAM; + [read, WmiDataId(12), WmiVersion(1)] boolean HostUltraSCSI; + [read, WmiDataId(13), WmiVersion(1)] boolean HostSmartTermination; }; diff --git a/drivers/storage/port/buslogic/BusLogic958.rc b/drivers/storage/port/buslogic/BusLogic958.rc index 777aace2945..02a1fdddc67 100644 --- a/drivers/storage/port/buslogic/BusLogic958.rc +++ b/drivers/storage/port/buslogic/BusLogic958.rc @@ -81,18 +81,18 @@ MOFRESOURCE MOFDATA "BT958.bmf" // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/drivers/storage/port/buslogic/Log.c b/drivers/storage/port/buslogic/Log.c index 47f138f948c..944ee5574e4 100644 --- a/drivers/storage/port/buslogic/Log.c +++ b/drivers/storage/port/buslogic/Log.c @@ -25,7 +25,7 @@ BOOLEAN LogMessage(PCHAR szFormat, ...) fileName.Length = 0; fileName.MaximumLength = sizeof(DEFAULT_LOG_FILE_NAME) + sizeof(UNICODE_NULL); fileName.Buffer = ExAllocatePool(PagedPool, - fileName.MaximumLength); + fileName.MaximumLength); if (!fileName.Buffer) { return FALSE; @@ -37,7 +37,7 @@ BOOLEAN LogMessage(PCHAR szFormat, ...) InitializeObjectAttributes (&objectAttributes, (PUNICODE_STRING)&fileName, - OBJ_CASE_INSENSITIVE, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL ); diff --git a/drivers/storage/port/buslogic/README.ReactOS b/drivers/storage/port/buslogic/README.ReactOS index 1af58010501..952cc69174e 100644 --- a/drivers/storage/port/buslogic/README.ReactOS +++ b/drivers/storage/port/buslogic/README.ReactOS @@ -1,5 +1,7 @@ This code was published by VMware on their website at -http://www.vmware.com/download/open_sources.html. The intro there says: +https://customerconnect.vmware.com/downloads/details?productId=23&downloadGroup=SERVER-SCSI-OS + +The intro there says: This open source software is licensed under the terms of various open source license agreements included with the materials relating to the open source diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt index 772f9dcd072..f9c9e611729 100644 --- a/media/doc/3rd Party Files.txt +++ b/media/doc/3rd Party Files.txt @@ -147,9 +147,9 @@ URL:
http://alter.org.ua/soft/win/uni_ata/
Title: Miniport driver for the Buslogic BT 958 SCSI Controller Path: drivers/storage/port/buslogic -Used Version: ??? +Used Version: v1.2.0.2 (2005-08-17) License: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later.html
) -URL:
http://www.vmware.com/download/open_sources.html
+URL:
https://customerconnect.vmware.com/downloads/details?productId=23&downloadG…
Title: AC97 Sample Driver Path: drivers/wdm/audio/drivers/ac97
2 years, 7 months
1
0
0
0
[reactos] 01/01: [KBDJA] Fix key names (#4507)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6fec06b8e50051dce11ba…
commit 6fec06b8e50051dce11ba9857fc782849c13adbc Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu May 12 20:39:56 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu May 12 20:39:56 2022 +0900 [KBDJA] Fix key names (#4507) They will be used at user32!GetKeyNameText function. CORE-11700 --- dll/keyboard/kbdja/kbdja.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c index 4566a1cf2bf..ac081050918 100644 --- a/dll/keyboard/kbdja/kbdja.c +++ b/dll/keyboard/kbdja/kbdja.c @@ -279,12 +279,13 @@ ROSDATA VSC_LPWSTR key_names[] = { { 0x0f, L"Tab" }, { 0x1c, L"Enter" }, { 0x1d, L"Ctrl" }, + { 0x29, L"\u534A\u89D2/\u5168\u89D2" }, /* Hankaku/Zenkaku */ { 0x2a, L"Shift" }, { 0x36, L"Right Shift" }, { 0x37, L"Num *" }, { 0x38, L"Alt" }, { 0x39, L"Space" }, - { 0x3a, L"CAPLOK Lock" }, + { 0x3a, L"Caps Lock" }, { 0x3b, L"F1" }, { 0x3c, L"F2" }, { 0x3d, L"F3" }, @@ -313,6 +314,9 @@ ROSDATA VSC_LPWSTR key_names[] = { { 0x54, L"Sys Req" }, { 0x57, L"F11" }, { 0x58, L"F12" }, + { 0x70, L"\u3072\u3089\u304C\u306A" }, /* Hiragana */ + { 0x79, L"\u5909\u63DB" }, /* Henkan (Convert) */ + { 0x7b, L"\u7121\u5909\u63DB" }, /* Mu-Henkan (Non-Convert) */ { 0x7c, L"F13" }, { 0x7d, L"F14" }, { 0x7e, L"F15" }, @@ -325,12 +329,14 @@ ROSDATA VSC_LPWSTR key_names[] = { { 0x85, L"F22" }, { 0x86, L"F23" }, { 0x87, L"F24" }, + { 0xf1, L"ImeOff" }, + { 0xf2, L"ImeOn" }, { 0, NULL }, }; ROSDATA VSC_LPWSTR extended_key_names[] = { { 0x1c, L"Num Enter" }, - { 0x1d, L"Right Ctrl" }, + { 0x1d, L"Right Control" }, { 0x35, L"Num /" }, { 0x37, L"Prnt Scrn" }, { 0x38, L"Right Alt" }, @@ -339,8 +345,8 @@ ROSDATA VSC_LPWSTR extended_key_names[] = { { 0x47, L"Home" }, { 0x48, L"Up" }, { 0x49, L"Page Up" }, - { 0x4a, L"Left" }, - { 0x4c, L"Center" }, + { 0x4a, L"-" }, + { 0x4b, L"Left" }, { 0x4d, L"Right" }, { 0x4f, L"End" }, { 0x50, L"Down" }, @@ -348,9 +354,9 @@ ROSDATA VSC_LPWSTR extended_key_names[] = { { 0x52, L"Insert" }, { 0x53, L"Delete" }, { 0x54, L"<ReactOS>" }, - { 0x55, L"Help" }, - { 0x56, L"Left Windows" }, - { 0x5b, L"Right Windows" }, + { 0x5b, L"Left <ReactOS>" }, + { 0x5c, L"Right <ReactOS>" }, + { 0x5d, L"Application" }, { 0, NULL }, };
2 years, 7 months
1
0
0
0
[reactos] 01/01: [KDBJA] Delete duplicate key entries (#4508)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c4b8e474fc90dbab4c1f…
commit 5c4b8e474fc90dbab4c1f17e7437522b8b5f4b7f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu May 12 17:55:59 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu May 12 17:55:59 2022 +0900 [KDBJA] Delete duplicate key entries (#4508) Delete the duplicated key data. CORE-11700 --- dll/keyboard/kbdja/kbdja.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c index c72eccc803f..4566a1cf2bf 100644 --- a/dll/keyboard/kbdja/kbdja.c +++ b/dll/keyboard/kbdja/kbdja.c @@ -212,13 +212,6 @@ ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { { VK_OEM_3, 0, { '@','`'} }, { VK_OEM_PLUS, 0, { ';','+'} }, { VK_OEM_1, 0, { ':','*'} }, - - /* Specials */ - /* Ctrl-_ generates US */ - { VK_OEM_PLUS ,0, {';', '+'} }, - { VK_OEM_1 ,0, {';', ':'} }, - { VK_OEM_7 ,0, {'\'','\"'} }, - { VK_OEM_3 ,0, {'`', '~'} }, { VK_OEM_COMMA ,0, {',', '<'} }, { VK_OEM_PERIOD ,0, {'.', '>'} }, { VK_OEM_2 ,0, {'/', '?'} },
2 years, 7 months
1
0
0
0
[reactos] 01/01: [KBDJA] Delete temporary hacks (#4506)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2038087d9e705613dc98d…
commit 2038087d9e705613dc98d709ef1585679d6619a2 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu May 12 14:05:16 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu May 12 14:05:16 2022 +0900 [KBDJA] Delete temporary hacks (#4506) Improve readability of Japanese keyboard. - SC_13 (0xDE) --> VK_OEM_7 - SC_27 (0xC0) --> VK_OEM_3 - SC_40 (0xBB) --> VK_OEM_PLUS - SC_41 (0xBA) --> VK_OEM_1 CORE-11700 --- dll/keyboard/kbdja/kbdja.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c index 110333a820a..c72eccc803f 100644 --- a/dll/keyboard/kbdja/kbdja.c +++ b/dll/keyboard/kbdja/kbdja.c @@ -29,12 +29,6 @@ #define KNUMS KBDNUMPAD|KBDSPECIAL /* Special + number pad */ #define KMEXT KBDEXT|KBDMULTIVK /* Multi + ext */ -/* temporary */ -#define SC_13 0xde -#define SC_27 0xc0 -#define SC_40 0xbb -#define SC_41 0xba - ROSDATA USHORT scancode_to_vk[] = { /* Numbers Row */ /* - 00 - */ @@ -42,19 +36,19 @@ ROSDATA USHORT scancode_to_vk[] = { VK_EMPTY, VK_ESCAPE, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - VK_OEM_MINUS, SC_13, VK_BACK, + VK_OEM_MINUS, VK_OEM_7, VK_BACK, /* - 0f - */ /* First Letters Row */ VK_TAB, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', - SC_27, VK_OEM_4, VK_RETURN, + VK_OEM_3, VK_OEM_4, VK_RETURN, /* - 1d - */ /* Second Letters Row */ VK_LCONTROL, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', - 'L', SC_40, SC_41, VK_PROCESSKEY, + 'L', VK_OEM_PLUS, VK_OEM_1, VK_PROCESSKEY, VK_LSHIFT, VK_OEM_6, /* - 2c - */ /* Third letters row */ @@ -214,10 +208,10 @@ ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { { '0', 0, {'0', 0 } }, /*Japanese Keys*/ - { SC_13, 0, { '^','~'} }, - { SC_27, 0, { '@','`'} }, - { SC_40, 0, { ';','+'} }, - { SC_41, 0, { ':','*'} }, + { VK_OEM_7, 0, { '^','~'} }, + { VK_OEM_3, 0, { '@','`'} }, + { VK_OEM_PLUS, 0, { ';','+'} }, + { VK_OEM_1, 0, { ':','*'} }, /* Specials */ /* Ctrl-_ generates US */
2 years, 7 months
1
0
0
0
[reactos] 01/01: [KBDJA] Enable VK_CONVERT/VK_NONCONVERT keys (#4505)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1c3474be48186a3592ef6…
commit 1c3474be48186a3592ef636743685e402e8a6f3b Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu May 12 12:48:29 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu May 12 12:48:29 2022 +0900 [KBDJA] Enable VK_CONVERT/VK_NONCONVERT keys (#4505) Enable VK_CONVERT/VK_NONCONVERT keys for Japanese keyboard. - ScanCode 121 (0x79) --> VK_CONVERT. - ScanCode 123 (0x7B) --> VK_NONCONVERT. CORE-11700 --- dll/keyboard/kbdja/kbdja.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c index ee44d941a1a..110333a820a 100644 --- a/dll/keyboard/kbdja/kbdja.c +++ b/dll/keyboard/kbdja/kbdja.c @@ -102,8 +102,8 @@ ROSDATA USHORT scancode_to_vk[] = { /* One more f-key */ VK_F24, /* - 77 - */ - VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_EMPTY, VK_EMPTY, VK_OEM_5, VK_EMPTY, /* PA1 */ + VK_EMPTY, VK_EMPTY, VK_CONVERT, VK_EMPTY, + VK_NONCONVERT, VK_EMPTY, VK_OEM_5, VK_EMPTY, /* PA1 */ VK_EMPTY, /* - 80 - */ 0
2 years, 7 months
1
0
0
0
[reactos] 01/01: [USER32][KBDJA] Implement CliImmSetHotKey (#4504)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fcc4384554a92d9fd3f2c…
commit fcc4384554a92d9fd3f2ce021a363e71c4b5fc45 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed May 11 21:42:32 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed May 11 21:42:32 2022 +0900 [USER32][KBDJA] Implement CliImmSetHotKey (#4504) - Fix Japanese keyboard about [Shift]+[0] and [半/全] (VK_PROCESSKEY). - Add user32!CliSaveImeHotKey helper function. - Implement user32!CliImmSetHotKey function. This function is forwarded from imm32!ImmSetHotKey. - Fix user32!TranslateMessage by using imm32!ImmTranslateMessage. CORE-11700, CORE-18183, CORE-18182 --- dll/keyboard/kbdja/kbdja.c | 4 +- win32ss/user/user32/misc/imm.c | 9 --- win32ss/user/user32/windows/input.c | 103 ++++++++++++++++++++++++++++++++++ win32ss/user/user32/windows/message.c | 27 ++++----- 4 files changed, 119 insertions(+), 24 deletions(-) diff --git a/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c index b250b9a1118..ee44d941a1a 100644 --- a/dll/keyboard/kbdja/kbdja.c +++ b/dll/keyboard/kbdja/kbdja.c @@ -54,7 +54,7 @@ ROSDATA USHORT scancode_to_vk[] = { VK_LCONTROL, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', - 'L', SC_40, SC_41, VK_EMPTY, + 'L', SC_40, SC_41, VK_PROCESSKEY, VK_LSHIFT, VK_OEM_6, /* - 2c - */ /* Third letters row */ @@ -211,7 +211,7 @@ ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { { '7', 0, {'7', '\''} }, { '8', 0, {'8', '('} }, { '9', 0, {'9', ')'} }, - { '0', 0, {'0', 0xff} }, + { '0', 0, {'0', 0 } }, /*Japanese Keys*/ { SC_13, 0, { '^','~'} }, diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c index 9099235c8ee..83b6b492777 100644 --- a/win32ss/user/user32/misc/imm.c +++ b/win32ss/user/user32/misc/imm.c @@ -1054,15 +1054,6 @@ RegisterIMEClass(VOID) return TRUE; } -/* - * @unimplemented - */ -BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl) -{ - UNIMPLEMENTED; - return FALSE; -} - /* * @implemented */ diff --git a/win32ss/user/user32/windows/input.c b/win32ss/user/user32/windows/input.c index 4cd7832d7b3..50189f831f4 100644 --- a/win32ss/user/user32/windows/input.c +++ b/win32ss/user/user32/windows/input.c @@ -143,6 +143,109 @@ Failure: return FALSE; } +BOOL APIENTRY +CliSaveImeHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKL, BOOL bDelete) +{ + WCHAR szName[MAX_PATH]; + LONG error; + HKEY hControlPanel = NULL, hInputMethod = NULL, hHotKeys = NULL, hKey = NULL; + BOOL ret = FALSE, bRevertOnFailure = FALSE; + + if (bDelete) + { + StringCchPrintfW(szName, _countof(szName), + L"Control Panel\\Input Method\\Hot Keys\\%08lX", dwID); + error = RegDeleteKeyW(HKEY_CURRENT_USER, szName); + return (error == ERROR_SUCCESS); + } + + // Open "Control Panel" + error = RegCreateKeyExW(HKEY_CURRENT_USER, L"Control Panel", 0, NULL, 0, KEY_ALL_ACCESS, + NULL, &hControlPanel, NULL); + if (error == ERROR_SUCCESS) + { + // Open "Input Method" + error = RegCreateKeyExW(hControlPanel, L"Input Method", 0, NULL, 0, KEY_ALL_ACCESS, + NULL, &hInputMethod, NULL); + if (error == ERROR_SUCCESS) + { + // Open "Hot Keys" + error = RegCreateKeyExW(hInputMethod, L"Hot Keys", 0, NULL, 0, KEY_ALL_ACCESS, + NULL, &hHotKeys, NULL); + if (error == ERROR_SUCCESS) + { + // Open "Key" + StringCchPrintfW(szName, _countof(szName), L"%08lX", dwID); + error = RegCreateKeyExW(hHotKeys, szName, 0, NULL, 0, KEY_ALL_ACCESS, + NULL, &hKey, NULL); + if (error == ERROR_SUCCESS) + { + bRevertOnFailure = TRUE; + + // Set "Virtual Key" + error = RegSetValueExW(hKey, L"Virtual Key", 0, REG_BINARY, + (LPBYTE)&uVirtualKey, sizeof(uVirtualKey)); + if (error == ERROR_SUCCESS) + { + // Set "Key Modifiers" + error = RegSetValueExW(hKey, L"Key Modifiers", 0, REG_BINARY, + (LPBYTE)&uModifiers, sizeof(uModifiers)); + if (error == ERROR_SUCCESS) + { + // Set "Target IME" + error = RegSetValueExW(hKey, L"Target IME", 0, REG_BINARY, + (LPBYTE)&hKL, sizeof(hKL)); + if (error == ERROR_SUCCESS) + { + // Success! + ret = TRUE; + bRevertOnFailure = FALSE; + } + } + } + RegCloseKey(hKey); + } + RegCloseKey(hHotKeys); + } + RegCloseKey(hInputMethod); + } + RegCloseKey(hControlPanel); + } + + if (bRevertOnFailure) + CliSaveImeHotKey(dwID, uVirtualKey, uModifiers, hKL, TRUE); + + return ret; +} + +/* + * @implemented + * Same as imm32!ImmSetHotKey. + */ +BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKL) +{ + BOOL ret; + + if (uVirtualKey == 0) // Delete? + { + ret = CliSaveImeHotKey(dwID, uModifiers, uVirtualKey, hKL, TRUE); + if (ret) + CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_DELETE); + return ret; + } + + // Add + ret = CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_ADD); + if (ret) + { + ret = CliSaveImeHotKey(dwID, uModifiers, uVirtualKey, hKL, FALSE); + if (!ret) // Failure? + CliImmSetHotKeyWorker(dwID, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_DELETE); + } + + return ret; +} + BOOL FASTCALL CliSetSingleHotKey(LPCWSTR pszSubKey, HANDLE hKey) { LONG error; diff --git a/win32ss/user/user32/windows/message.c b/win32ss/user/user32/windows/message.c index 1c745cb4584..2740f2e632f 100644 --- a/win32ss/user/user32/windows/message.c +++ b/win32ss/user/user32/windows/message.c @@ -2825,20 +2825,21 @@ TranslateMessageEx(CONST MSG *lpMsg, UINT Flags) BOOL WINAPI TranslateMessage(CONST MSG *lpMsg) { - BOOL Ret = FALSE; + BOOL ret; -// Ref: msdn ImmGetVirtualKey: -//
http://msdn.microsoft.com/en-us/library/aa912145.aspx
-/* - if ( (LOWORD(lpMsg->wParam) != VK_PROCESSKEY) || - !(Ret = IMM_ImmTranslateMessage( lpMsg->hwnd, - lpMsg->message, - lpMsg->wParam, - lpMsg->lParam)) )*/ - { - Ret = TranslateMessageEx((LPMSG)lpMsg, 0); - } - return Ret; + //
http://msdn.microsoft.com/en-us/library/aa912145.aspx
+ if (LOWORD(lpMsg->wParam) == VK_PROCESSKEY) + { + ret = IMM_FN(ImmTranslateMessage)(lpMsg->hwnd, + lpMsg->message, + lpMsg->wParam, + lpMsg->lParam); + if (ret) + return ret; + } + + ret = TranslateMessageEx((LPMSG)lpMsg, 0); + return ret; }
2 years, 7 months
1
0
0
0
[reactos] 01/01: [USER32] Implement UnloadKeyboardLayout (#4503)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7396ba84ce54f48419132…
commit 7396ba84ce54f4841913289da17e3cb9a98edbb4 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed May 11 10:03:02 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed May 11 10:03:02 2022 +0900 [USER32] Implement UnloadKeyboardLayout (#4503) - Add IntSetFeKeyboardFlags, CliImmSetHotKeyWorker, CliSetDefaultImeHotKeys, CliGetPreloadKeyboardLayouts, CliGetImeHotKeysFromRegistry, CliImmInitializeHotKeys, CliSetSingleHotKey, and CliReadRegistryValue helper functions. CORE-11700 --- win32ss/user/user32/user32.spec | 2 +- win32ss/user/user32/windows/input.c | 285 ++++++++++++++++++++++++++++++++++++ 2 files changed, 286 insertions(+), 1 deletion(-) diff --git a/win32ss/user/user32/user32.spec b/win32ss/user/user32/user32.spec index 9e87f95c49f..c026984892a 100644 --- a/win32ss/user/user32/user32.spec +++ b/win32ss/user/user32/user32.spec @@ -703,7 +703,7 @@ 694 stdcall UnhookWindowsHook(long ptr) 695 stdcall UnhookWindowsHookEx(long) NtUserUnhookWindowsHookEx 696 stdcall UnionRect(ptr ptr ptr) -697 stdcall UnloadKeyboardLayout(long) NtUserUnloadKeyboardLayout +697 stdcall UnloadKeyboardLayout(ptr) 698 stdcall UnlockWindowStation(long) NtUserUnlockWindowStation 699 stdcall UnpackDDElParam(long long ptr ptr) 700 stdcall UnregisterClassA(str long) diff --git a/win32ss/user/user32/windows/input.c b/win32ss/user/user32/windows/input.c index aa398d7dcc5..4cd7832d7b3 100644 --- a/win32ss/user/user32/windows/input.c +++ b/win32ss/user/user32/windows/input.c @@ -31,6 +31,279 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32); +typedef struct tagIMEHOTKEYENTRY +{ + DWORD dwHotKeyId; + UINT uVirtualKey; + UINT uModifiers; + HKL hKL; +} IMEHOTKEYENTRY, *PIMEHOTKEYENTRY; + +// Japanese +IMEHOTKEYENTRY DefaultHotKeyTableJ[] = +{ + { IME_JHOTKEY_CLOSE_OPEN, VK_KANJI, MOD_IGNORE_ALL_MODIFIER, NULL }, +}; + +// Chinese Traditional +IMEHOTKEYENTRY DefaultHotKeyTableT[] = +{ + { IME_THOTKEY_IME_NONIME_TOGGLE, VK_SPACE, MOD_LEFT | MOD_RIGHT | MOD_CONTROL, NULL }, + { IME_THOTKEY_SHAPE_TOGGLE, VK_SPACE, MOD_LEFT | MOD_RIGHT | MOD_SHIFT, NULL }, +}; + +// Chinese Simplified +IMEHOTKEYENTRY DefaultHotKeyTableC[] = +{ + { IME_CHOTKEY_IME_NONIME_TOGGLE, VK_SPACE, MOD_LEFT | MOD_RIGHT | MOD_CONTROL, NULL }, + { IME_CHOTKEY_SHAPE_TOGGLE, VK_SPACE, MOD_LEFT | MOD_RIGHT | MOD_SHIFT, NULL }, +}; + +// The far-east flags +#define FE_JAPANESE (1 << 0) +#define FE_CHINESE_TRADITIONAL (1 << 1) +#define FE_CHINESE_SIMPLIFIED (1 << 2) +#define FE_KOREAN (1 << 3) + +// Sets the far-east flags +// Win: SetFeKeyboardFlags +VOID FASTCALL IntSetFeKeyboardFlags(LANGID LangID, PBYTE pbFlags) +{ + switch (LangID) + { + case MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT): + *pbFlags |= FE_JAPANESE; + break; + + case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL): + case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_HONGKONG): + *pbFlags |= FE_CHINESE_TRADITIONAL; + break; + + case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED): + case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SINGAPORE): + *pbFlags |= FE_CHINESE_SIMPLIFIED; + break; + + case MAKELANGID(LANG_KOREAN, SUBLANG_KOREAN): + *pbFlags |= FE_KOREAN; + break; + + default: + break; + } +} + +DWORD FASTCALL CliReadRegistryValue(HANDLE hKey, LPCWSTR pszName) +{ + DWORD dwValue, cbValue; + LONG error; + + cbValue = sizeof(dwValue); + error = RegQueryValueExW(hKey, pszName, NULL, NULL, (LPBYTE)&dwValue, &cbValue); + if (error != ERROR_SUCCESS || cbValue < sizeof(DWORD)) + return 0; + + return dwValue; +} + +BOOL APIENTRY +CliImmSetHotKeyWorker(DWORD dwHotKeyId, UINT uModifiers, UINT uVirtualKey, HKL hKL, DWORD dwAction) +{ + if (dwAction == SETIMEHOTKEY_ADD) + { + if (IME_HOTKEY_DSWITCH_FIRST <= dwHotKeyId && dwHotKeyId <= IME_HOTKEY_DSWITCH_LAST) + { + if (!hKL) + goto Failure; + } + else + { + if (hKL) + goto Failure; + + if (IME_KHOTKEY_SHAPE_TOGGLE <= dwHotKeyId && + dwHotKeyId < IME_THOTKEY_IME_NONIME_TOGGLE) + { + // The Korean cannot set the IME hotkeys + goto Failure; + } + } + +#define MOD_ALL_MODS (MOD_ALT | MOD_CONTROL | MOD_SHIFT | MOD_WIN) + if ((uModifiers & MOD_ALL_MODS) && !(uModifiers & (MOD_LEFT | MOD_RIGHT))) + goto Failure; +#undef MOD_ALL_MODS + } + + return NtUserSetImeHotKey(dwHotKeyId, uModifiers, uVirtualKey, hKL, dwAction); + +Failure: + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; +} + +BOOL FASTCALL CliSetSingleHotKey(LPCWSTR pszSubKey, HANDLE hKey) +{ + LONG error; + HKEY hSubKey; + DWORD dwHotKeyId = 0; + UINT uModifiers = 0, uVirtualKey = 0; + HKL hKL = NULL; + UNICODE_STRING ustrName; + + error = RegOpenKeyExW(hKey, pszSubKey, 0, KEY_READ, &hSubKey); + if (error != ERROR_SUCCESS) + return FALSE; + + RtlInitUnicodeString(&ustrName, pszSubKey); + RtlUnicodeStringToInteger(&ustrName, 16, &dwHotKeyId); + + uModifiers = CliReadRegistryValue(hSubKey, L"Key Modifiers"); + hKL = (HKL)(ULONG_PTR)CliReadRegistryValue(hSubKey, L"Target IME"); + uVirtualKey = CliReadRegistryValue(hSubKey, L"Virtual Key"); + + RegCloseKey(hSubKey); + + return CliImmSetHotKeyWorker(dwHotKeyId, uModifiers, uVirtualKey, hKL, SETIMEHOTKEY_ADD); +} + +BOOL FASTCALL CliGetImeHotKeysFromRegistry(VOID) +{ + HKEY hKey; + LONG error; + BOOL ret = FALSE; + DWORD dwIndex, cchKeyName; + WCHAR szKeyName[16]; + + error = RegOpenKeyExW(HKEY_CURRENT_USER, + L"Control Panel\\Input Method\\Hot Keys", + 0, + KEY_ALL_ACCESS, + &hKey); + if (error != ERROR_SUCCESS) + return ret; + + for (dwIndex = 0; ; ++dwIndex) + { + cchKeyName = _countof(szKeyName); + error = RegEnumKeyExW(hKey, dwIndex, szKeyName, &cchKeyName, NULL, NULL, NULL, NULL); + if (error == ERROR_NO_MORE_ITEMS || error != ERROR_SUCCESS) + break; + + szKeyName[_countof(szKeyName) - 1] = 0; + + if (CliSetSingleHotKey(szKeyName, hKey)) + ret = TRUE; + } + + RegCloseKey(hKey); + return ret; +} + +VOID APIENTRY CliGetPreloadKeyboardLayouts(PBYTE pbFlags) +{ + WCHAR szValueName[8], szValue[16]; + UNICODE_STRING ustrValue; + DWORD dwKL, cbValue, dwType; + UINT iNumber; + HKEY hKey; + LONG error; + + error = RegOpenKeyExW(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_READ, &hKey); + if (error != ERROR_SUCCESS) + return; + + for (iNumber = 1; iNumber < 1000; ++iNumber) + { + StringCchPrintfW(szValueName, _countof(szValueName), L"%u", iNumber); + + cbValue = sizeof(szValue); + error = RegQueryValueExW(hKey, szValueName, NULL, &dwType, (LPBYTE)szValue, &cbValue); + if (error != ERROR_SUCCESS || dwType != REG_SZ) + break; + + szValue[_countof(szValue) - 1] = 0; + + RtlInitUnicodeString(&ustrValue, szValue); + RtlUnicodeStringToInteger(&ustrValue, 16, &dwKL); + + IntSetFeKeyboardFlags(LOWORD(dwKL), pbFlags); + } + + RegCloseKey(hKey); +} + +VOID APIENTRY CliSetDefaultImeHotKeys(PIMEHOTKEYENTRY pEntries, UINT nCount, BOOL bCheck) +{ + UINT uVirtualKey, uModifiers; + HKL hKL; + + while (nCount-- > 0) + { + if (!bCheck || !NtUserGetImeHotKey(pEntries->dwHotKeyId, &uModifiers, &uVirtualKey, &hKL)) + { + CliImmSetHotKeyWorker(pEntries->dwHotKeyId, + pEntries->uModifiers, + pEntries->uVirtualKey, + pEntries->hKL, + SETIMEHOTKEY_ADD); + } + ++pEntries; + } +} + +VOID APIENTRY CliImmInitializeHotKeys(DWORD dwAction, HKL hKL) +{ + UINT nCount; + LPHKL pList; + UINT iIndex; + LANGID LangID; + BYTE bFlags = 0; + BOOL bCheck; + + NtUserSetImeHotKey(0, 0, 0, NULL, SETIMEHOTKEY_DELETEALL); + + bCheck = CliGetImeHotKeysFromRegistry(); + + if (dwAction == SETIMEHOTKEY_DELETEALL) + { + LangID = LANGIDFROMLCID(GetUserDefaultLCID()); + IntSetFeKeyboardFlags(LangID, &bFlags); + + CliGetPreloadKeyboardLayouts(&bFlags); + } + else + { + nCount = NtUserGetKeyboardLayoutList(0, NULL); + if (!nCount) + return; + + pList = RtlAllocateHeap(RtlGetProcessHeap(), 0, nCount * sizeof(HKL)); + if (!pList) + return; + + NtUserGetKeyboardLayoutList(nCount, pList); + + for (iIndex = 0; iIndex < nCount; ++iIndex) + { + LangID = LOWORD(pList[iIndex]); + IntSetFeKeyboardFlags(LangID, &bFlags); + } + + RtlFreeHeap(RtlGetProcessHeap(), 0, pList); + } + + if (bFlags & FE_JAPANESE) + CliSetDefaultImeHotKeys(DefaultHotKeyTableJ, _countof(DefaultHotKeyTableJ), bCheck); + + if (bFlags & FE_CHINESE_TRADITIONAL) + CliSetDefaultImeHotKeys(DefaultHotKeyTableT, _countof(DefaultHotKeyTableT), bCheck); + + if (bFlags & FE_CHINESE_SIMPLIFIED) + CliSetDefaultImeHotKeys(DefaultHotKeyTableC, _countof(DefaultHotKeyTableC), bCheck); +} + /* * @implemented */ @@ -330,6 +603,18 @@ LoadKeyboardLayoutW(LPCWSTR pwszKLID, dwhkl, Flags); } +/* + * @implemented + */ +BOOL WINAPI UnloadKeyboardLayout(HKL hKL) +{ + if (!NtUserUnloadKeyboardLayout(hKL)) + return FALSE; + + CliImmInitializeHotKeys(SETIMEHOTKEY_DELETE, hKL); + return TRUE; +} + /* * @implemented */
2 years, 7 months
1
0
0
0
[reactos] 03/03: [NTOS:KE] Fix CPU extended family and model detection
by Marcus Boillat
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa52f2fae0b73ca10e18f…
commit fa52f2fae0b73ca10e18fe187b0dff16cfaabfc8 Author: Marcus Boillat <marcus.boillat(a)gmail.com> AuthorDate: Sun May 8 19:27:27 2022 +0200 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Mon May 9 21:50:24 2022 +0300 [NTOS:KE] Fix CPU extended family and model detection Based on documentation from Geoff Chappell:
https://www.geoffchappell.com/studies/windows/km/cpu/cpuid/00000001h/eax.htm
CORE-17974 --- ntoskrnl/ke/amd64/cpu.c | 29 +++++++++++++++++++++++++++-- ntoskrnl/ke/i386/cpu.c | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index 4ed7e5470fe..d4a8888c664 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -98,7 +98,11 @@ KiSetProcessorType(VOID) { CPU_INFO CpuInfo; CPU_SIGNATURE CpuSignature; - ULONG Stepping, Type; + BOOLEAN ExtendModel; + ULONG Stepping, Type, Vendor; + + /* This initializes Prcb->CpuVendor */ + Vendor = KiGetCpuVendor(); /* Do CPUID 1 now */ KiCpuId(&CpuInfo, 1); @@ -111,8 +115,29 @@ KiSetProcessorType(VOID) */ CpuSignature.AsULONG = CpuInfo.Eax; Stepping = CpuSignature.Model; + ExtendModel = (CpuSignature.Family == 15); +#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1) + if (CpuSignature.Family == 6) + { + ExtendModel |= (Vendor == CPU_INTEL); +#if (NTDDI_VERSION >= NTDDI_WIN8) + ExtendModel |= (Vendor == CPU_CENTAUR); +#endif + } +#endif + if (ExtendModel) + { + /* Add ExtendedModel to distinguish from non-extended values. */ + Stepping |= (CpuSignature.ExtendedModel << 4); + } Stepping = (Stepping << 8) | CpuSignature.Step; Type = CpuSignature.Family; + if (CpuSignature.Family == 15) + { + /* Add ExtendedFamily to distinguish from non-extended values. + * It must not be larger than 0xF0 to avoid overflow. */ + Type += min(CpuSignature.ExtendedFamily, 0xF0); + } /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE; @@ -130,7 +155,7 @@ KiGetFeatureBits(VOID) CPU_INFO CpuInfo; /* Get the Vendor ID */ - Vendor = KiGetCpuVendor(); + Vendor = Prcb->CpuVendor; /* Make sure we got a valid vendor ID at least. */ if (!Vendor) return FeatureBits; diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index 711070eeb07..0e4b8fa8468 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -159,6 +159,7 @@ KiSetProcessorType(VOID) { CPU_INFO CpuInfo; CPU_SIGNATURE CpuSignature; + BOOLEAN ExtendModel; ULONG Stepping, Type; /* Do CPUID 1 now */ @@ -172,8 +173,30 @@ KiSetProcessorType(VOID) */ CpuSignature.AsULONG = CpuInfo.Eax; Stepping = CpuSignature.Model; + ExtendModel = (CpuSignature.Family == 15); +#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1) + if (CpuSignature.Family == 6) + { + ULONG Vendor = KiGetCpuVendor(); + ExtendModel |= (Vendor == CPU_INTEL); +#if (NTDDI_VERSION >= NTDDI_WIN8) + ExtendModel |= (Vendor == CPU_CENTAUR); +#endif + } +#endif + if (ExtendModel) + { + /* Add ExtendedModel to distinguish from non-extended values. */ + Stepping |= (CpuSignature.ExtendedModel << 4); + } Stepping = (Stepping << 8) | CpuSignature.Step; Type = CpuSignature.Family; + if (CpuSignature.Family == 15) + { + /* Add ExtendedFamily to distinguish from non-extended values. + * It must not be larger than 0xF0 to avoid overflow. */ + Type += min(CpuSignature.ExtendedFamily, 0xF0); + } /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE;
2 years, 7 months
1
0
0
0
[reactos] 02/03: [NTOS:KE] Use bitfield structure for x86 CPU signature in EAX register
by Marcus Boillat
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00b3e4bc689519d67a81b…
commit 00b3e4bc689519d67a81b59a8dad8dfe5fafdb5d Author: Marcus Boillat <marcus.boillat(a)gmail.com> AuthorDate: Sat May 7 23:27:25 2022 +0200 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Mon May 9 21:50:24 2022 +0300 [NTOS:KE] Use bitfield structure for x86 CPU signature in EAX register This makes code a lot more readable. CORE-17974 --- ntoskrnl/ke/amd64/cpu.c | 29 +++++++++++++++++++++-------- ntoskrnl/ke/i386/cpu.c | 29 +++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index cbce873f619..4ed7e5470fe 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -35,6 +35,21 @@ static const CHAR CmpIntelID[] = "GenuineIntel"; static const CHAR CmpAmdID[] = "AuthenticAMD"; static const CHAR CmpCentaurID[] = "CentaurHauls"; +typedef union _CPU_SIGNATURE +{ + struct + { + ULONG Step : 4; + ULONG Model : 4; + ULONG Family : 4; + ULONG Unused : 4; + ULONG ExtendedModel : 4; + ULONG ExtendedFamily : 8; + ULONG Unused2 : 4; + }; + ULONG AsULONG; +} CPU_SIGNATURE; + /* FUNCTIONS *****************************************************************/ ULONG @@ -82,6 +97,7 @@ NTAPI KiSetProcessorType(VOID) { CPU_INFO CpuInfo; + CPU_SIGNATURE CpuSignature; ULONG Stepping, Type; /* Do CPUID 1 now */ @@ -89,17 +105,14 @@ KiSetProcessorType(VOID) /* * Get the Stepping and Type. The stepping contains both the - * Model and the Step, while the Type contains the returned Type. - * We ignore the family. + * Model and the Step, while the Type contains the returned Family. * * For the stepping, we convert this: zzzzzzxy into this: x0y */ - Stepping = CpuInfo.Eax & 0xF0; - Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; - Type = CpuInfo.Eax & 0xF00; - Type >>= 8; + CpuSignature.AsULONG = CpuInfo.Eax; + Stepping = CpuSignature.Model; + Stepping = (Stepping << 8) | CpuSignature.Step; + Type = CpuSignature.Family; /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE; diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index 4a53f407800..711070eeb07 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -60,6 +60,21 @@ static const CHAR CmpTransmetaID[] = "GenuineTMx86"; static const CHAR CmpCentaurID[] = "CentaurHauls"; static const CHAR CmpRiseID[] = "RiseRiseRise"; +typedef union _CPU_SIGNATURE +{ + struct + { + ULONG Step : 4; + ULONG Model : 4; + ULONG Family : 4; + ULONG Unused : 4; + ULONG ExtendedModel : 4; + ULONG ExtendedFamily : 8; + ULONG Unused2 : 4; + }; + ULONG AsULONG; +} CPU_SIGNATURE; + /* SUPPORT ROUTINES FOR MSVC COMPATIBILITY ***********************************/ /* NSC/Cyrix CPU configuration register index */ @@ -143,6 +158,7 @@ NTAPI KiSetProcessorType(VOID) { CPU_INFO CpuInfo; + CPU_SIGNATURE CpuSignature; ULONG Stepping, Type; /* Do CPUID 1 now */ @@ -150,17 +166,14 @@ KiSetProcessorType(VOID) /* * Get the Stepping and Type. The stepping contains both the - * Model and the Step, while the Type contains the returned Type. - * We ignore the family. + * Model and the Step, while the Type contains the returned Family. * * For the stepping, we convert this: zzzzzzxy into this: x0y */ - Stepping = CpuInfo.Eax & 0xF0; - Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; - Type = CpuInfo.Eax & 0xF00; - Type >>= 8; + CpuSignature.AsULONG = CpuInfo.Eax; + Stepping = CpuSignature.Model; + Stepping = (Stepping << 8) | CpuSignature.Step; + Type = CpuSignature.Family; /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE;
2 years, 7 months
1
0
0
0
[reactos] 01/03: [NTOS:KE] Move KiGet/SetProcessorType function below KiGetCpuVendor
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc82bc14e2efd08e92ec7…
commit cc82bc14e2efd08e92ec7b532020d0a330003091 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon May 9 20:38:02 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Mon May 9 21:50:19 2022 +0300 [NTOS:KE] Move KiGet/SetProcessorType function below KiGetCpuVendor CORE-17974 --- ntoskrnl/ke/amd64/cpu.c | 60 +++++++++++++++++++++++------------------------ ntoskrnl/ke/i386/cpu.c | 62 ++++++++++++++++++++++++------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index 659264cde30..cbce873f619 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -37,36 +37,6 @@ static const CHAR CmpCentaurID[] = "CentaurHauls"; /* FUNCTIONS *****************************************************************/ -VOID -NTAPI -KiSetProcessorType(VOID) -{ - CPU_INFO CpuInfo; - ULONG Stepping, Type; - - /* Do CPUID 1 now */ - KiCpuId(&CpuInfo, 1); - - /* - * Get the Stepping and Type. The stepping contains both the - * Model and the Step, while the Type contains the returned Type. - * We ignore the family. - * - * For the stepping, we convert this: zzzzzzxy into this: x0y - */ - Stepping = CpuInfo.Eax & 0xF0; - Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; - Type = CpuInfo.Eax & 0xF00; - Type >>= 8; - - /* Save them in the PRCB */ - KeGetCurrentPrcb()->CpuID = TRUE; - KeGetCurrentPrcb()->CpuType = (UCHAR)Type; - KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping; -} - ULONG NTAPI KiGetCpuVendor(VOID) @@ -107,6 +77,36 @@ KiGetCpuVendor(VOID) return Prcb->CpuVendor; } +VOID +NTAPI +KiSetProcessorType(VOID) +{ + CPU_INFO CpuInfo; + ULONG Stepping, Type; + + /* Do CPUID 1 now */ + KiCpuId(&CpuInfo, 1); + + /* + * Get the Stepping and Type. The stepping contains both the + * Model and the Step, while the Type contains the returned Type. + * We ignore the family. + * + * For the stepping, we convert this: zzzzzzxy into this: x0y + */ + Stepping = CpuInfo.Eax & 0xF0; + Stepping <<= 4; + Stepping += (CpuInfo.Eax & 0xFF); + Stepping &= 0xF0F; + Type = CpuInfo.Eax & 0xF00; + Type >>= 8; + + /* Save them in the PRCB */ + KeGetCurrentPrcb()->CpuID = TRUE; + KeGetCurrentPrcb()->CpuType = (UCHAR)Type; + KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping; +} + ULONG NTAPI KiGetFeatureBits(VOID) diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index e627efe228a..4a53f407800 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -85,37 +85,6 @@ setCx86(UCHAR reg, UCHAR data) /* FUNCTIONS *****************************************************************/ -CODE_SEG("INIT") -VOID -NTAPI -KiSetProcessorType(VOID) -{ - CPU_INFO CpuInfo; - ULONG Stepping, Type; - - /* Do CPUID 1 now */ - KiCpuId(&CpuInfo, 1); - - /* - * Get the Stepping and Type. The stepping contains both the - * Model and the Step, while the Type contains the returned Type. - * We ignore the family. - * - * For the stepping, we convert this: zzzzzzxy into this: x0y - */ - Stepping = CpuInfo.Eax & 0xF0; - Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; - Type = CpuInfo.Eax & 0xF00; - Type >>= 8; - - /* Save them in the PRCB */ - KeGetCurrentPrcb()->CpuID = TRUE; - KeGetCurrentPrcb()->CpuType = (UCHAR)Type; - KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping; -} - CODE_SEG("INIT") ULONG NTAPI @@ -168,6 +137,37 @@ KiGetCpuVendor(VOID) return CPU_UNKNOWN; } +CODE_SEG("INIT") +VOID +NTAPI +KiSetProcessorType(VOID) +{ + CPU_INFO CpuInfo; + ULONG Stepping, Type; + + /* Do CPUID 1 now */ + KiCpuId(&CpuInfo, 1); + + /* + * Get the Stepping and Type. The stepping contains both the + * Model and the Step, while the Type contains the returned Type. + * We ignore the family. + * + * For the stepping, we convert this: zzzzzzxy into this: x0y + */ + Stepping = CpuInfo.Eax & 0xF0; + Stepping <<= 4; + Stepping += (CpuInfo.Eax & 0xFF); + Stepping &= 0xF0F; + Type = CpuInfo.Eax & 0xF00; + Type >>= 8; + + /* Save them in the PRCB */ + KeGetCurrentPrcb()->CpuID = TRUE; + KeGetCurrentPrcb()->CpuType = (UCHAR)Type; + KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping; +} + CODE_SEG("INIT") ULONG NTAPI
2 years, 7 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200