Add some DPRINTs on failure

svn path=/trunk/; revision=62642
This commit is contained in:
Timo Kreuzer 2014-04-06 08:55:44 +00:00
parent f3d151acd3
commit 4d99280429

View file

@ -465,7 +465,10 @@ GetProcessorInformation(VOID)
KEY_READ, KEY_READ,
&ProcessorHandle); &ProcessorHandle);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to open CentralProcessor registry key: 0x%lx\n", Status);
goto done; goto done;
}
/* Query the processor identifier length */ /* Query the processor identifier length */
Status = AcpiRegQueryValue(ProcessorHandle, Status = AcpiRegQueryValue(ProcessorHandle,
@ -474,7 +477,10 @@ GetProcessorInformation(VOID)
NULL, NULL,
&Length); &Length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to query Identifier value: 0x%lx\n", Status);
goto done; goto done;
}
/* Remember the length as fallback for level 1-3 length */ /* Remember the length as fallback for level 1-3 length */
Level1Length = Level2Length = Level3Length = Length; Level1Length = Level2Length = Level3Length = Length;
@ -484,6 +490,7 @@ GetProcessorInformation(VOID)
ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
if (ProcessorIdentifier == NULL) if (ProcessorIdentifier == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;
goto done; goto done;
} }
@ -495,7 +502,10 @@ GetProcessorInformation(VOID)
ProcessorIdentifier, ProcessorIdentifier,
&Length); &Length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to query Identifier value: 0x%lx\n", Status);
goto done; goto done;
}
/* Query the processor name length */ /* Query the processor name length */
Length = 0; Length = 0;
@ -505,13 +515,17 @@ GetProcessorInformation(VOID)
NULL, NULL,
&Length); &Length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
goto done; goto done;
}
/* Allocate a buffer large enough to be zero terminated */ /* Allocate a buffer large enough to be zero terminated */
Length += sizeof(UNICODE_NULL); Length += sizeof(UNICODE_NULL);
ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
if (ProcessorNameString == NULL) if (ProcessorNameString == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;
goto done; goto done;
} }
@ -523,7 +537,10 @@ GetProcessorInformation(VOID)
ProcessorNameString, ProcessorNameString,
&Length); &Length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to query ProcessorNameString value: 0x%lx\n", Status);
goto done; goto done;
}
/* Query the vendor identifier length */ /* Query the vendor identifier length */
Length = 0; Length = 0;
@ -533,13 +550,17 @@ GetProcessorInformation(VOID)
NULL, NULL,
&Length); &Length);
if (!NT_SUCCESS(Status) || (Length == 0)) if (!NT_SUCCESS(Status) || (Length == 0))
{
DPRINT1("Failed to query VendorIdentifier value: 0x%lx\n", Status);
goto done; goto done;
}
/* Allocate a buffer large enough to be zero terminated */ /* Allocate a buffer large enough to be zero terminated */
Length += sizeof(UNICODE_NULL); Length += sizeof(UNICODE_NULL);
ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
if (ProcessorVendorIdentifier == NULL) if (ProcessorVendorIdentifier == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;
goto done; goto done;
} }
@ -551,7 +572,10 @@ GetProcessorInformation(VOID)
ProcessorVendorIdentifier, ProcessorVendorIdentifier,
&Length); &Length);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to query VendorIdentifier value: 0x%lx\n", Status);
goto done; goto done;
}
/* Change spaces to underscores */ /* Change spaces to underscores */
for (i = 0; i < wcslen(ProcessorIdentifier); i++) for (i = 0; i < wcslen(ProcessorIdentifier); i++)