Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2005 12:12:27 +0800
From:      kylin <fierykylin@gmail.com>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-current@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re: what is the init entrance for pci bus scan in FREEbsd?
Message-ID:  <87ab37ab050606211290c3220@mail.gmail.com>
In-Reply-To: <20050605.110508.101566419.imp@bsdimp.com>
References:  <87ab37ab05060108167dee1d6@mail.gmail.com> <20050605.110508.101566419.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
sir :
it is a great pleasure to get ur reply .thank you very much for your words

below is my appinion , i will report with the advance of my work

On 6/6/05, M. Warner Losh <imp@bsdimp.com> wrote:
> I'm not sure I understand what you are getting at here.  First, devd
> already provides 95% of the infrastructure to do things when devices
> are added to the system.
sorry ,i ignore it!! it is really a lite tool:) ,but it seems that
/dev/devctl does not present the function to write to the devctl,then
I think it is impossible to  give order to disable or enable the pci
slots without making changes.
static struct cdevsw dev_cdevsw =3D {
=09.d_version =3D=09D_VERSION,
=09.d_flags =3D=09D_NEEDGIANT,
=09.d_open =3D=09devopen,
=09.d_close =3D=09devclose,
=09.d_read =3D=09devread,
=09.d_ioctl =3D=09devioctl,
=09.d_poll =3D=09devpoll,
=09.d_name =3D=09"devctl",
=09.d_maj =3D=09CDEV_MAJOR,
};

 i need the function to cooperated with the hardware to detect the
present of  card ,and  enumerate the bus , and add it to the bus ,
then it is devd that should come into play( like the sbin/hotplug in
linux?):)
> Second, you assume that linux's way of doing things is how FreeBSD
> does things.  This isn't the case. FreeBSD scans the bus at pci bus
> attach time and adds chilren nodes that it finds.  In the Cardbus
> case, it will add nodes as the card bus bridge tells us of children,
> and then probe/attaches them.=20
i mean the enumeration  way . and the trickes to talk with the hotplug brid=
ge.
BTW pci_init()  is the start point for PCI enumeration in linux. The
way to add the device to the lists

 > Finally, you should send me your work for review.  I've been keen on
> expanding pci bus support for a long time and would be happy to review
> such changes.

> BTW, Which chipsets and hotplugging methods do you support?
i will begin with the fake way here ,then give support to pciexpress
native hotplug .there is common register interface for pci e hotplug
first ,i will not change the source ,just add a module.


--=20
we who r about to die,salute u!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ab37ab050606211290c3220>