Cyril Plisko wrote:
> On 11/14/06, Dan Mick <[EMAIL PROTECTED]> wrote:
>
>> >> Cyril, what happens when you enabled this BAR - presumably it needs
>> >> resources allocated to it?
>> >
>> > Yes, I need to map this BAR. If that is what you mean by allocating
>> > resources
>>
>> well, "map this BAR" is ambiguous. Physical memory space needs to be
>
> Hm, by "map this BAR" I mean that I want ddi_regs_map_setup() call to
> succeed.
> Is it less ambiguous now ?
Ah, sorry I earlier misunderstood what you were trying to achieve.
>
>> carved out from the memory map of the machine, of a length
>> appropriate for
>> the registers on the card. I've no idea how a generic PCI enumerator is
>> supposed to handle such an abomination.
>
> Abomination is strong word, but it, probably, appropriate here...
Sounds that way.
>
>>
>> >
>> >> Does the device work in a degraded mode without this register
>> enabled?
>> >
>> > It is more like the device is doing something else. This vendor
>> specific
>> > register has far reaching implication. When I set the bit I want,
>> not only
>> > additional BAR appears, but even PCI subclass is changing reflecting
>> > the fact that device has new capability.
>> >
>> > I think the designers of that hardware assumed that tinkering with the
>> > vendor specific register and enumeration is done as one step, but
>> > with Solaris that is not true.
>>
>> or other OSes, I bet.
>
> I lack a relevant experience to say that for other OSes.
> Would, say, Linux have similar problems with such a device ?
Can't speak for Linux, but NetBSD certainly would have problems. A lot
of OS' and firmware do things like allocate address space (not
necessarily setting up the mappings, but setting aside address regions)
for these BARs at early initialization, long before a device-specific
driver gets a chance to look at the device. There is not always a nice
clean way to redo that after the device is initialized.
>
>> The only thought that comes to mind is a device-specific hack in the
>> generic allocation routines.
>
> I am willing to invest some time into hacking this, what would be the
> place to start looking at (from your experience) ? pci_autoconfig ?
>
> when my laptop boots it spits the following message to /var/adm/messages.
> Nov 14 08:54:54 zulu pci_autoconfig: [ID 771164 kern.info] NOTICE:
> reprogram pci device [0/2/1] (pci1014,582)
>
> Does it mean that similar hacks are already exist in pci_autoconfig ?
>
What kind of device is this, by the way? This thing sounds completely
horrid.
-- Garrett
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code