Re: config/hints changes: panic booting pcvt kernel

2000-07-14 Thread Hellmuth Michaelis

>From the keyboard of Hellmuth Michaelis:

> I'm currently re-cvsupping/recompiling a completly fresh tree to reproduce
> this to make shure it is really this single printf.

Its reproducible. Different machine/location/hardware, cvsupped 3 hr's
ago, rm /usr/src, /usr/obj, make world, make kernel. This one single printf 
makes the difference between a the panic or run fine.

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-14 Thread Hellmuth Michaelis

>From the keyboard of Steve O'Hara-Smith:
> On 13-Jul-00 Hellmuth Michaelis wrote:
> > I'm now completely out of ideas 
> 
> Try and pin down which printf really makes a difference ?

Ok, did that. Surprise: i removed all the debugging code and all changes
i made to track down what happenes in the kbd driver as well as the pcvt
driver - everything now is completely as it was and it tracks down to
a single printf in /sys/dev/kbd.c: adding it lets a pcvt kernel boot
as happily as before, removing this printf gives the described panic:

/* find the keyboard specified by a driver name and a unit number */
int
kbd_find_keyboard(char *driver, int unit)
{
int i;

printf("kbd_find_keyboard\n");
^^
for (i = 0; i < keyboards; ++i) {
...

I'm currently re-cvsupping/recompiling a completly fresh tree to reproduce
this to make shure it is really this single printf. Also i will try out
something to make shure it is not a timing problem somewhere.

> I recall a long time ago a bit of code that had calls to a function
> that did nothing, the comment was that it prevented an MSC optimiser bug from
> screwing things up.

Oh oh ... 

I would really appreciate it if someone else would have a look at this.

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-14 Thread Hellmuth Michaelis

>From the keyboard of John Polstra:

> > i added a printf statement to the beginning of every subroutine in 
> > file /sys/dev/kbd/kbd.c and with this additions the panic disappears
> > and pcvt runs fine as ever.
> > 
> > Removing the printf's from kbd.c shows the usual described panic.
> > 
> > I'm now completely out of ideas 
> 
> It sounds like maybe an uninitialized local variable in one of the
> functions.

This should cause a warning from the compiler, shouldn't it ?
All the files in question compile without any warning at all.

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-13 Thread John Polstra

In article <[EMAIL PROTECTED]>,
Hellmuth Michaelis <[EMAIL PROTECTED]> wrote:
> 
> i added a printf statement to the beginning of every subroutine in 
> file /sys/dev/kbd/kbd.c and with this additions the panic disappears
> and pcvt runs fine as ever.
> 
> Removing the printf's from kbd.c shows the usual described panic.
> 
> I'm now completely out of ideas 

It sounds like maybe an uninitialized local variable in one of the
functions.

John
-- 
  John Polstra   [EMAIL PROTECTED]
  John D. Polstra & Co., Inc.Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-13 Thread Steve O'Hara-Smith


On 13-Jul-00 Hellmuth Michaelis wrote:
> I'm now completely out of ideas 

Try and pin down which printf really makes a difference ?

I recall a long time ago a bit of code that had calls to a function
that did nothing, the comment was that it prevented an MSC optimiser bug from
screwing things up.

--
Steve O'Hara-Smith <[EMAIL PROTECTED]>

http://sohara.webhop.net/ A Better Way To Focus The Sun


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-13 Thread Hellmuth Michaelis


Just for the record:

i added a printf statement to the beginning of every subroutine in 
file /sys/dev/kbd/kbd.c and with this additions the panic disappears
and pcvt runs fine as ever.

Removing the printf's from kbd.c shows the usual described panic.

I'm now completely out of ideas 

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-09 Thread Hellmuth Michaelis

>From the keyboard of Daniel C. Sobral:
> Hellmuth Michaelis wrote:
> > 
> > Thanks for the reply - it seems indeed to be a strange problem. In the mean-
> > time i found out that the pcvt probe routine was never called until i added
> > something like DEVMETHOD(device_identify, pcvt_identify) to the device
> > methods structure.
> 
> It didn't? Please, interrupt loader(8) and type "show", and verify that
> hint.vt.0.at="isa" is present.

It is present.

> Did you add options USERCONFIG to see if that helps?

It was already there, it didn't help.

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-09 Thread Daniel C. Sobral

Hellmuth Michaelis wrote:
> 
> Thanks for the reply - it seems indeed to be a strange problem. In the mean-
> time i found out that the pcvt probe routine was never called until i added
> something like DEVMETHOD(device_identify, pcvt_identify) to the device
> methods structure.

It didn't? Please, interrupt loader(8) and type "show", and verify that
hint.vt.0.at="isa" is present. If not... Either it is somehow missing
from /boot/device.hints (it shouldn't -- GENERIC.hints does have it), or
you don't have the default /boot/loader.rc & cia.

> But the effect is the same, it still panics after
> 
> atkbdc0:  at port 0x60,0x64 on isa0

Did you add options USERCONFIG to see if that helps?

> Any hints from the more "hints-knowledged" would be highly appreciated .. ;-)

Well, I'm definitely not the people to ask for help. That's why I'm
cc'ing Peter on this, though. :-)

-- 
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

 _DES: The Book of Bruce has only one sentence in it, and it says
"the actual directives of my cult are left as an exercise for the
reader. Good luck."
 jkh: does it really include the 'good luck' part?
 EE: OK, I made that part up.
 EE: I figured it should sound a bit more cheery than how Bruce
initially dictated it to me.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-09 Thread Hellmuth Michaelis

>From the keyboard of Daniel C. Sobral:

> > After the latest config/hints changes, just commenting the syscons driver
> > "sc" line and uncommenting the pcvt "vt" line in the GENERIC kernel config
> > file, a booting kernel panics after the the message "atkbdc0:  > controller (i8042)> .." with a fatal trap 12, page fault while in kernel mode.
> > 
> > This is reliably reproducible on my 2 test machines running current cvsuped
> > a day ago.
> > 
> > I'm now trying and searching for two days and i'm running out of ideas. It
> > might be that i'm doing something very stupid here, but i tried hard to make
> > shure i'm doing not. Help 
> 
> I recall there were lots of problems with syscons after the hints
> change. *IF* people had the USERCONFIG option, things would work.
> Otherwise...
> 
> I do not know if vt suffers from the same problem, nor do I know if the
> fix done was specific to syscons or not.

Thanks for the reply - it seems indeed to be a strange problem. In the mean-
time i found out that the pcvt probe routine was never called until i added
something like DEVMETHOD(device_identify, pcvt_identify) to the device
methods structure.

But the effect is the same, it still panics after 

atkbdc0:  at port 0x60,0x64 on isa0

with

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc019c73f
stack pointer   = 0x10:0xc0346aac
frame pointer   = 0x10:0xc0346aac
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 0 (swapper)
interrupt mask  = net tty bio cam
kernel: type 12 trap, code=0
Stopped at  strcmp+0x1b:cmpb%al,0(%edx)

a ddb trace gives:

strcmp(0,c026a120) at strcmp+0x1b
kbd_get_switch(c026a120,c0a2d060,c0a6a880,c0346b10,c0241bb8) at kbd_get_switch+$
atkbd_probe_unit(0,0,1,1,c0a2e078) at atkbd_probe_unit+0x10
atkbdprobe(c0a72a80,c0a72a80,c0a6a880,c0a72a80,1) at atkbdprobe+0xdc
device_probe_child(c0a6a880,c0a72a80,c0a72a80,c0a6a880,0) at device_probe_child$
device_probe_and_attach(c0a72a80) at device_probe_and_attach+0x35
bus_generic_attach(c0a6a880,c0a2d080,c0a5b780,c0a6a880,1) at bus_generic_attach$
atkbdc_attach(c0a6a880,c0a6a880,c0346bc8,8,0) at atkbdc_attach+0x18c
device_probe_and_attach(c0a6a880) at device_probe_and_attach+0x8e   
isa_probe_children(c0a5b780) at isa_probe_children+0xde
configure(0,344c00,34b000,0,c011c6d4) at configure+0x4a
mi_startup(c0346fb4,b0246,ffe,34b000,c017417d) at mi_startup+0x70
begin() at begin+0x4b

The code where it panics is in /sys/dev/kbd/kbd.c:

SLIST_FOREACH(p, &keyboard_drivers, link) {
if (strcmp(p->name, driver) == 0)
return p->kbdsw;
}
list = (const keyboard_driver_t **)kbddriver_set.ls_items;
while ((p = *list++) != NULL) {
if (strcmp(p->name, driver) == 0)
^
return p->kbdsw;
}

when this statement should get executed.

The strange thing is that now pcvt is correctly probed and attached (and
the keyboard is accessed and does function) so the keyboard structures should
have been initialised correctly - but still there is this null pointer in the
kbd_get_switch ..

Any hints from the more "hints-knowledged" would be highly appreciated .. ;-)

hellmuth
-- 
Hellmuth MichaelisTel   +49 40 55 97 47-70
HCS Hanseatischer Computerservice GmbHFax   +49 40 55 97 47-77
Oldesloer Strasse 97-99   Mail  hm [at] hcs.de
D-22457 Hamburg   WWW   http://www.hcs.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: config/hints changes: panic booting pcvt kernel

2000-07-09 Thread Daniel C. Sobral

Hellmuth Michaelis wrote:
> 
> After the latest config/hints changes, just commenting the syscons driver
> "sc" line and uncommenting the pcvt "vt" line in the GENERIC kernel config
> file, a booting kernel panics after the the message "atkbdc0:  controller (i8042)> .." with a fatal trap 12, page fault while in kernel mode.
> 
> This is reliably reproducible on my 2 test machines running current cvsuped
> a day ago.
> 
> I'm now trying and searching for two days and i'm running out of ideas. It
> might be that i'm doing something very stupid here, but i tried hard to make
> shure i'm doing not. Help 

I recall there were lots of problems with syscons after the hints
change. *IF* people had the USERCONFIG option, things would work.
Otherwise...

I do not know if vt suffers from the same problem, nor do I know if the
fix done was specific to syscons or not.

-- 
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

 _DES: The Book of Bruce has only one sentence in it, and it says
"the actual directives of my cult are left as an exercise for the
reader. Good luck."
 jkh: does it really include the 'good luck' part?
 EE: OK, I made that part up.
 EE: I figured it should sound a bit more cheery than how Bruce
initially dictated it to me.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message