Port-arm archive

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

Re: Cortex-A9 boot problems with d-cache on Zynq



Nick Hudson wrote:
> On 02/06/2019 00:07, Robert Swindells wrote:
> > ...
> > Someone still needs to write a clock driver for it.
> > 
> 
> I'll commit something to sys/arch/arm/xilinx so the FDTisation can
> happen without breaking existing kernels

FYI, Robert sent me his patch:

> https://ftp.netbsd.org/pub/NetBSD/misc/rjs/zynq20181121.tar.gz

and after a small makefile change, I was able to boot it but it
failed early on KASSERT as you can see in the attached console log.

-- 
Alex
Zynq> echo ${kernel_addr_r}
0x2000000
Zynq> echo ${fdt_addr_r}
0x1f00000
Zynq> fatload mmc 0 100000 netbsd.ub
4336852 bytes read in 284 ms (14.6 MiB/s)
Zynq> fatload mmc 0 ${fdt_addr_r} zynq-zybo-z7.dtb
11694 bytes read in 14 ms (815.4 KiB/s)
Zynq> bootm 0x100000  - ${fdt_addr_r}
## Booting kernel from Legacy Image at 00100000 ...
   Image Name:   NetBSD/ 8.99.42
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4336788 Bytes = 4.1 MiB
   Load Address: 00100000
   Entry Point:  00100000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Kernel Image ... OK
   Loading Device Tree to 1fffa000, end 1ffffdad ... OK

Starting kernel ...

