Toru Nishimura | 12 Jun 05:11 2005

Re: boot message

Stephen Borrill said;

> A quick hacky work around is to duplicate the console/buffer logic from
aprint_normal
> to printf as below. If you want it completely silent, comment out the
lines in subr_autoconf.c
> that print "Detecting hardware", "done" and stick a return in twiddle()
(don't just force
> config_do_twiddle to 0 as this is logically mixed up with AB_QUIET mode in
config_attach()).
>
> ... twiddling flags bits in kernel printf() ...

I'm one of aprintf hater and I think this is far better.  It's a plain
mistake to
force every device driver changed to fit mis-designed feature.

Console message by kernel printf is sometimes rumbling for embed product
purpose.
I think it'd be fine to toggle the flags bit in runtime as will via
sysctl(3) interface,
not by boothowto variable which can be set once only at bootime.  I used to
practice
an MD cnputc() hack to suppress messages on demand.

Toru Nishimura/ALKYL Technology

Marcin Jessa | 21 Jun 15:50 2005

Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

Hi.

I have WRAP boards which do not have a keyboard controller. 
The system stops up when booting those boards becouse of that.
It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the one responsible for that. 
Would someone knowledgable take a look at the file and maybe fix that part?

This is what Dani Irinchev wrote once to the current list and Jukka Salmi (this fix solves the problem):

