Subject: Fwd: PCMCIA-Problems on 1.6.2 - gdb coredump when setting kernel variables
To: None <current-users@netbsd.org>
From: Kai Bleek <newsletter@spellweaver.de>
List: current-users
Date: 03/04/2004 11:15:20
Hi,

I already asked this on netbsd-users list, without getting any answer yet, so 
I hope nobody feels offended by me posting my problem to this list, too.

Thanks,
Kai

----------  Weitergeleitete Nachricht  ----------

Subject: PCMCIA-Problems on 1.6.2 - gdb coredump when setting kernel variables
Date: Wednesday 03 March 2004 10:46
From: Kai Bleek <newsletter@spellweaver.de>
To: netbsd-users@NetBSD.org

Hi out there,

I tried to install 1.6.2 yesterday on my old Toshiba Satellite 2135
notebook, using two PCMCIA-Cards. My goal is to use this system as a
gateway/firewall (I'm rather new to NetBSD, using FreeBSD/Linux though).
I read about stability/security and clean system-design of NetBSD, so
I decided to give it a try.

As expected, I ran into the PCMCIA-Issues described in the
install-document
(ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/i386/INSTALL.html#Possible%20PC
MCIA%20issues). I tried an install of 1.6.1 earlier this year, so I knew how
 to solve this, since it worked for 1.6.1 (once I found out to use the mask
0x0e00 for pcic_isa_intr_alloc_mask).

Now, my problem is as follows (using the netbsd-GENERIC_LAPTOP kernel):
I boot with the option -d (boot -d at boot-prompt) to enter the
kernel-debugger at boot-time, correcting the pcmcia-vars at boot-time.
This results in an functional network (both pcmcia-network-cards work,
IRQ 9 for "socket events", 10 and 11 for the cards).
But of course I don't want to enter the in-time-kernel-debugger every
time I reboot. So, I tried to set those values permanently in the
recommended way (using my working values, of course):
# cp /netbsd /netbsd.bak
# gdb --write /netbsd
(gdb) set pcic_isa_intr_alloc_mask=0x0e00
(gdb) set pcic_isa_alloc_iobase=0x330
(gdb) set pcic_isa_alloc_iosize=0x0bf
(gdb) quit

First thing - no gdb was installed (I'm fairly sure it was when doing
my 1.6.1-installation, which was also very minimal). So I installed
the package gdb-5.3nb2.tgz via pkg_add from some ftp-server.

Then, writing to /netbsd via gdb, I can first set the values but then
gdb dies with a core-dump when calling the "quit" command. Trying to
edit the file again, all of the symbols are gone (I don't remember the
exact error-message, since I'm not at the machine at the moment) - also
calling an "info var pcic_isa_intr_alloc_mask" results in nothing (no
values are shown).
While rebooting, nothing in the kernel has changed, the wrong
IRQs/IO-Values are assigned - pcmcia-system not usable...
So, I wonder how to set those values permanent.

Most interestingly: I copied the kernel-file to my FreeBSD 5.2 system,
editing the values with gdb there, same result: coredump while
exiting, all symbols lost.

Does it make any sense, to use another kernel on the laptop-system? I
don't know (yet), if the problems stay, then. But I also don't know
if other kernels have pcmcia-support at all.

Can anyone explain this or, even better, provide a solution to this
problem? I would really like to use the NetBSD-system, but at this
point I'm lost.

Thanks in advance,
Kai

-------------------------------------------------------