Re: PCI bus enumeration differences between Geode and ARM

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ten (anonymous_at_tentechnologies.com)
Date: 05/19/04


Date: Wed, 19 May 2004 16:09:38 -0400

K.S.,

I've researched this and studied the code in the BSP (based on
ARMINTEGRATOR). For the RTL8139 controllers on my SBC, the code in
E:\WINCE420\PLATFORM\ARMCore\KERNEL\HAL\PCIConfig.c is doing what you
described -- allocating and placing resources. It also sets the command
register to 7 and updates the registry with the instance key. It does this
for the RTL8139 controllers by checking for a specific bus/slot/feature
triplet. The first Eth (0/15/0) is used as the EthDebug controller. I
think the reason they did it in PCIConfig.c is because the code is setting
up the ethernet debug adapter and this should happen as soon as possible.

I can copy this example and allocate and place the resources for my PCI
device in the PCIConfig.c file but the framework provides the "ConfigEntry"
registry key to have the PCI bus driver invoke this additional configuration
before it calls my Init routine. As long as I have IO, Memory, Irq, and all
the PCI registers set up before my Init routne is called, I don't really
care when it is done but I think it is better to do it in the "ConfigEntry".

My question now is: how do I determine _which_ resources I can
allocate/place while executing the "ConfigEntry" code? Do I have to
enumerate the PCI bus to see what is already allocated and work around that?
I figured the Resource Manager would be in the mix somewhere.

Thanks,
Nick.

