Skip to content

Instantly share code, notes, and snippets.

View CptSpaceToaster's full-sized avatar

CptSpaceToaster

View GitHub Profile
$ arm-linux-gnueabihf-addr2line -e vmlinux 0xc0018486
/home/arlx/Github/linux-linaro-stable/arch/arm/mm/proc-v7.S:74
$ arm-linux-gnueabihf-addr2line -e vmlinux 0xc000d8ac
/home/arlx/Github/linux-linaro-stable/arch/arm/kernel/process.c:139
(gdb) bt
#0 0xc0018486 in ?? ()
#1 0xc000d8ac in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
$ arm-linux-gnueabihf-gdb
GNU gdb (Linaro GDB 2015.02-3) 7.8-2014.09-1-git
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf".
Type "show configuration" for configuration details.
/*
* This document has been created with Marked.app <http://markedapp.com>.
* Copyright 2011 Brett Terpstra
* ---------------------------------------------------------------------------
* Please leave this notice in place, along with any additional credits below.
*
* Byword.css theme is based on Byword.app <http://bywordapp.com>
* Authors: @brunodecarvalho, @jpedroso, @rcabaco
* Copyright 2011 Metaclassy, Lda. <http://metaclassy.com>
*/

Xen Zynq Distribution (XZD) Bare Metal Guest How To Guide

Revision: Beta_6_23_2015

Introduction

The XZD Bare Metal guest provides a container for a bare metal application, so it can be used as a Xen guest on the Xilinx Zynq UltraScale+ MPSoC. The container provides virtual memory mapping, a stack, catching faults, and printing to Xen's console. The bare metal application will be limited to the memory that Xen provides it.

Resources

The source code for the XZD Bare Metal container can be found at: https://github.com/dornerworks/xzd_baremetal

$ sudo apt-get install -y lib32z1
$ sudo apt-get install -y ncurses-dev
Iteration: 11
Parsing config from /etc/xen/dom1.cfg
[ 3233.541909] device vif31.0 entered promiscuous mode
[ 3233.617553] IPv6: ADDRCONF(NETDEV_UP): vif31.0: link is not ready
[dom1] [ 0.000000] Linux version 3.18.0 (arlx@arlx-xilinx) (gcc version 4.8.2 20131014 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.10 - Linaro GCC 2013.10) ) #1 SMP Tue Jun 2 14:32:06 EDT 2015
[dom1] [ 0.000000] CPU: AArch64 Processor [410fd032] revision 2
[dom1] [ 0.000000] Detected VIPT I-cache on CPU0
[dom1] [ 0.000000] efi: Getting EFI parameters from FDT:
[dom1] [ 0.000000] efi: UEFI not found.
[dom1] [ 0.000000] psci: probing for conduit method from DT.
Snip from the symbols file
18243 ffffffc00009345c: f9006fa4 str x4, [x29,#216]
18244 ffffffc000093460: f9006ba5 str x5, [x29,#208]
18245 ffffffc000093464: 940470f6 bl ffffffc0001af83c <copy_fs_struct>
> 18246 ffffffc000093468: f9049b80 str x0, [x28,#2352]
18247 ffffffc00009346c: f9406fa4 ldr x4, [x29,#216]
18248 ffffffc000093470: f9406ba5 ldr x5, [x29,#208]
18249 ffffffc000093474: b5ff8240 cbnz x0, ffffffc0000924bc <copy_process.part.50+0x5ec>
18250 ffffffc000093478: 1280017b mov w27, #0xfffffff4 // #-12
18251 ffffffc00009347c: 17fffc48 b ffffffc00009259c <copy_process.part.50+0x6cc>
# xl list
Name ID Mem VCPUs State Time(s)
dom0 0 512 1 r----- 46.4
dom1 2 128 1 -b---- 1.4
//Domid=2, cpu=0
(XEN) *** Serial input -> Xen (type 'CTRL-a' three times to switch input to DOM0)
(XEN) 'q' pressed -> dumping domain info (now=0x4C:7B90FD2C)
(XEN) General information for domain 0:
(XEN) refcnt=3 dying=0 pause_count=0
(XEN) nr_pages=131072 xenheap_pages=5 shared_pages=0 paged_pages=0 dirty_cpus={} max_pages=4294967295
(XEN) handle=00000000-0000-0000-0000-000000000000 vm_assist=00000000
(XEN) p2m mappings for domain 0 (vmid 1):
(XEN) 1G mappings: 0 (shattered 0)
(XEN) 2M mappings: 310 (shattered 10)
(XEN) 4K mappings: 5185