ok
[   1.0000000] uboot: args 0, 0, 0x1fffa000, 0x2dae
[   1.0000000] NetBSD/evbarm (fdt) booting ...
[   1.0000000] FDT /memory [0] @ 0x0 size 0x40000000
[   1.0000000] initarm: memory start 0 end 40000000 (len 40000000)
[   1.0000000] initarm: fdt_build_bootconfig
[   1.0000000] Usable memory:
[   1.0000000]   0 - 1fff9fff
[   1.0000000]   1fffd000 - 3fffffff
[   1.0000000] cpu_kernel_vm_init: kernel phys start 0 end 40000000
[   1.0000000] arm32_bootmem_init: kern_vtopdiff=0x80000000
[   1.0000000] arm32_bootmem_init: kstartva=0x80100000, kernelstart=0x100000
[   1.0000000] arm32_bootmem_init: memstart=0, memsize=0x40000000
[   1.0000000] arm32_bootmem_init: kernelstart=0x100000, kernelend=0x68c000
[   1.0000000] arm32_bootmem_init: kernel phys start 0x100000 end 0x68c000
[   1.0000000] arm32_bootmem_init: adding 130234 free pages: [0x68c000..0x3fffffff] (VA 0x8068c000)
[   1.0000000] arm32_bootmem_init: adding 128 free pages: [0..0xfffff] (VA 0x80000000)
[   1.0000000] arm32_kernel_vm_init: 1 L2 pages are needed to map 0x6c8000 kernel bytes
[   1.0000000] arm32_kernel_vm_init: allocating page tables for kernel l1ptadd_pages: adding pv 0x80523334 (pa 0x68c000, va 0x8068c000, 2 pages) at tail
[   1.0000000] add_pages: appending pv 0x80523554 (0x690000..0x691fff) to 0x68c000..0x68ffff
[   1.0000000]  vmadd_pages: appending pv 0x80523568 (0x692000..0x693fff) to 0x68c000..0x691fff
[   1.0000000] add_pages: appending pv 0x8052357c (0x694000..0x695fff) to 0x68c000..0x693fff
[   1.0000000] add_pages: appending pv 0x80523590 (0x696000..0x697fff) to 0x68c000..0x695fff
[   1.0000000] add_pages: appending pv 0x805235a4 (0x698000..0x699fff) to 0x68c000..0x697fff
[   1.0000000] add_pages: appending pv 0x805235b8 (0x69a000..0x69bfff) to 0x68c000..0x699fff
[   1.0000000] add_pages: appending pv 0x805235cc (0x69c000..0x69dfff) to 0x68c000..0x69bfff
[   1.0000000] add_pages: appending pv 0x805235e0 (0x69e000..0x69ffff) to 0x68c000..0x69dfff
[   1.0000000] add_pages: appending pv 0x805235f4 (0x6a0000..0x6a1fff) to 0x68c000..0x69ffff
[   1.0000000] arm32_kernel_vm_init: allocating stacks
[   1.0000000] add_pages: appending pv 0x80604ca0 (0x6a2000..0x6a5fff) to 0x68c000..0x6a1fff
[   1.0000000] add_pages: appending pv 0x80604c8c (0x6a6000..0x6a9fff) to 0x68c000..0x6a5fff
[   1.0000000] add_pages: appending pv 0x80604c78 (0x6aa000..0x6adfff) to 0x68c000..0x6a9fff
[   1.0000000] add_pages: appending pv 0x80604c64 (0x6ae000..0x6b1fff) to 0x68c000..0x6adfff
[   1.0000000] add_pages: appending pv 0x80604c4c (0x6b2000..0x6b5fff) to 0x68c000..0x6b1fff
[   1.0000000] add_pages: appending pv 0x80604cb4 (0x6b6000..0x6b7fff) to 0x68c000..0x6b5fff
[   1.0000000] add_pages: appending pv 0x80523378 (0x6b8000..0x6bbfff) to 0x68c000..0x6b7fff
[   1.0000000] Creating L1 page table at 0x8068c000/0x0068c000
[   1.0000000] arm32_kernel_vm_init: kernel_base 80000000 KERNEL_L2PT_KERNEL_NUM 1
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x80690000, PA 0x690000) for VA 0x80000000 (kernel)
[   1.0000000] arm32_kernel_vm_init: kernel_vm_base c0000000 KERNEL_L2PT_VMDATA_NUM 8
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x80692000, PA 0x692000) for VA 0xc0000000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x80694000, PA 0x694000) for VA 0xc0800000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x80696000, PA 0x696000) for VA 0xc1000000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x80698000, PA 0x698000) for VA 0xc1800000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x8069a000, PA 0x69a000) for VA 0xc2000000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x8069c000, PA 0x69c000) for VA 0xc2800000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x8069e000, PA 0x69e000) for VA 0xc3000000 (vm)
[   1.0000000] arm32_kernel_vm_init: adding L2 pt (VA 0x806a0000, PA 0x6a0000) for VA 0xc3800000 (vm)
[   1.0000000] Mapping kernel
[   1.0000000] arm32_kernel_vm_init: adding chunk for kernel text 0x100000..0x49ffff (VA 0x80100000)
[   1.0000000] add_pages: adding pv 0x80523320 (pa 0x100000, va 0x80100000, 464 pages) before pa 0x68c000
[   1.0000000] arm32_kernel_vm_init: adding chunk for kernel data/bss 0x4a0000..0x68bfff (VA 0x804a0000)
[   1.0000000] add_pages: adding pv 0x8052330c (pa 0x4a0000, va 0x804a0000, 246 pages) before pa 0x68c000
[   1.0000000] Listing Chunks
[   1.0000000] arm32_kernel_vm_init: pv 0x80523320: chunk VA 0x80100000..0x8049ffff (PA 0x100000, prot 5, cache 1)
[   1.0000000] arm32_kernel_vm_init: pv 0x8052330c: chunk VA 0x804a0000..0x8068bfff (PA 0x4a0000, prot 3, cache 1)
[   1.0000000] arm32_kernel_vm_init: pv 0x80523334: chunk VA 0x8068c000..0x806bbfff (PA 0x68c000, prot 3, cache 1)

