Subject: port-sparc64/33460: Error when compiling sparc64 GENERIC.MP kernel with KGDB support
To: None <port-sparc64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <camje_lemon@netbsd.org, "[at]"@netbsd.org, hotmail@netbsd.org,>
List: netbsd-bugs
Date: 05/10/2006 20:10:00
>Number: 33460
>Category: port-sparc64
>Synopsis: Error when compiling sparc64 GENERIC.MP kernel with KGDB support
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-sparc64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 10 20:10:00 +0000 2006
>Originator: Jean-Baptiste Campesato
>Release: Current (3.99.18)
>Organization:
>Environment:
>Description:
The sparc64 KGDB support asks for a cpuinfo struct and for CPUFLG_PAUSED at lines 226 and 227 when MULTIPROCESSOR is set:
#ifdef MULTIPROCESSOR
.....
while (cpuinfo.flags & CPUFLG_PAUSED)
cpuinfo.cache_flush((caddr_t)&cpuinfo.flags, sizeof(cpuinfo.flags));
...
#endif
But cpuinfo and CPUFLG_PAUSED are undeclared (GCC OUTPUT):
/usr/src/sys/arch/sparc64/sparc64/kgdb_machdep.c: In function `kgdb_suspend':
/usr/src/sys/arch/sparc64/sparc64/kgdb_machdep.c:226: error: `cpuinfo' undeclared (first use in this function)
/usr/src/sys/arch/sparc64/sparc64/kgdb_machdep.c:226: error: (Each undeclared identifier is reported only once
/usr/src/sys/arch/sparc64/sparc64/kgdb_machdep.c:226: error: for each function it appears in.)
/usr/src/sys/arch/sparc64/sparc64/kgdb_machdep.c:226: error: `CPUFLG_PAUSED' undeclared (first use in this function)
>How-To-Repeat:
Uncomment these lines in sys/arch/sparc64/conf/GENERIC32:
options KGDB # support for kernel gdb
options KGDB_DEVNAME="\"sab\"" # driver name for the kgdb serial chip
options KGDB_DEVADDR=0x400000 # physical address of the chip
options KGDB_DEVPORT=1 # port b
options KGDB_DEVRATE=38400 # baud rate
Next, compile the kernel with: ./build -m sparc64 kernel=GENERIC.MP in your src directory.
>Fix: