HalAssignSlotResources overlaps PCI address windows

I have read up on previous postings regarding the occasional unexpected
address reassignment by HalAssignSlotResources(), and am inquiring as to
whether there are alternative solutions to the problem.

Current workarounds: (1) using /pcilock on WinNT 4.0 command, (2) avoiding
use of HalAssignSlotResources() altogether.

Summary of the problem:

We have two PCI adapters, both behind an Intel bridge. The first adapter
(bus 2, device 0x0B, function 0) exposes three memory windows, 4KB, 2MB,
and 8MB. The second adapter (bus 2, device 0x0D, function 0) exposes one
8MB memory window.

After BIOS, all PCI BARs (system-wide) are set up in a correct
configuration, with no overlapping windows:
Bus 2, Dev 0x0B: FC000000 (8MB)
F4008000 (4KB)
F4200000 (2MB)
Bus 2, Dev 0x0D: FC800000 (8MB)

The driver for the first adapter loads first. When it calls
HalAssignSlotResources(), it uses all default arguments (no registry
info). By snooping with a PCI Bus analyzer, we confirm that
HalAssignSlotResources() and its surrogates do the following:

  • Read the configuration space
  • Write the configuration space to size it
  • Read the sized info (I verified that this is still correct from the
    adapter’s perspective)
  • Restore the saved data read in the first step
  • REWRITE the BARs

In the last step, the 8MB BAR is replaced with a value of FC800000, which
conflicts with the (2,0x0D,0) device.

When the driver subsequently attempts to access the overmapped window, the
system understandably hangs.

We are using the /pcilock workaround for now, and considering whether to
use HalAssignSlotResources() at all, and would welcome suggestions.

Thanks!
Gary Maxwell
Vertical Networks

I believe this is fixed in w2k. Other than that, pcilock is the only
solution I know of. Tried nt4 sp6?

=====================
Mark Roddy
Windows XP/2000/NT Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Maxwell
Sent: Wednesday, March 13, 2002 9:49 PM
To: NT Developers Interest List
Subject: [ntdev] HalAssignSlotResources overlaps PCI address windows

I have read up on previous postings regarding the occasional
unexpected address reassignment by HalAssignSlotResources(),
and am inquiring as to whether there are alternative
solutions to the problem.

Current workarounds: (1) using /pcilock on WinNT 4.0 command,
(2) avoiding use of HalAssignSlotResources() altogether.

Summary of the problem:

We have two PCI adapters, both behind an Intel bridge. The
first adapter (bus 2, device 0x0B, function 0) exposes three
memory windows, 4KB, 2MB, and 8MB. The second adapter (bus 2,
device 0x0D, function 0) exposes one 8MB memory window.

After BIOS, all PCI BARs (system-wide) are set up in a
correct configuration, with no overlapping windows: Bus 2,
Dev 0x0B: FC000000 (8MB)
F4008000 (4KB)
F4200000 (2MB)
Bus 2, Dev 0x0D: FC800000 (8MB)

The driver for the first adapter loads first. When it calls
HalAssignSlotResources(), it uses all default arguments (no
registry info). By snooping with a PCI Bus analyzer, we confirm that
HalAssignSlotResources() and its surrogates do the following:

  • Read the configuration space
  • Write the configuration space to size it
  • Read the sized info (I verified that this is still correct
    from the adapter’s perspective)
  • Restore the saved data read in the first step
  • REWRITE the BARs

In the last step, the 8MB BAR is replaced with a value of
FC800000, which conflicts with the (2,0x0D,0) device.

When the driver subsequently attempts to access the
overmapped window, the system understandably hangs.

We are using the /pcilock workaround for now, and considering
whether to use HalAssignSlotResources() at all, and would
welcome suggestions.

Thanks!
Gary Maxwell
Vertical Networks


You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
%%email.unsub%%

Had faced a similar problem. Tried to flash a different compatible version
of BIOS on the board and it worked.

Mark Roddy wrote:

I believe this is fixed in w2k. Other than that, pcilock is the only
solution I know of. Tried nt4 sp6?

=====================
Mark Roddy
Windows XP/2000/NT Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary Maxwell
> Sent: Wednesday, March 13, 2002 9:49 PM
> To: NT Developers Interest List
> Subject: [ntdev] HalAssignSlotResources overlaps PCI address windows
>
>
> I have read up on previous postings regarding the occasional
> unexpected address reassignment by HalAssignSlotResources(),
> and am inquiring as to whether there are alternative
> solutions to the problem.
>
> Current workarounds: (1) using /pcilock on WinNT 4.0 command,
> (2) avoiding use of HalAssignSlotResources() altogether.
>
> Summary of the problem:
>
> We have two PCI adapters, both behind an Intel bridge. The
> first adapter (bus 2, device 0x0B, function 0) exposes three
> memory windows, 4KB, 2MB, and 8MB. The second adapter (bus 2,
> device 0x0D, function 0) exposes one 8MB memory window.
>
> After BIOS, all PCI BARs (system-wide) are set up in a
> correct configuration, with no overlapping windows: Bus 2,
> Dev 0x0B: FC000000 (8MB)
> F4008000 (4KB)
> F4200000 (2MB)
> Bus 2, Dev 0x0D: FC800000 (8MB)
>
> The driver for the first adapter loads first. When it calls
> HalAssignSlotResources(), it uses all default arguments (no
> registry info). By snooping with a PCI Bus analyzer, we confirm that
> HalAssignSlotResources() and its surrogates do the following:
>
> - Read the configuration space
> - Write the configuration space to size it
> - Read the sized info (I verified that this is still correct
> from the adapter’s perspective)
> - Restore the saved data read in the first step
> - REWRITE the BARs
>
> In the last step, the 8MB BAR is replaced with a value of
> FC800000, which conflicts with the (2,0x0D,0) device.
>
> When the driver subsequently attempts to access the
> overmapped window, the system understandably hangs.
>
> We are using the /pcilock workaround for now, and considering
> whether to use HalAssignSlotResources() at all, and would
> welcome suggestions.
>
> Thanks!
> Gary Maxwell
> Vertical Networks
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> %%email.unsub%%
>
>

> In the last step, the 8MB BAR is replaced with a value of FC800000, which

conflicts with the (2,0x0D,0) device.

Amazing.
HalAssignSlotResources call IoAssignResources inside to arbitrate the apertures against the registry-based arbiter
(HARDWARE\OwnerMap or such). So, they must not conflict.
It’s some bizarre bug.

Max

Hi all,

Can you help in knowing whether windows is running or not from a DOS based
application.

Is there any way to know the mode(Real or Protected) of the processor of
the system.

Any information is helpful.
Thanx in advance.

Regards,
Kedar.