「カードサイズのスパコン!!」と巷で話題のZynq を搭載した Parallella を入手しましたのでさっそくこれに NetBSD を載せたいと思います
Zynq は以前 Zedboard に載せようとして挫折した経緯がありますのでさくっとブートまではできると確信しております
さっそくブートしてみる
U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08) I2C: ready DRAM: 992 MiB WARNING: Caches not enabled MMC: SDHCI: 0 SF: Detected N25Q128 with page size 64 KiB, total 16 MiB In: serial Out: serial Err: serial Net: zynq_gem Hit any key to stop autoboot: 0 Configuring PL and Booting Linux... Device: SDHCI Manufacturer ID: 27 OEM: 5048 Name: SD08G Tran Speed: 50000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 4-bit reading parallella.bit.bin 2083744 bytes read reading uImage ** Unable to read "uImage" from mmc 0:1 ** reading devicetree.dtb 8607 bytes read Wrong Image Format for bootm command ERROR: can't get kernel image! zynq-uboot> mmcinfo;fatload mmc 0 0x00800000 netbsd.gz.ub;bootm 0x00800000 Device: SDHCI Manufacturer ID: 27 OEM: 5048 Name: SD08G Tran Speed: 50000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 4-bit reading netbsd.gz.ub 2389168 bytes read ## Booting kernel from Legacy Image at 00800000 ... Image Name: NetBSD/zedboard 7.99.2 Image Type: ARM NetBSD Kernel Image (gzip compressed) Data Size: 2389104 Bytes = 2.3 MiB Load Address: 10100000 Entry Point: 10100000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ERROR: booting os 'NetBSD' (2) is not supported
どうやら u-boot が NetBSD の ブートに対応していないようです。
そのうち u-boot のコンパイルをやろうと思いますがここはとりあえずおいといて次に進みます
zynq-uboot> go 0x10100000 ## Starting application at 0x10100000 ... PC=0x10100024 SP=0x3db54e48 CPSR=0x600001d3 <cortex_init>@ABC12-</cortex_init> <mmu_init_table></mmu_init_table> <arm_cpuinit>FG01H1IJKLM</arm_cpuinit> jump to start() uboot arg = 0x1, 0x3db56174, 0x3db56174, 0x10100000 NetBSD/evbarm (EVBARM_BOARDTYPE) booting ... arm32_bootmem_init: memstart=0x10000000, memsize=0x20000000, kernelstart=0x10100000 arm32_bootmem_init: kernelend=0x105ec000 arm32_bootmem_init: adding 64778 free pages: [0x105ec000..0x2fffffff] (VA 0x805ec000) arm32_bootmem_init: adding 128 free pages: [0x10000000..0x100fffff] (VA 0x80000000) arm32_kernel_vm_init: 0 L2 pages are needed to map 0x61e000 kernel bytes arm32_kernel_vm_init: allocating page tables for kernel vm add_pages: adding pv 0x805c4898 (pa 0x105ec000, va 0x805ec000, 2 pages) at tail add_pages: appending pv 0x805c4a58 (0x105f0000..0x105f1fff) to 0x105ec000..0x105effff add_pages: appending pv 0x805c4a6c (0x105f2000..0x105f3fff) to 0x105ec000..0x105f1fff add_pages: appending pv 0x805c4a80 (0x105f4000..0x105f5fff) to 0x105ec000..0x105f3fff add_pages: appending pv 0x805c4a94 (0x105f6000..0x105f7fff) to 0x105ec000..0x105f5fff add_pages: appending pv 0x805c4aa8 (0x105f8000..0x105f9fff) to 0x105ec000..0x105f7fff add_pages: appending pv 0x805c4abc (0x105fa000..0x105fbfff) to 0x105ec000..0x105f9fff add_pages: appending pv 0x805c4ad0 (0x105fc000..0x105fdfff) to 0x105ec000..0x105fbfff add_pages: appending pv 0x805c4ae4 (0x105fe000..0x105fffff) to 0x105ec000..0x105fdfff arm32_kernel_vm_init: allocating stacks add_pages: appending pv 0x805c4da0 (0x10600000..0x10601fff) to 0x105ec000..0x105fffff add_pages: appending pv 0x805c4d8c (0x10602000..0x10603fff) to 0x105ec000..0x10601fff add_pages: appending pv 0x805c4d78 (0x10604000..0x10605fff) to 0x105ec000..0x10603fff add_pages: appending pv 0x805c4d64 (0x10606000..0x10607fff) to 0x105ec000..0x10605fff add_pages: appending pv 0x805c4d4c (0x10608000..0x10609fff) to 0x105ec000..0x10607fff add_pages: appending pv 0x805c4db4 (0x1060a000..0x1060bfff) to 0x105ec000..0x10609fff add_pages: appending pv 0x805c48d8 (0x1060c000..0x1060ffff) to 0x105ec000..0x1060bfff Creating L1 page table at 0x105ec000 arm32_kernel_vm_init: adding L2 pt (VA 0x805f0000, PA 0x105f0000) for VA 0xc0000000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805f2000, PA 0x105f2000) for VA 0xc0800000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805f4000, PA 0x105f4000) for VA 0xc1000000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805f6000, PA 0x105f6000) for VA 0xc1800000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805f8000, PA 0x105f8000) for VA 0xc2000000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805fa000, PA 0x105fa000) for VA 0xc2800000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805fc000, PA 0x105fc000) for VA 0xc3000000 (vm) arm32_kernel_vm_init: adding L2 pt (VA 0x805fe000, PA 0x105fe000) for VA 0xc3800000 (vm) Mapping kernel arm32_kernel_vm_init: adding chunk for kernel text 0x10100000..0x10589fff (VA 0x80100000) add_pages: adding pv 0x805c4884 (pa 0x10100000, va 0x80100000, 581 pages) before pa 0x105ec000 arm32_kernel_vm_init: adding chunk for kernel data/bss 0x1058a000..0x105ebfff (VA 0x8058a000) add_pages: appending pv 0x805c4900 (0x1058a000..0x105ebfff) to 0x10100000..0x10589fff add_pages: merging pv 0x805c4898 (0x105ec000..0x1060ffff) to 0x10100000..0x105ebfff Listing Chunks arm32_kernel_vm_init: pv 0x805c4884: chunk VA 0x80100000..0x8060ffff (PA 0x10100000, prot 3, cache 1) Mapping Chunks arm32_kernel_vm_init: mapping last chunk VA 0x80000000..0x9fffffff (PA 0x10000000, prot 3, cache 1) pmap_map_chunk: pa=0x10000000 va=0x80000000 size=0x20000000 resid=0x20000000 prot=0x3 cache=1 sSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsS devmap: e0000000 -> e01fffff @ ff000000 pmap_map_chunk: pa=0xe0000000 va=0xff000000 size=0x200000 resid=0x200000 prot=0x3 cache=0 SS devmap: f8f00000 -> f8ffffff @ ff200000 pmap_map_chunk: pa=0xf8f00000 va=0xff200000 size=0x100000 resid=0x100000 prot=0x3 cache=0 S Physical Virtual Num Starting Ending Starting Ending Pages SDRAM: 0x10000000 0x2fffffff 0x80000000 0x9fffffff 65536 text section: 0x10100000 0x10589fff 0x80100000 0x80589fff 581 data section: 0x10590000 0x105c4180 0x80590000 0x805c4180 27 bss section: 0x105c4180 0x105ebe78 0x805c4180 0x805ebe78 20 L1 page directory: 0x105ec000 0x105effff 0x805ec000 0x805effff 2 ABT stack (CPU 0): 0x10600000 0x10601fff 0x80600000 0x80601fff 1 FIQ stack (CPU 0): 0x10602000 0x10603fff 0x80602000 0x80603fff 1 IRQ stack (CPU 0): 0x10604000 0x10605fff 0x80604000 0x80605fff 1 UND stack (CPU 0): 0x10606000 0x10607fff 0x80606000 0x80607fff 1 IDLE stack (CPU 0): 0x10608000 0x10609fff 0x80608000 0x80609fff 1 SVC stack: 0x1060a000 0x1060bfff 0x8060a000 0x8060bfff 1 Message Buffer: 0x1060c000 0x1060ffff 0x8060c000 0x8060ffff 2 Free Memory: 0x10610000 0x2fffffff 64760 Free Memory: 0x10000000 0x100fffff 128 TTBR0=0x1fffc05b TTBR1=0x1fffc05b TTBCR=0x1 CONTEXTIDR=0 switching to new L1 page table @0x105ec000... ttb (TTBCR=0x11 TTBR0=0x105ec05b TTBR1=0x105ec05b) OK nfreeblocks = 2, free_pages = 64888 (0xfd78) bootstrap done. vectors vbar=0x80443aa0 0x80443aa0 init subsystems: stacks vectors undefined page pmap_physload pmap kpm tlb0 locks l1pt cache(l1pt) specials pools [ Kernel symbol table missing! ] done. Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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.2 (ZEDBOARD) #5: Mon Dec 8 03:59:23 UTC 2014 total memory = 512 MB avail memory = 501 MB sysctl_createv: sysctl_create(machine_arch) returned 17 kern.module.path=/stand/evbarm/7.99.2/modules timecounter: Timecounters tick every 10.000 msec mainbus0 (root) cpu0 at mainbus0 core 0: 1333 MHz Cortex-A9 r4p0 (Cortex V7A core) cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled cpu0: isar: [0]=0x101111 [1]=0x13112111 [2]=0x21232041 [3]=0x11112131, [4]=0x11142, [5]=0 cpu0: mmfr: [0]=0x100103 [1]=0x20000000 [2]=0x1230000 [3]=0x102111 cpu0: pfr: [0]=0x1231 [1]=0x11 cpu0: 32KB/32B 4-way L1 VIPT Instruction cache cpu0: 32KB/32B 4-way write-back-locking-C L1 PIPT Data cache cpu0: 512KB/32B 8-way write-back-locking-D L2 PIPT Unified cache vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals vfp0: mvfr: [0]=0x10110222 [1]=0x1111111 armperiph0 at mainbus0 arml2cc0 at armperiph0: ARM PL310 r3p2 L2 Cache Controller (disabled) arml2cc0: cache enabled armgic0 at armperiph0: Generic Interrupt Controller, 96 sources (85 valid) armgic0: 32 Priorities, 64 SPIs, 5 PPIs, 16 SGIs a9tmr0 at armperiph0: A9 Global 64-bit Timer (666 MHz) a9tmr0: interrupting on irq 27 axi0 at mainbus0: Advanced eXtensible Interface zynqslcr0 at axi0 addr 0xf8000000: System Level Control Module zynqslcr_dumpclocks REF : 33 MHz ARM_PLL : 1333 MHz DDR_PLL : 1600 MHz IO_PLL : 1000 MHz CPU_6X4X : 667 MHz CPU_3X2X : 333 MHz CPU_2X : 222 MHz CPU_1X : 111 MHz DDR_3X : 400 MHz DDR_2X : 267 MHz DDR_DCI : 10 MHz SMC : 17 MHz QSPI : 143 MHz GIGE0 : 125 MHz GIGE1 : 17 MHz SDIO : 50 MHz UART : 50 MHz SPI : 16 MHz CAN : 8 MHz PCAP : 200 MHz DBG : 67 MHz FCLK0 : 100 MHz FCLK1 : 200 MHz FCLK2 : 200 MHz FCLK3 : 40 MHz ehci0 at axi0 addr 0xe0002000 intr 53 ehci0: Zynq USB Controller id=5 revision=2 version=2 ehci0: HCI revision=0x100 ehci0: 1 host port, device capable, 12 endpoints ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ULPI phy VID 0x0000 PID 0x0000 ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: ulpi_wait: timeout ehci0: EHCI version 1.0 usb0 at ehci0: USB revision 2.0 sdhc0 at axi0 addr 0xe0100000 intr 56: SD/MMC host controller sdhc0: SD Host Specification 1.0, rev.0 sdhc0: software reset reg=00000001 sdhc0: base clock frequency 33 MHz sdhc0: max block length 512 bytes sdmmc0 at sdhc0 slot 0 zynquart0 at axi0 addr 0xe0000000 intr 59 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0 timecounter: Timecounter "a9tmr0" frequency 666666666 Hz quality 500 WARNING: module error: can't find builtin dependency `iic' WARNING: module error: can't find builtin dependency `au8522' WARNING: module error: can't find builtin dependency `iic' WARNING: module error: can't find builtin dependency `iic' WARNING: module error: can't find builtin dependency `iic' WARNING: module error: can't find builtin dependency `iic' uhub0 at usb0: Xilinx EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub0: 1 port with 1 removable, self powered boot device:root device:
ZEDBOARD のままだからか USB Host の ulpi がエラーになっており USB Host が使えてません
ZEDBOARD では使えてたんだけどなぁ
このあたりどうなっていたのかすっかり忘れてしまっております。。。
あと、RAM のアドレスが 0 番地からアサインされているのですが、 0 番地を使おうとすると固まります
なので今は RAM を 0x10000000 番地から使っていますので 256MB 無駄にしていることになります (0x10000000 は適当)
その影響で RAM Size が 512MB になっていますが本当は 1GB あります
これもおいおい直していかないとですね
SDHC はなんか認識してますが、動くか確認していません
まずは USB を使えるようにして SMP 対応したあたりでコミットしたいと思います Zedboard と Parallella がターゲット
0 件のコメント:
コメントを投稿