Author: ekohl
Date: Sun Feb 19 15:13:49 2017
New Revision: 73846
URL:
http://svn.reactos.org/svn/reactos?rev=73846&view=rev
Log:
[ACPI]
Generate a proper device id string for processor devices.
Modified:
trunk/reactos/drivers/bus/acpi/buspdo.c
trunk/reactos/drivers/bus/acpi/include/acpisys.h
trunk/reactos/drivers/bus/acpi/main.c
Modified: trunk/reactos/drivers/bus/acpi/buspdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Sun Feb 19 15:13:49 2017
@@ -454,9 +454,17 @@
{
acpi_bus_get_device(DeviceData->AcpiHandle, &Device);
- length = swprintf(temp,
- L"ACPI\\%hs",
- Device->pnp.hardware_id);
+ if (strcmp(Device->pnp.hardware_id, "Processor") == 0)
+ {
+ length = wcslen(ProcessorIdString);
+ wcscpy(temp, ProcessorIdString);
+ }
+ else
+ {
+ length = swprintf(temp,
+ L"ACPI\\%hs",
+ Device->pnp.hardware_id);
+ }
}
else
{
Modified: trunk/reactos/drivers/bus/acpi/include/acpisys.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/include/a…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/include/acpisys.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/include/acpisys.h [iso-8859-1] Sun Feb 19 15:13:49
2017
@@ -5,6 +5,7 @@
*/
extern UNICODE_STRING ProcessorHardwareIds;
+extern LPWSTR ProcessorIdString;
extern LPWSTR ProcessorNameString;
typedef enum _DEVICE_PNP_STATE {
Modified: trunk/reactos/drivers/bus/acpi/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/main.c?re…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] Sun Feb 19 15:13:49 2017
@@ -22,6 +22,7 @@
extern struct acpi_device *power_button;
UNICODE_STRING ProcessorHardwareIds = {0, 0, NULL};
+LPWSTR ProcessorIdString = NULL;
LPWSTR ProcessorNameString = NULL;
@@ -650,6 +651,15 @@
ProcessorHardwareIds.MaximumLength = ProcessorHardwareIds.Length;
ProcessorHardwareIds.Buffer = HardwareIdsBuffer;
+ Length = (5 + VendorIdentifierLength + 3 + Level1Length + 1) * sizeof(WCHAR);
+ ProcessorIdString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
+ if (ProcessorIdString != NULL)
+ {
+ Length = swprintf(ProcessorIdString, L"ACPI\\%s_-_%.*s",
ProcessorVendorIdentifier, Level1Length, ProcessorIdentifier);
+ ProcessorIdString[Length++] = UNICODE_NULL;
+ DPRINT("ProcessorIdString: %S\n", ProcessorIdString);
+ }
+
done:
if (ProcessorHandle != NULL)
ZwClose(ProcessorHandle);