tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Why kc_bitsize is zero?



Hi,

I am trying to run NetBSD/evbarm GUMSTIX kernel on qemu-system-arm -M connex,
emulated Gumstix Connex.
qemu's PXA255 CPU emulation is incorrect and qemu-pxa255.diff should be
applied (for qemu master).
http://www.netbsd.org/~ryoon/20150821-on-qemu-connex/qemu-pxa255.diff

And GUMSTIX kernel should be applied connex-on-qemu.diff patch
(for NetBSD current).
http://www.netbsd.org/~ryoon/20150821-on-qemu-connex/connex-on-qemu.diff

oarm kernel starts as
$ ~/repos/qemu/arm-softmmu/qemu-system-arm -M connex -drive if=pflash,file=./flash,format=raw -nographic -drive if=sd,file=sd2.img,format=raw
main-loop: WARNING: I/O thread spun for 1000 iterations
pxa2xx_clkcfg_write: CPU frequency change attempt


U-Boot 1.2.0 (May 10 2008 - 13:33:03) - 400 MHz - 1604

*** Welcome to Gumstix ***

DRAM:  64 MB
Flash: 16 MB
Using default environment

SMC91C1111-0
Net:   SMC91C1111-0
Hit any key to stop autoboot:  0
GUM> cp.l b00000 a0200000 3bd35c
GUM> go a0200000
## Starting application at 0xA0200000 ...

NetBSD/evbarm (gumstix) booting ...
system serial: 0x0000000000000000
[ Kernel symbol table missing! ]
kc_bitsize: 4
kc_bitsize: 4
Loaded initial symtab at 0xc0623fac, strtab at 0xc06624dc, # entries 15936
pmap_postinit: Allocated 35 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.21 (GUMSTIX) #2: Fri Aug 21 07:41:05 JST 2015
        ryo_on%angelcake.elements.tetera.org@localhost:/usr/world/7.99/evboarm/obj/sys/arch/evbarm/compile/GUMSTIX
total memory = 65536 KB
avail memory = 58436 KB
sysctl_createv: sysctl_create(machine_arch) returned 17
mainbus0 (root)
cpu0 at mainbus0 core 0: PXA255/26x rev 0 (XScale V5TE core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 16KB/32B 64-way L1 VIVT Instruction cache
cpu0: 16KB/32B 64-way write-back-locking-A L1 VIVT Data cache
pxaip0 at mainbus0: Onchip Peripheral Bus
pxaip0: CPU clock = 1000.003 MHz
pxaip0: kernel is configured for PXA250 and PXA270, cpu type is PXA250
pxaintc0 at pxaip0 addr 0x40d00000-0x40d0001f: Interrupt Controller
pxagpio0 at pxaip0 addr 0x40e00000-0x40e0014f: GPIO Controller
com0 at pxaip0 addr 0x40100000-0x4010001f intr 22: ns16550a, working fifo
com0: console
saost0 at pxaip0 addr 0x40a00000-0x40a0001f
saost0: SA-11x0 OS Timer
lcd0 at pxaip0 addr 0x44000000-0x4400021f: PXA2x0 LCD controller
wsdisplay0 at lcd0 kbdmux 1
pxadmac0 at pxaip0 addr 0x40000000-0x400002ff intr 25: DMA Controller
qemu: hardware error: pxa2xx_dma_write: Bad offset 00000000000000f0

CPU #0:
R00=00000000 R01=c4e56000 R02=000000f0 R03=00000000
R04=c11d2000 R05=c072bd28 R06=00000040 R07=c11d2040
R08=00000000 R09=00000001 R10=c05c1dc8 R11=c072bcdc
R12=c022b170 R13=c072bc78 R14=c0420788 R15=c022b170
PSR=80000153 N--- A svc32
FPSCR: 00000000
zsh: abort (core dumped)  ~/repos/qemu/arm-softmmu/qemu-system-arm -M connex -drive  -nographic -drive


However earm kernel does not start as
$ ~/repos/qemu/arm-softmmu/qemu-system-arm -M connex -drive if=pflash,file=./flash,format=raw -nographic -drive if=sd,file=sd2.img,format=raw
main-loop: WARNING: I/O thread spun for 1000 iterations
pxa2xx_clkcfg_write: CPU frequency change attempt


U-Boot 1.2.0 (May 10 2008 - 13:33:03) - 400 MHz - 1604

*** Welcome to Gumstix ***

DRAM:  64 MB
Flash: 16 MB
Using default environment

SMC91C1111-0
Net:   SMC91C1111-0
Hit any key to stop autoboot:  0
GUM> cp.l b00000 a0200000 3bd35c
GUM> go a0200000
## Starting application at 0xA0200000 ...

NetBSD/evbarm (gumstix) booting ...
system serial: 0x0000000000000000
[ Kernel symbol table missing! ]
panic: kernel diagnostic assertion "kc_bitsize == KC_BITSIZE_EARLY" failed: file "/usr/src/sys/kern/subr_kcpuset.c", line 177
Stopped in pid 0.1 (system) at  c0243730:       bx      r14
db>


Then I have applied subr_kcpuset.diff for printf debugging.
http://www.netbsd.org/~ryoon/20150821-on-qemu-connex/subr_kcpuset.diff

$ ~/repos/qemu/arm-softmmu/qemu-system-arm -M connex -drive if=pflash,file=./flash,format=raw -nographic -drive if=sd,file=sd2.img,format=raw -gdb tcp::8000
main-loop: WARNING: I/O thread spun for 1000 iterations
pxa2xx_clkcfg_write: CPU frequency change attempt


U-Boot 1.2.0 (May 10 2008 - 13:33:03) - 400 MHz - 1604

*** Welcome to Gumstix ***

DRAM:  64 MB
Flash: 16 MB
Using default environment

SMC91C1111-0
Net:   SMC91C1111-0
Hit any key to stop autoboot:  0
GUM> cp.l b00000 a0200000 3bd35c
GUM> go a0200000
## Starting application at 0xA0200000 ...

NetBSD/evbarm (gumstix) booting ...
system serial: 0x0000000000000000
[ Kernel symbol table missing! ]
kc_bitsize in kcpuset_early_ptr always: 0
kc_bitsize in kcpuset_early_ptr: 0
KC_BITSIZE_EARLY in kcpuset_early_ptr: 4
panic: kernel diagnostic assertion "kc_bitsize == KC_BITSIZE_EARLY" failed: file "/usr/src/sys/kern/subr_kcpuset.c", line 184
Stopped in pid 0.1 (system) at  c0243730:       bx      r14
db> reboot
WARNING: powerdown not supported
The operating system has halted.
Please press any key to reboot.
rebooting...
qemu: fatal: Trying to execute code outside RAM or ROM at 0xc02001f4

R00=00000178 R01=00000000 R02=c0673078 R03=c0673e08
R04=00000000 R05=00000000 R06=c067315c R07=c07511dc
R08=c0673098 R09=c078dea8 R10=c075120c R11=c078dc3c
R12=00000000 R13=c078dc28 R14=c02001c8 R15=c02001f4
PSR=600001d3 -ZC- A svc32
FPSCR: 00000000
zsh: abort (core dumped)  ~/repos/qemu/arm-softmmu/qemu-system-arm -M connex -drive  -nographic -drive


kc_bitsize is zero, however I cannot find why kc_bitsize is set as zero.
Could you give me a clue?

Thank you.

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index