Subject: RE: dmesg
To: None <port-amiga@netbsd.org>
From: Georges Heinesch <geohei-ml@geohei.lu>
List: port-amiga
Date: 06/10/2000 02:14:19
Quoting Michael L. Hitch (08-Jun-00 22:57:43):

>> When I start NetBSD via the bootblock (Amiga Bootmenu), dmesg works
>> properly and spits out what it should. The options are -ASn2
>> (default).
>> 
>> However when I start NetBSD with the same options -aASn2 (I have to
>> add -a since loadbsd starts in single-user mode), I get the
>> following message:
>> 
>> dmesg: kvm_read: kvm_read: Bad address (0x50200000)
>> 
>> Q1: What's this message about?

>  It probably means that /netbsd on your root filesystem is not the
>  same
> netbsd that you loaded with loadbsd.  Dmesg is using the kernel
> symbols in /netbsd to locate where the message buffer is in the
> running kernel, but if the running kernel does not match /netbsd,
> dmesg is likely to get a bad address for the message buffer.

Yes, you are wright. I do not use the same kernels. However I used the
standard NetBSD-1.4.2 tree.

1. netbsd              1.966.938 Bytes
2. netbsd              1.985.722 Bytes

1. That's the one distributed:
   "NetBSD-1.4.2/amiga/binbary/kernel"

2. This one I found in / after the initial installation of
   NetBSD-1.4.2.

What's the difference?

>> The same message I get when I start NetBSD with the options -aS.
>> 
>> When I start NetBSD with loadbsd without the option -S (just -a), I
>> get:
>> 
>> dmesg: kvm_read: kvm_read: Bad address (0x0)
>> 
>> Q2: What's that now?

>  The same thing - except that since no kernel symbols were loaded
>  into
> memory when the kernel booted, the memory contents changed.  Dmesg
> is probably just picking up different data.  [Kernel symbols are
> loaded immediately after the kernal data segment, so it's possible
> that the pointer to the message buffer in the running kernel is
> beyond the data segment of the /netbsd kernel.  That would place the
> pointer into memory that would be initialized differently depending
> upon whether the debugging symbols where loaded or not.]

I will try to boot with loadbsd and the / kernel (not the one
distributed in "NetBSD-1.4.2/amiga/binary/kernel") ...

... later ...

Yep, this worked. When starting with bootblock and with loadbsd ... in
both situations, dmesg worked fine. Good to know that the netbsd
kernel on the AmigaOS partition must be the same like the one on /
when starting with loadbsd.

Many thanks!

-- 
Cu  Georges Heinesch, Luxembourg
    geohei@geohei.lu
    http://www.geohei.lu
    PGP 2.6.3i / 5.1i public key on request and on public servers

... Hakuna Matata ...