Urgent-Problem in HalAssignSlotResources

Hello SIr,

I used HalAssignSlotResources function to get Interrupt no, Interrupt
level,and Base addresses. I used NT checked version in debug mode for
development. In WinDbg application HalAssignSlotResources giving message
that it acquired 3 resources and displaying all the information, but when I
tried to access the PCM_RESOURCE_LIST variable Count, it is showing value
as a 1, and that is for interrupt related information. I was not able to
access the memory and IO base addresses.

The part of debug information is :
Alternative #0 - 3 required resources
*** INT Min: c, Max: c
*** P IO Min: 0:00002000, Max: 0:000020ff, Algn: 100, Len 100
IO Min: 0:00002000, Max: 0:000020ff, Algn: 100, Len 100
*** P MEM Min: 0:fd000000, Max: 0:fd0003ff, Algn: 400, Len 400
MEM Min: 0:fd000000, Max: 0:fd0003ff, Algn: 400, Len 400
Acquired Resourses - 3
INT Level c, Vector c
IO Start 0:00002000, Len 100
MEM Start 0:fd000000, Len 400
HalAssignSlotResources returns STATUS_SUCCESS
AssignedResources->Count = 1
Interrupt Vector = C
Interrupt level = C
Interrupt Flag = 0

The part source code is :

if(HalAssignSlotResources( &gRegistryPath,
NULL,
gDriverObject,
NULL,
PCIBus,
BusNo,
SlotNumber,
&AssignedResources) == STATUS_SUCCESS)
{
#ifdef INIT_DBG
DbgPrint(“HalAssignSlotResources returns STATUS_SUCCESS”);
#endif
}
else
{
#ifdef INIT_DBG
DbgPrint(“HalAssignSlotResources returns STATUS_FAILURE”);
#endif
}

#ifdef INIT_DBG
DbgPrint(“\nAssignedResources->Count = %x”, AssignedResources-

Count);
#endif

for( Index = 0; Index < AssignedResources->Count; Index++)
{
switch(AssignedResources->List-

PartialResourceList.PartialDescriptors[Index].Type)
{
case CmResourceTypePort :
*PortBaseAddress = AssignedResources->List-
PartialResourceList.PartialDescriptors[Index].u.Port.Start.LowPart;
*PortLength = (unsigned int)AssignedResources-
List->PartialResourceList.PartialDescriptors[Index].u.Port.Length;
#ifdef INIT_DBG
DbgPrint(“\nPortBaseAddress = %08lX \nPort Length = %x”,
*PortBaseAddress, *PortLength);
#endif
break;

case CmResourceTypeInterrupt :
*InterruptVector = (unsigned int)
AssignedResources->List->PartialResourceList.PartialDescriptors
[Index].u.Interrupt.Vector;
*InterruptLevel = (unsigned int)
AssignedResources->List->PartialResourceList.PartialDescriptors
[Index].u.Interrupt.Level;
*InterruptFlag = AssignedResources->List-

PartialResourceList.PartialDescriptors[Index].Flags;
#ifdef INIT_DBG
DbgPrint(“\nInterrupt Vector = %X \nInterrupt level = %X”,
*InterruptVector, *InterruptLevel);
DbgPrint(“\nInterrupt Flag = %X”, *InterruptFlag);
#endif
break;

case CmResourceTypeMemory :
*MemoryBaseAddress = AssignedResources->List-

PartialResourceList.PartialDescriptors[Index].u.Memory.Start.LowPart;
*MemoryLength = (unsigned int)AssignedResources-
List->PartialResourceList.PartialDescriptors[Index].u.Memory.Length;
#ifdef INIT_DBG
DbgPrint(“\nMemoryBaseAddress = %08lX \nMemory Length = %x”,
*MemoryBaseAddress, *MemoryLength);
#endif
break;

default :
break;
}
}

Waiting for help.

Thank you.

Regards,
Mohan


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi All,

I have had a look in the problem Mohan describes.
The first interesting fact is that though the ‘HalAssignSlotResources’
reports only one resource acquired (AssignedResources->Count = 1), it is
actually allocating the remaiing 2 resources (Interrupt and IO range).
The second thing is these 2 lines :
IoTranslateResourceList: address could not be translated
IoReportResourceUsage: Bad resource list being translated

As a result, a subsequent call to ‘NdisMMapIoSpace’ fails with
STATUS_FAILURE even though all the parameters passed to it are correct.

If anybody could give some explanation, it will be greatly appreciated.

Regards,
Abhijit


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

So, HalAssignSlotResources fails to return a descriptor for the interrupt?
Then check your “PnP OS Installed” BIOS setting to be “No”.
For details, read MSDN for PCI IRQ Steering not supported by NT4.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Friday, November 09, 2001 5:23 AM
Subject: [ntdev] Re: Urgent-Problem in HalAssignSlotResources

> Hi All,
>
> I have had a look in the problem Mohan describes.
> The first interesting fact is that though the ‘HalAssignSlotResources’
> reports only one resource acquired (AssignedResources->Count = 1), it is
> actually allocating the remaiing 2 resources (Interrupt and IO range).
> The second thing is these 2 lines :
> IoTranslateResourceList: address could not be translated
> IoReportResourceUsage: Bad resource list being translated
>
> As a result, a subsequent call to ‘NdisMMapIoSpace’ fails with
> STATUS_FAILURE even though all the parameters passed to it are correct.
>
> If anybody could give some explanation, it will be greatly appreciated.
>
> Regards,
> Abhijit
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com