misc questions about the device&driver arch
avalonwallace at gmail.com
Tue May 30 18:26:22 PDT 2006
thank sir ,below is my opinion
On 5/30/06, Scott Long <scottl at samsco.org> wrote:
> On Tue, 30 May 2006, william wallace wrote:
> > On 5/30/06, Scott Long <scottl at samsco.org> wrote:
> >> william wallace wrote:
> >> >>
> >> > I have to clarify my intentions that i am not TRYing to do a userland
> >> > PCI express driver . I just want to make a interesting branch whitch
> >> > can do pci express native Hot plug and hot remove ,with Mr Losh and
> >> > other gentlemen's help ,i am making progress ,and now a loadable
> >> > module is finishing .
> >> > I have borrowed many Ideas from Linux ,but several fatal difficulties
> >> > paused me ,with the PCI_REGMAX included.
> >> > wish to hear from u :) thank u!
> >> >
> >> The PCI_REGMAX definition is not used by the extended configuration
> >> space code. However, this code only exists on i386 right now. I
> >> haven't gotten around to implementing it on amd64 yet. Implementing
> >> it there is not just a trivial change of the defintion. Some platform
> >> specific memory map tricks need to be done. It would be possible to
> >> port the i386 code wholesale, but that code is not terribly efficient
> >> on the amd64 platform.
> >> So, what problem are you running into?
> >> Scott
> > I just implementing a i386 edition ,and i do not know if it is acpi
> > related,but as what mentioned in PCIE spec ,native pcie hotplug is
> > standard ,diffrent from ACPI hotplug .
> I've never seen hotplug implemented according to the ACPI spec except in
> one ia64 system from Intel, and that was 3 years ago. I consider the ACPI
> hotplug spec to be nearly useless. I hope that PCIe hotplug gets
> implemented according to the PCIe spec by all of the major vendors, and
> not confined to just ExpressCard.
I am thinking to implement a standard way to plug and remove a PCIE
device from the pcib-related slot
> > I am writing a demo loadable module to hot remove a specific PCIE netcard .
> > and the mainboard surely support pcie hotplug .E7520af2. but i do not
> > know if the bios support _OSC method or OSHP method
> > In the software aspect , i introduce a lot of idea and code from linux
> > ,if not boring, i list my present code below .haven't finish ,on
> > progress, maybe finish this week
> So what I'm asking is, what about the extended configuration register
> access is not working for you?
The serous problem is that :I have little idea :(
> Also, from my brief look below, you seem to have re-implemented the
> pci_read_config and pci_write_config API. This is understandable because
> the implementation is very opaque in FreeBSD (and thus is nearly
> impossible to find in the source tree), and it's not very well documented
> in any manual pages. In any case, you really don't need to do what you
> are doing with it, just use the provided pci_read|write_config primitives.
> Also, make sure that you look at the methods written by John Baldwin for
> accessing PCI capability blocks; don't invent your own methods for that
first ,let me say ,i am not so familar to the Freebsd pci configure
way ,so in my opinion and in my code ,i hold this truth to be
self-evident:that only bridge and leaf devices can use
pci_read|write_config primitives ,
and bus always use the PCI_READ_CONFIG one ,what is wrong with me :(
and sir , on the E7520 AF2 mainboard ,the first pci e hotplug driver
that i successfully run is the linux HOTPLUG_PCI_ACPI,
i really had tried to get in to the acpi ,but defeated by the
complicated image:( ,i think it is not of little importance, but
after i have read the spec , believe the pci express native way shares
a bright future for its standard form and powerfull function ,the
Linux way just have talked that
BTW :my current code is mainly translate the pcie natve hotplug from
linux , not from the spec ,and encapsulate the BSD pci config function
with the linux-alike interface , i wonder if i am walking the right
we who r about to die,salute u!
More information about the freebsd-hackers