[   1.0000000] Mapping Chunks
[   1.0000000] arm32_kernel_vm_init: mapping chunk VA 0x80000000..0x800fffff (PA 0, prot 3, cache 1)
[   1.0000000] S
[   1.0000000] arm32_kernel_vm_init: mapping chunk VA 0x80100000..0x8049ffff (PA 0x100000, prot 5, cache 1)
[   1.0000000] SSSLLLLLLLLLL
[   1.0000000] arm32_kernel_vm_init: mapping last chunk VA 0x804a0000..0xbfffffff (PA 0x4a0000, prot 3, cache 1)
[   1.0000000] LLLLLLSSSSSSSSSSSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsS
[   1.0000000] devmap: e0000000 -> e01fffff @ f0000000
[   1.0000000] SS
[   1.0000000] devmap: f8900000 -> f89fffff @ f0200000
[   1.0000000] S
[   1.0000000] devmap: f8f00000 -> f8ffffff @ f0300000
[   1.0000000] S
[   1.0000000]                              Physical              Virtual        Num
[   1.0000000]                        Starting    Ending    Starting    Ending   Pages
[   1.0000000]         text section: 0x00100000 0x0049ffff 0x80100000 0x8049ffff 464
[   1.0000000]         data section: 0x00510000 0x00522c98 0x80510000 0x80522c98 10
[   1.0000000]          bss section: 0x00522c98 0x00681518 0x80522c98 0x80681518 176
[   1.0000000]    L1 page directory: 0x0068c000 0x0068ffff 0x8068c000 0x8068ffff 2
[   1.0000000]    ABT stack (CPU 0): 0x006a2000 0x006a3fff 0x806a2000 0x806a3fff 1
[   1.0000000]    FIQ stack (CPU 0): 0x006a6000 0x006a7fff 0x806a6000 0x806a7fff 1
[   1.0000000]    IRQ stack (CPU 0): 0x006aa000 0x006abfff 0x806aa000 0x806abfff 1
[   1.0000000]    UND stack (CPU 0): 0x006ae000 0x006affff 0x806ae000 0x806affff 1
[   1.0000000]   IDLE stack (CPU 0): 0x006b2000 0x006b3fff 0x806b2000 0x806b3fff 1
[   1.0000000]            SVC stack: 0x006b6000 0x006b7fff 0x806b6000 0x806b7fff 1
[   1.0000000]       Message Buffer: 0x006b8000 0x006bbfff 0x806b8000 0x806bbfff 2
[   1.0000000]          Free Memory: 0x006bc000 0x3fffffff                       130210
[   1.0000000]          Free Memory: 0x00000000 0x000fffff                       128
[   1.0000000] TTBR0=0x68805b TTBR1=0x68805b TTBCR=0x1 CONTEXTIDR=0
[   1.0000000] switching to new L1 page table @0x68c000...
[   1.0000000]  ttb
[   1.0000000] sctlr=0x8c5187d actlr=0x43
[   1.0000000]  OK
[   1.0000000] bootargs:
[   1.0000000] Memory regions:
[   1.0000000]   0 - fffff
[   1.0000000]   6bc000 - 1fff9fff
[   1.0000000]   1fffd000 - 3fffffff
[   1.0000000] nfreeblocks = 2, free_pages = 130338 (0x1fd22)
[   1.0000000] bootstrap done.
[   1.0000000] vectors vbar=0x801165e0 0x801165e0
[   1.0000000] init subsystems: stacks vectors undefined page pmap_physload
[   1.0000000] block  0 start 006bc000  end 40000000
[   1.0000000]    bp  0 start 00000000  end 00100000
[   1.0000000]    bp  1 start 006bc000  end 1fffa000
[   1.0000000]          start 006bc000  end 1fffa000... loading in freelist 0
[   1.0000000]    bp  2 start 1fffe000  end 40000000
[   1.0000000]          start 1fffe000  end 40000000... loading in freelist 0
[   1.0000000] block  1 start 00000000  end 00100000
[   1.0000000]    bp  0 start 00000000  end 00100000
[   1.0000000]          start 00000000  end 00100000... loading in freelist 0
[   1.0000000]    bp  1 start 006bc000  end 1fffa000
[   1.0000000]    bp  2 start 1fffe000  end 40000000
[   1.0000000] pmap kpm tlb0 kcpusets locks l1pt cache(l1pt) specials pools [ Kernel symbol table missing! ]
[   1.0000000] done.
[   1.0000000] mpstart
[   1.0000000]            start 08000000  end 18000000Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 8.99.42 (ZYNQ) #0: Mon Jun  3 20:34:19 BST 2019
[   1.0000000]  alnsn@neva:/home/alnsn/netbsd-current/zynq/sys/arch/evbarm/compile/obj/ZYNQ
[   1.0000000] total memory = 1024 MB
[   1.0000000] avail memory = 1008 MB
[   1.0000000] armfdt0 (root)
[   1.0000000] simplebus0 at armfdt0: Digilent Zybo Z7 board
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] cpus0 at simplebus0
[   1.0000000] simplebus2 at simplebus0
[   1.0000000] gic0 at simplebus1: GIC
[   1.0000000] armgic0 at gic0: Generic Interrupt Controller, 96 sources (85 valid)
[   1.0000000] armgic0: 32 Priorities, 64 SPIs, 5 PPIs, 16 SGIs
[   1.0000000] a9tmr0 at simplebus1: couldn't get clock
[   1.0000000] fregulator0 at simplebus0: VCCPINT
[   1.0000000] cpu0 at cpus0: Cortex-A9 r3p0 (Cortex V7A core)
[   1.0000000] cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
[   1.0000000] cpu0: 32KB/32B 4-way L1 VIPT Instruction cache
[   1.0000000] cpu0: 32KB/32B 4-way write-back-locking-C L1 PIPT Data cache
[   1.0000000] vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
[   1.0000000] cpu1 at cpus0: disabled (unresponsive)
[   1.0000000] zynqslcr0 at simplebus1: System Level Control Module
[   1.0000000] /amba/devcfg@f8007000 at simplebus1 not configured
[   1.0000000] cemac0 at simplebus1cemac0: interrupting on GIC irq 54
[   1.0000000] : Cadence Gigabit Ethernet Controller
[   1.0000000] ukphy0 at cemac0 phy 0: OUI 0x00e04c, model 0x0011, rev. 5
[   1.0000000] panic: kernel diagnostic assertion "freq != 0" failed: file "/home/alnsn/netbsd-current/zynq/sys/arch/arm/cortex/a9tmr.c", line 299
[   1.0000000] cpu0: Begin traceback...
[   1.0000000] 0x806b792c: 801f3610
[   1.0000000] 0x806b7944: 8033cf6c
[   1.0000000] 0x806b795c: 8043d110
[   1.0000000] 0x806b799c: 80106c9c
[   1.0000000] 0x806b79c4: 801f6c40
[   1.0000000] 0x806b79fc: 801f799c
[   1.0000000] 0x806b7a34: 803231e4
[   1.0000000] 0x806b7a64: 803232fc
[   1.0000000] 0x806b7ad4: 801f6108
[   1.0000000] 0x806b7b34: 8010bbd4
[   1.0000000] 0x806b7bf4: 8010c29c
[   1.0000000] 0x806b7c2c: 803231e4
[   1.0000000] 0x806b7c5c: 803232fc
[   1.0000000] 0x806b7dc4: 80416a04
[   1.0000000] 0x806b7de4: 80416ba4
[   1.0000000] 0x806b7e1c: 803231e4
[   1.0000000] 0x806b7e4c: 803232fc
[   1.0000000] 0x806b7e64: 80323418
[   1.0000000] 0x806b7e9c: 8010d3fc
[   1.0000000] 0x806b7ed4: 803231e4
[   1.0000000] 0x806b7efc: 80323490
[   1.0000000] 0x806b7f1c: 8010c550
[   1.0000000] 0x806b7f9c: 8044057c
[   1.0000000] 0x806b7fac: 801008e4
[   1.0000000] cpu0: End traceback...
Stopped in pid 0.1 (system) at  801100f8:       bx      r14
db{0}>



Home | Main Index | Thread Index | Old Index