"K. S. Huang" <ks_huang@AlphaNetworks.com_remove.this> wrote in message
news:%23c5JDJVPEHA.2876@TK2MSFTNGP09.phx.gbl...
> for pre-assigned resource PCI devices, there is some skill to avoid
> PCIBUS.DLL to dispatch resource again for those device, even
> the NoConfig is setting to 1.
>
> the PCIInitInfo can let OAL to create a new key under
> [HKLM\Drivers\BuiltIn\PCI\Instance]
> so that the PCIBus.dll will skip to dispatch resource for that device
>
> this skill is generally used in the device that have a PCI bus, and also
> using a PCI-based NIC to do the KITL connection.
>
> you may refer the $(_WINCEROOT)\PLATFORM\CEPC\KERNEL\HAL\halkitl.c for
more
> details...
>
> K. S. Huang
>
> "Ten" <anonymous@tentechnologies.com> 撰寫於郵件新聞
> :u1BqRxRPEHA.3476@tk2msftngp13.phx.gbl...
> > K.S.,
> >
> > Thanks for the information. NoConfig=1 in my plarform. I found this a
> few
> > days ago but was not eager to change it because PCIConfig.c in my
platform
> > hard codes values to some of the PCI devices (mem and IO). I thought
this
> > might break the whole platform so I decided to reseach the problem a
> little
> > more before trying the change.
> >
> > I'll give the change a try now that I have collected some more
> information.
> >
> > Much thanks!
> >
> > Nick.
> >
> >
> >
> >
> >
> > "K. S. Huang" <ks_huang@AlphaNetworks.com_remove.this> wrote in message
> > news:%23EpWFiJPEHA.268@TK2MSFTNGP11.phx.gbl...
> > > PCI-based device need to be configured and dispatch rsources before
they
> > can
> > > be used.
> > > On most x86 system, device emunration and resource dispatch is done by
> the
> > > BIOS.
> > > But there is no BIOS in ARM-based system, so the resource dispatch
will
> be
> > > handled by the PCIBUS.DLL ot EBoot
> > > if the EBoot dose not dispatch the resource, it is resanable that in
> > OEMInit
> > > will get nothing.
> > >
> > > Event after booting up, the PCIbus.dll might not do the resource
> > dispatching
> > > if the
> > >
> > > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI]
> > > "NoConfig"=dword:1
> > >
> > > is setting to one, to enable resource dispatching by PCIBUS.DLL
> > > you 'll need to set the
> > > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI]
> > > "NoConfig"=dword:0
> > >
> > > And there might be another possbility, even the PCIBUS.DLL is trying
to
> > > dispatch the resource
> > > but the
> > >
> > > MemBase, MemLen, IoBase and IoLen in
> > > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI]
> > > dose not setting properly, the PCIBUS.DLL will think that there is NOT
> > > enough resource, so that the dispatching will still be given up!
> > >
> > >
> > > "Ten" <anonymous@tentechnologies.com> 撰寫於郵件新聞
> > > :#n$RHdFPEHA.3328@TK2MSFTNGP09.phx.gbl...
> > > > Hi,
> > > >
> > > > I have a Geode based system + a custom PCI device that works like a
> > champ.
> > > > I'm now creating a new platform for an ARM based SBC. My PCI driver
> > > > compiles and loads on the ARM. During XXX_Init I'm using
> > > > DDKReg_GetWindowInfo to obtain the Memory and IO maps for the PCI
> > device.
> > > > Under the Geode, I get valid IO and Memory windows. On the ARM, I
get
> > > empty
> > > > structures returned.
> > > >
> > > > I noticed that my command register is 0. On the Geode it contains
7.
> > Am
> > > I
> > > > supposed to write this value from the driver (in the call defined by
> > > > ConfigEntry, similar to the sample in gdcfg.c) or is this supposed
to
> be
> > > > written by the bus enumerator? If me, why does the bus enumerator
not
> > > > handle my device? Is there another way to configure the device?
> > > >
> > > > Here's the dump of PCI Enum on my ARM platform. My PCI device is
last
> > in
> > > > the list, 0/18/0.
> > > >
> > > > Bus/Device/Function = 0/1/0, Host / PCI Bridge
> > > > VendorID = 0x1283, DeviceID = 0x8152, Command = 0x0006, Status =
> > 0x2200
> > > > RevisionID = 0x20, ProgIf = 0x00, SubClass = 0x00, BaseClass =
0x06
> > > > CacheLineSize = 0x00, LatencyTimer = 0x00, HeaderType = 0x80, BIST
=
> > > 0x00
> > > > BaseAddresses:
> > > > 0xA0000008 0xBCF00001 0x00000000 0x00000000 0x00000000
> > 0x00000000
> > > > CIS = 0x00000000, SubVendorID = 0x0000, SubSystemID = 0x0000
> > > > ROMBaseAddress = 0x00000000
> > > > InterruptLine = 0x00, InterruptPin = 0x00, MinGrant = 0x00,
> MaxLatency
> > =
> > > > 0x00
> > > >
> > > > Bus/Device/Function = 0/15/0, Ethernet Network Controller
> > > > VendorID = 0x10EC, DeviceID = 0x8139, Command = 0x0007, Status =
> > 0x0290
> > > > RevisionID = 0x10, ProgIf = 0x00, SubClass = 0x00, BaseClass =
0x02
> > > > CacheLineSize = 0x00, LatencyTimer = 0x00, HeaderType = 0x00, BIST
=
> > > 0x00
> > > > BaseAddresses:
> > > > 0xBCE13101 0xB9001000 0x00000000 0x00000000 0x00000000
> > 0x00000000
> > > > CIS = 0x00000000, SubVendorID = 0x10EC, SubSystemID = 0x8139
> > > > ROMBaseAddress = 0x00000000
> > > > InterruptLine = 0x24, InterruptPin = 0x01, MinGrant = 0x20,
> MaxLatency
> > =
> > > > 0x40
> > > >
> > > > Bus/Device/Function = 0/16/0, Ethernet Network Controller
> > > > VendorID = 0x10EC, DeviceID = 0x8139, Command = 0x0007, Status =
> > 0x0290
> > > > RevisionID = 0x10, ProgIf = 0x00, SubClass = 0x00, BaseClass =
0x02
> > > > CacheLineSize = 0x00, LatencyTimer = 0x00, HeaderType = 0x00, BIST
=
> > > 0x00
> > > > BaseAddresses:
> > > > 0xBCE13001 0xB9000000 0x00000000 0x00000000 0x00000000
> > 0x00000000
> > > > CIS = 0x00000000, SubVendorID = 0x10EC, SubSystemID = 0x8139
> > > > ROMBaseAddress = 0x00000000
> > > > InterruptLine = 0x22, InterruptPin = 0x01, MinGrant = 0x20,
> MaxLatency
> > =
> > > > 0x40
> > > >
> > > > Bus/Device/Function = 0/18/0, Other Bridge
> > > > VendorID = 0x10B5, DeviceID = 0x9054, Command = 0x0000, Status =
> > 0x0290
> > > > RevisionID = 0x0C, ProgIf = 0x00, SubClass = 0x80, BaseClass =
0x06
> > > > CacheLineSize = 0x00, LatencyTimer = 0x00, HeaderType = 0x00, BIST
=
> > > 0x00
> > > > BaseAddresses:
> > > > 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
> > 0x00000000
> > > > CIS = 0x00000000, SubVendorID = 0x10B5, SubSystemID = 0x9054
> > > > ROMBaseAddress = 0x00000000
> > > > InterruptLine = 0x00, InterruptPin = 0x01, MinGrant = 0x00,
> MaxLatency
> > =
> > > > 0x00
> > > >
> > > >
> > > > Thanks!
> > > > Nick.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • [RFC] Revised CKRM release
    ... The Class-based Resource Management project is happy to release the ... A filesystem-based user interface, proposed by Rik van Riel, to ... useful for controlling groups of sockets. ... Resource controllers are now explicitly associated with a ...
    (Linux-Kernel)
  • Re: Cluster Resource replacing physical server
    ... Controllers had all been synchronized with the each other, ... Delete original computer account and replicate to all domain ... Create cluster resource ... Directory and the Kerberos authentication is not enabled for the ...
    (microsoft.public.sqlserver.clustering)
  • Invalid PnP ACPI reserved MMIO areas on Supermicro boards
    ... Some people with certain Supermicro boards have reported that the sata_nv driver fails to attach to some of the controllers due to resource conflicts: ... ACPI: PCI interrupt for device 0000:80:07.0 disabled ...
    (Linux-Kernel)
  • Re: [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller
    ... requirements of a resource management solution for Linux kernel. ... easy merge and it was just awaiting some useful controllers to come along. ... What mechanism to use for grouping tasks and ... primarily because cpuset already exists in the kernel and also ...
    (Linux-Kernel)
  • Re: [Lse-tech] [PATCH] cpusets - big numa cpu and memory placement
    ... > Cpusets are a complex resource which needs to be managed. ... I really don't care too much about the interface as long ... > separate resource controllers, the really acceptable end result would ...
    (Linux-Kernel)