https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c57d0b7b980f0135129dd…
commit c57d0b7b980f0135129ddabe8d16eeb63b34b8a8
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Dec 30 02:40:03 2020 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Dec 30 19:38:33 2020 +0300
[ACPI] Do not panic if ProcessorNameString does not exist
Windows does not create this value in the registry if the processor core
does not expose the Brand String. It's an optional value and existing code
accessing it already has proper NULL checks:
https://git.reactos.org/?p=reactos.git;a=blob;f=drivers/bus/acpi/buspdo.c;h…
This is the proper fix for regression in CORE-7952.
Addendum to 48912992 (r61666) and 4d992804 (r62642).
CORE-17413
---
drivers/bus/acpi/main.c | 45 +++++++++++++++++++++------------------------
1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/drivers/bus/acpi/main.c b/drivers/bus/acpi/main.c
index d9dc256312c..6c294a8deb7 100644
--- a/drivers/bus/acpi/main.c
+++ b/drivers/bus/acpi/main.c
@@ -520,32 +520,29 @@ GetProcessorInformation(VOID)
NULL,
NULL,
&Length);
- if (!NT_SUCCESS(Status))
+ if (NT_SUCCESS(Status))
{
- DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
- goto done;
- }
-
- /* Allocate a buffer large enough to be zero terminated */
- Length += sizeof(UNICODE_NULL);
- ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
- if (ProcessorNameString == NULL)
- {
- DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
- Status = STATUS_INSUFFICIENT_RESOURCES;
- goto done;
- }
+ /* Allocate a buffer large enough to be zero terminated */
+ Length += sizeof(UNICODE_NULL);
+ ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
+ if (ProcessorNameString == NULL)
+ {
+ DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ goto done;
+ }
- /* Query the processor name string */
- Status = AcpiRegQueryValue(ProcessorHandle,
- L"ProcessorNameString",
- NULL,
- ProcessorNameString,
- &Length);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
- goto done;
+ /* Query the processor name string */
+ Status = AcpiRegQueryValue(ProcessorHandle,
+ L"ProcessorNameString",
+ NULL,
+ ProcessorNameString,
+ &Length);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
+ goto done;
+ }
}
/* Query the vendor identifier length */
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=740beb65e6d92752630f5…
commit 740beb65e6d92752630f517624235e797c44b021
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Dec 30 03:18:17 2020 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Dec 30 19:38:26 2020 +0300
[DXDIAG] If ProcessorNameString not found, fall back to Identifier
It also should have its own routine for detecting CPU name, add a comment.
Windows XP and 2003 does have CPU name strings in dxdiagn.dll.
CORE-17413
---
base/applications/dxdiag/system.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/base/applications/dxdiag/system.c b/base/applications/dxdiag/system.c
index c10df851e4c..7359d0ca30f 100644
--- a/base/applications/dxdiag/system.c
+++ b/base/applications/dxdiag/system.c
@@ -196,6 +196,7 @@ InitializeSystemPage(HWND hwndDlg)
OSVERSIONINFO VersionInfo;
PVOID SMBiosBuf;
PCHAR DmiStrings[ID_STRINGS_MAX] = { 0 };
+ BOOL Result;
/* set date/time */
szTime[0] = L'\0';
@@ -322,7 +323,16 @@ InitializeSystemPage(HWND hwndDlg)
FreeSMBiosData(SMBiosBuf);
/* set processor string */
- if (GetRegValue(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\CentralProcessor\\0", L"ProcessorNameString", REG_SZ, szDesc, sizeof(szDesc)))
+ Result = GetRegValue(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\CentralProcessor\\0", L"ProcessorNameString", REG_SZ, szDesc, sizeof(szDesc));
+ if (!Result)
+ {
+ /* Processor Brand String not found */
+ /* FIXME: Implement CPU name detection routine */
+
+ /* Finally try to use Identifier string */
+ Result = GetRegValue(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\CentralProcessor\\0", L"Identifier", REG_SZ, szDesc, sizeof(szDesc));
+ }
+ if (Result)
{
TrimDmiStringW(szDesc);
/* FIXME retrieve current speed */
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56e56f8eccc4e6d4678ab…
commit 56e56f8eccc4e6d4678ab2723ece2981001715ca
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Tue Dec 22 12:32:45 2020 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Mon Dec 28 12:13:30 2020 +0100
[CMAKE] Use -fcommon when using CLang
---
sdk/cmake/msvc.cmake | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index a3048c34e1d..10beb82f704 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -55,6 +55,11 @@ if(ARCH STREQUAL "i386")
endif()
endif()
+# CLang default to -fno-common from version 11 onward. We are not rady for this now
+if (USE_CLANG_CL)
+ add_compile_options(-fcommon)
+endif()
+
# VS 12+ requires /FS when used in parallel compilations
if(NOT MSVC_IDE)
add_compile_options(/FS)