Date: Sun, 21 Mar 2004 10:29:09 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Valentin Nechayev <netch@ivb.nn.kiev.ua> Cc: "M. Warner Losh" <imp@bsdimp.com> Subject: Re: cvs commit: src/sys/conf files src/sys/dev/uart uart_cpu.h uart_cpu_alpha.c uart_cpu_amd64.c uart_cpu_i386.c uart_cpu_ia64.c uart_cpu_pc98.c uart_cpu_sparc64.c uart_subr.c Message-ID: <20040321182909.GA2418@dhcp01.pn.xcllnt.net> In-Reply-To: <20040321095156.GA4401@iv.nn.kiev.ua> References: <200403200214.i2K2E3ps052217@repoman.freebsd.org> <20040320080027.GC567@funkthat.com> <20040320085431.GA74398@dhcp01.pn.xcllnt.net> <20040320.104521.08405415.imp@bsdimp.com> <20040320200437.GB84959@dhcp01.pn.xcllnt.net> <20040321095156.GA4401@iv.nn.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 21, 2004 at 11:51:56AM +0200, Valentin Nechayev wrote: > Sat, Mar 20, 2004 at 12:04:37, marcel (Marcel Moolenaar) wrote: > > >> Only for devices that have fixed addresses. This wouldn't be true for > >> devices on the PCI bus, where probe order could affect the resources > >> assigned to a given device. The only real way for self-enumearting > >> busses are a bus-specific address. > MM> Devices that don't have a fixed address cannot be used as low-level > MM> console as there's no way we can know where the device is. > > Fixed address does not obligate to be fixed port address. Yes, it does. We have no way to talk to devices without it. > Thus happened that hints are used not only as attaching address helpers, > but also as enumeration helpers. It is highly important task for many > situations to wire down enumeration. Old config style with 'device xx1 at > yy0 target 3...' does this. If one say hints can't satisfy this task (there > was such voices in this thread), I treat them as useless and > highly confusing mechanism. They are. The problem is that hints try to solve two problems in one, when such is not possible. The first problem it tries to solve is the "I can't enumerate this bus, please help me to identify devices". The solution to this problem is: hints. Tell the kernel where it should probe for devices. The hints have no authoritative nature in that the device does not have to be there. Therefore, they are an advice only. The second problem is the "I want this device to have unit number X". The solution to this cannot be hints, because those are advisory only. You need something stronger. Something that satisfies the "I want" part of the problem. Alas, we use hints for that as well, so that the advisory nature of the hints has gone. The kernel prereserves the devices it finds as hints, which means that if there's a hint for a PCI device, the unit number is taken and the PCI device gets another one. Obviously, this annihilates the solution to the second problem and you end up with something that's only partially a solution to either problem. On other words: flawed. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040321182909.GA2418>