mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[ACPI]
Add some DPRINTs on failure svn path=/trunk/; revision=62642
This commit is contained in:
parent
f3d151acd3
commit
4d99280429
1 changed files with 24 additions and 0 deletions
|
@ -465,7 +465,10 @@ GetProcessorInformation(VOID)
|
|||
KEY_READ,
|
||||
&ProcessorHandle);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to open CentralProcessor registry key: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Query the processor identifier length */
|
||||
Status = AcpiRegQueryValue(ProcessorHandle,
|
||||
|
@ -474,7 +477,10 @@ GetProcessorInformation(VOID)
|
|||
NULL,
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to query Identifier value: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Remember the length as fallback for level 1-3 length */
|
||||
Level1Length = Level2Length = Level3Length = Length;
|
||||
|
@ -484,6 +490,7 @@ GetProcessorInformation(VOID)
|
|||
ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
|
||||
if (ProcessorIdentifier == NULL)
|
||||
{
|
||||
DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
goto done;
|
||||
}
|
||||
|
@ -495,7 +502,10 @@ GetProcessorInformation(VOID)
|
|||
ProcessorIdentifier,
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to query Identifier value: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Query the processor name length */
|
||||
Length = 0;
|
||||
|
@ -505,13 +515,17 @@ GetProcessorInformation(VOID)
|
|||
NULL,
|
||||
&Length);
|
||||
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;
|
||||
}
|
||||
|
@ -523,7 +537,10 @@ GetProcessorInformation(VOID)
|
|||
ProcessorNameString,
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Query the vendor identifier length */
|
||||
Length = 0;
|
||||
|
@ -533,13 +550,17 @@ GetProcessorInformation(VOID)
|
|||
NULL,
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status) || (Length == 0))
|
||||
{
|
||||
DPRINT1("Failed to query VendorIdentifier value: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Allocate a buffer large enough to be zero terminated */
|
||||
Length += sizeof(UNICODE_NULL);
|
||||
ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
|
||||
if (ProcessorVendorIdentifier == NULL)
|
||||
{
|
||||
DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
goto done;
|
||||
}
|
||||
|
@ -551,7 +572,10 @@ GetProcessorInformation(VOID)
|
|||
ProcessorVendorIdentifier,
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to query VendorIdentifier value: 0x%lx\n", Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Change spaces to underscores */
|
||||
for (i = 0; i < wcslen(ProcessorIdentifier); i++)
|
||||
|
|
Loading…
Reference in a new issue