Subject: port-sparc/19019: Kernel load aborts with "Memory address not aligned"
To: None <gnats-bugs@gnats.netbsd.org>
From: Andreas Gustafsson <gson@gson.org>
List: netbsd-bugs
Date: 11/11/2002 21:00:19
>Number:         19019
>Category:       port-sparc
>Synopsis:       Kernel load aborts with "Memory address not aligned"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 11 21:01:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current as of Oct 20, 2002
>Organization:
Speaking for myself.
>Environment:
System: NetBSD gute.araneus.fi 1.6I NetBSD 1.6I (GUTE) #0: Sun Oct 20 22:28:43 PDT 2002 gson@guava.araneus.fi:/usr/src/sys/arch/sparc/compile/GUTE sparc (not the kernel in case since it didn't boot, but close)
Architecture: sparc
Machine: sparc
>Description:

While netbooting a SPARCstation IPX, the boot loader aborted with the
error message "Memory address not aligned" while loading the kernel
(or more precisely, its symbols).

This only happened with a kernel built from a particular config file.
Rebuilding the kernel from the same config did not help, but changing
the config file slightly (removing some devices) made the problem go
away.  This makes me suspect the bug is triggered when some segment of
the kernel happens to be just the right (wrong?) size.

I can reproduce the problem on two different IPXes, so I'm sure it's
not a hardware problem.  The kernels were cross-compiled on an i386,
in case that makes a difference.

Here are console messages showing the problem:

   SPARCstation IPX, No Keyboard
   ROM Rev. 2.4, 40 MB memory installed, Serial #8287715.
   Ethernet address 8:0:20:89:b3:b0, Host ID: 577e75e3.
   [stuff omitted]
   ok boot net
   Boot device: /sbus/le@0,c00000   File and args: 
   14000 
   >> NetBSD/sparc Secondary Boot, Revision 1.12
   >> (gson@guava.araneus.fi, Thu Oct 17 18:35:59 PDT 2002)
   Booting netbsd
   net_open: client addr: 10.0.0.11
   net_open: subnet mask: 255.0.0.0
   net_open: net gateway: 10.0.0.1
   net_open: server addr: 10.0.0.1
   net_open: server path: /export/gum/root
   Using BOOTP protocol: ip address: 10.0.0.11, hostname: gul.araneus.fi, netmask: 255.0.0.0, gateway: 10.0.0.1
   root addr=10.0.0.1 path=/export/gum/root
   2968000+97592+221496 [188448+144382Memory address not aligned
   ok 

The offending kernel is available for analysis at
<http://www.araneus.fi/gson/netbsd/bugs/sparc-boot/netbsd.bin>

>How-To-Repeat:

Download http://www.araneus.fi/gson/netbsd/bugs/sparc-boot/netbsd.bin
and try to netboot a sparc with it.

>Fix:

Unknown, but building a new kernel with a slightly different config is
an effective workaround.
>Release-Note:
>Audit-Trail:
>Unformatted: