Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎08-31-2017

Running Linux and Bare-Metal System on Both Zynq SoC Processors

Hi everyone,
i tried to run PetaLinux on one ARM core and a 'bare-metal'-application on the othe ARM core of the Zynq PS. I am using a Zedboard rev D and followed the XAPP1078 instructions and used the updated Design Files for Vivado 2014.4 and Petalinux 2014.4 tools. (
I additionally changed:
- linker.ld file: ps7_ddr_0_S_AXI_BASEADDR     BASEADDR 0x18000000      SIZE 0x08000000
- u-boot zynq_zed.h: #define CONFIG_SYS_SDRAM_SIZE           (512 * 1024 * 1024)
- Device-Tree:
               memory {
                              device_type = "memory";
                              reg = <0x0 0x18000000>;
and the changes as described in the guide XAPP1078.
Does anyone had have those troubles before or does anyone got the xapp1078 latest informations guide working with the zedboard rev. D?
I would really appreciate some tips. Thx in advance!
Terminal output:
U-Boot 2014.07 (Aug 25 2017 - 10:18:57)
DRAM:  ECC disabled 512 MiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
U-BOOT for plnx-project
Gem.e000b000 Waiting for PHY auto negotiation to complete...... done BOOTP broadcast 1 BOOTP broadcast 2 DHCP client bound to address XXX.XX.XXX.XXX Hit any key to stop autoboot:  0
Device: zynq_sdhci
Manufacturer ID: 74
OEM: 4a45
Name: USD
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading image.ub
7697556 bytes read in 709 ms (10.4 MiB/s) ## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  PetaLinux Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x010000f0
     Data Size:    7682612 Bytes = 7.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    crc32
     Hash value:   80901caa
   Verifying Hash Integrity ... crc32+ OK ## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x01753c08
     Data Size:    13645 Bytes = 13.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   4689f259
   Verifying Hash Integrity ... crc32+ OK
   Booting using the fdt blob at 0x1753c08
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 07ff9000, end 07fff54c ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 3.17.0-xilinx (root@zedboard-VirtualBox) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-23) ) #5 SMP PREEMPT Thu Aug 31 15:24:02 CEST 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache Machine model: plnx-project
cma: Reserved 128 MiB at 10000000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @4fc9e000 s8704 r8192 d15872 u32768 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 97536 Kernel command line: console=ttyPS0,115200 earlyprintk maxcpus=1 mem=384M PID hash table entries: 2048 (order: 1, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 247176K/393216K available (4623K kernel code, 239K rwdata, 1588K rodata, 4404K init, 210K bss, 146040K reserved, 0K highmem) Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    vmalloc : 0x58800000 - 0xff000000   (2664 MB)
    lowmem  : 0x40000000 - 0x58000000   ( 384 MB)
    pkmap   : 0x3fe00000 - 0x40000000   (   2 MB)
    modules : 0x3f000000 - 0x3fe00000   (  14 MB)
      .text : 0x40008000 - 0x406190f8   (6213 kB)
      .init : 0x4061a000 - 0x40a67200   (4405 kB)
      .data : 0x40a68000 - 0x40aa3de0   ( 240 kB)
       .bss : 0x40aa3de0 - 0x40ad86ec   ( 211 kB)
Preemptible hierarchical RCU implementation.
        Dump stacks of tasks blocking RCU-preempt GP.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
L2C: platform provided aux values match the hardware, so have no effect.  Please remove them.
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76360001 slcr mapped to 58804000
zynq_clock_init: clkc starts at 58804100 Zynq clock init
sched_clock: 64 bits at 330MHz, resolution 3ns, wraps every 3331853385728ns timer #0 at 58806000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1318.91 BogoMIPS (lpj=6594560)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0x45eb00 - 0x45eb58 Brought up 1 CPUs
SMP: Total of 1 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x58880000
VCCPINT: 1000 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <> PTP clock support registered EDAC MC: Ver: 3.0.0 Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes) TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes) UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available futex hash table entries: 512 (order: 3, 32768 bytes)
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 738
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3187500) is a xuartps console [ttyPS0] enabled xdevcfg f8007000.devcfg: ioremap 0xf8007000 to 58866000 [drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi32766.0: s25fl256s1 (32768 Kbytes)
4 ofpart partitions found on MTD device spi32766.0 Creating 4 MTD partitions on "spi32766.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000002000000 : "spare"
CAN device driver interface
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
libphy: XEMACPS mii bus: probed
xemacps e000b000.ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
zynq-dr e0002000.usb: Unable to init USB phy, missing?
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice i2c /dev entries driver cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at 5886e000 with timeout 10s zynq-edac f8006000.memory-controller: ecc not enabled Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper sdhci-arasan e0100000.sdhci: No vmmc regulator found sdhci-arasan e0100000.sdhci: No vqmmc regulator found
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1 Registering SWP/SWPB emulation handler
/opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17/drivers/rtc/hctosys.c: unable to open rtc device (rtc0) ALSA device list:
  No soundcards found.
mmc0: new high speed SDHC card at address 59b4 Freeing unused kernel memory: 4404K (4061a000 - 40a67000)
mmcblk0: mmc0:59b4 USD   3.74 GiB
 mmcblk0: p1 p2
INIT: version 2.88 booting
Creating /dev/flash/* device nodes
random: dd urandom read with 8 bits of entropy available starting Busybox inet Daemon: inetd... done.
Starting uWeb server:
NET: Registered protocol family 10
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)  Removing any system startup links for run-postinsts ...
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc (v1.22.1) started Sending discover...
Sending discover...
xemacps e000b000.ethernet: Set clk to 124666667 Hz xemacps e000b000.ethernet: link up (1000/FULL) Sending discover...
Sending select for XXX.XX.XXX.XXX...
Lease of XXX.XX.XXX.XXX obtained, lease time 43200
/etc/udhcpc.d/50default: Adding DNS XXX.XX.XXX.XXX
/etc/udhcpc.d/50default: Adding DNS XXX.XX.XXX.XXX done.
Built with PetaLinux v2014.4 (Yocto 1.7) plnx-project /dev/ttyPS0 plnx-project login: root
login[856]: root login on 'ttyPS0'
root@plnx-project:~# peek 0xffff8000
root@plnx-project:~# poke 0xfffffff0 0x18000000 root@plnx-project:~# peek 0xfffffff0
root@plnx-project:~# random: nonblocking pool is initialized root@plnx-project:~# peek 0xffff8000
root@plnx-project:~# peek 0xffff8000
I tried to debug the 'bare-metal'-application and got following errors in the disassembly log:
18000000:   Cannot access memory at address 0x18000000
18000001:   Cannot access memory at address 0x18000004
18000002:   Cannot access memory at address 0x18000004
18000003:   Cannot access memory at address 0x18000004
18000004:   Cannot access memory at address 0x18000004
18000005:   Cannot access memory at address 0x18000008

0 Kudos
0 Replies