> Hi Jukka,
> Actually I got it running. It stops in the gateA20() function and is
related
> to the lack of a keyboard controller. I modified the finction gateA20 in
the
> file /usr/src/sys/arch/i386/stand/lib/gatea20.c to look like:
> 
> void gateA20()
> {
>         __asm("pushfl ; cli");
>         /*
>          * Not all systems enable A20 via the keyboard controller.
>          *      * IBM PS/2 L40
>          *      * AMD Elan SC520-based systems
>          */
>         /*
>         if (
> #ifdef SUPPORT_PS2
>             biosmca_ps2model == 0xf82 ||
> #endif
> 
(Continue reading)

Jukka Salmi | 21 Jun 16:11 2005
Picon

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

Marcin Jessa --> current-users (2005-06-21 15:50:37 +0200):
> Hi.
> 
> I have WRAP boards which do not have a keyboard controller. 
> The system stops up when booting those boards becouse of that.
> It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the
> one responsible for that. 
> Would someone knowledgable take a look at the file and maybe fix that part?

Have you already tried this patch:

http://mail-index.netbsd.org/netbsd-users/2005/06/20/0028.html

--

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

Marcin Jessa | 21 Jun 18:49 2005

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

Hi.

On Tue, 21 Jun 2005 16:11:17 +0200
Jukka Salmi <j+nbsd <at> 2005.salmi.ch> wrote:

> Marcin Jessa --> current-users (2005-06-21 15:50:37 +0200):
> > Hi.
> > 
> > I have WRAP boards which do not have a keyboard controller. 
> > The system stops up when booting those boards becouse of that.
> > It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the
> > one responsible for that. 
> > Would someone knowledgable take a look at the file and maybe fix that part?
> 
> Have you already tried this patch:
> 
> http://mail-index.netbsd.org/netbsd-users/2005/06/20/0028.html

No I have not but I will now. Thanks Jukka.
But if it works, why the heck isn't it commited?
Don't you find it irritating good code needs to be searched for on mailing lists and not picked up in the src tree?
I will post back my experience when I am done testing it on various embedded boards.

Marcin.

Jukka Salmi | 21 Jun 18:57 2005
Picon

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

Marcin Jessa --> current-users (2005-06-21 18:49:04 +0200):
> Hi.
> 
> On Tue, 21 Jun 2005 16:11:17 +0200
> Jukka Salmi <j+nbsd <at> 2005.salmi.ch> wrote:
> 
> > Marcin Jessa --> current-users (2005-06-21 15:50:37 +0200):
> > > Hi.
> > > 
> > > I have WRAP boards which do not have a keyboard controller. 
> > > The system stops up when booting those boards becouse of that.
> > > It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the
> > > one responsible for that. 
> > > Would someone knowledgable take a look at the file and maybe fix that part?
> > 
> > Have you already tried this patch:
> > 
> > http://mail-index.netbsd.org/netbsd-users/2005/06/20/0028.html
> 
> No I have not but I will now. Thanks Jukka.
> But if it works, why the heck isn't it commited?

I don't know if it works. I can't test it, I don't have a WRAP available.
The patch was only recently posted, and so far nobody reported success or
failure respectively (AFAIK).

> I will post back my experience when I am done testing it on various embedded boards.

Thanks.

(Continue reading)

David Laight | 21 Jun 19:25 2005
Picon

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

On Tue, Jun 21, 2005 at 06:49:04PM +0200, Marcin Jessa wrote:
> Hi.
> 
> On Tue, 21 Jun 2005 16:11:17 +0200
> Jukka Salmi <j+nbsd <at> 2005.salmi.ch> wrote:
> 
> > Marcin Jessa --> current-users (2005-06-21 15:50:37 +0200):
> > > Hi.
> > > 
> > > I have WRAP boards which do not have a keyboard controller. 
> > > The system stops up when booting those boards becouse of that.
> > > It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the
> > > one responsible for that. 
> > > Would someone knowledgable take a look at the file and maybe fix that part?
> > 
> > Have you already tried this patch:
> > 
> > http://mail-index.netbsd.org/netbsd-users/2005/06/20/0028.html
> 
> No I have not but I will now. Thanks Jukka.
> But if it works, why the heck isn't it commited?

Because the code that is there was added for a reason - probably to
make some other motherboard work properly.  Unless and until you
understand the full ramifications of such a change, you are likely
to break the boot code on some other platform.

The A20 gate is a horrid hack, and it is probably difficult to find any
reasonable amount of documentation about it.

(Continue reading)

Perry E. Metzger | 21 Jun 22:47 2005

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c


David Laight <david <at> l8s.co.uk> writes:
>> No I have not but I will now. Thanks Jukka.
>> But if it works, why the heck isn't it commited?
>
> Because the code that is there was added for a reason - probably to
> make some other motherboard work properly.

In fact, there are a very large number of boards that require (or used
to require) the Gate A20 hack.

> Unless and until you understand the full ramifications of such a
> change, you are likely to break the boot code on some other
> platform.
>
> The A20 gate is a horrid hack, and it is probably difficult to find any
> reasonable amount of documentation about it.

What we might do is explicitly check whether or not the device is
there before hitting gate A20, but on the other hand I don't know if
there is an easy way to do that.

--

-- 
Perry E. Metzger		perry <at> piermont.com

Marcin Jessa | 22 Jun 00:29 2005

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

On Tue, 21 Jun 2005 18:25:28 +0100
David Laight <david <at> l8s.co.uk> wrote:

> On Tue, Jun 21, 2005 at 06:49:04PM +0200, Marcin Jessa wrote:
> > Hi.
> > 
> > On Tue, 21 Jun 2005 16:11:17 +0200
> > Jukka Salmi <j+nbsd <at> 2005.salmi.ch> wrote:
> > 
> > > Marcin Jessa --> current-users (2005-06-21 15:50:37 +0200):
> > > > Hi.
> > > > 
> > > > I have WRAP boards which do not have a keyboard controller. 
> > > > The system stops up when booting those boards becouse of that.
> > > > It seems like the /usr/src/sys/arch/i386/stand/lib/gatea20.c file is the
> > > > one responsible for that. 
> > > > Would someone knowledgable take a look at the file and maybe fix that part?
> > > 
> > > Have you already tried this patch:
> > > 
> > > http://mail-index.netbsd.org/netbsd-users/2005/06/20/0028.html
> > 
> > No I have not but I will now. Thanks Jukka.
> > But if it works, why the heck isn't it commited?
> 
> Because the code that is there was added for a reason - probably to
> make some other motherboard work properly.  Unless and until you
> understand the full ramifications of such a change, you are likely
> to break the boot code on some other platform.
> The A20 gate is a horrid hack, and it is probably difficult to find any
(Continue reading)

Perry E. Metzger | 22 Jun 04:21 2005

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c


Marcin Jessa <lists <at> yazzy.org> writes:
> On FreeBSD it's enough to remove keyboard support from the kernel to
> be able to boot devices that do not have it.

That's probably not quite the right way to do it. We'd like GENERIC to
work on such devices as well. The right thing is probably to do some
sort of probe to determine if the A20 hack is impossible before trying
it.

Perry

Gavan Fantom | 22 Jun 04:50 2005

Re: Issue with /usr/src/sys/arch/i386/stand/lib/gatea20.c

Perry E. Metzger wrote:
> Marcin Jessa <lists <at> yazzy.org> writes:
> 
>>On FreeBSD it's enough to remove keyboard support from the kernel to
>>be able to boot devices that do not have it.
> 
> 
> That's probably not quite the right way to do it. We'd like GENERIC to
> work on such devices as well. The right thing is probably to do some
> sort of probe to determine if the A20 hack is impossible before trying
> it.

If this probe proves tricky, it may be worth adding a config option here.

--

-- 
Gilette - the best a man can forget


Gmane