Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 171
» Latest member: Finley167
» Forum threads: 65
» Forum posts: 289

Full Statistics

Online Users
There are currently 13 online users.
» 0 Member(s) | 13 Guest(s)

Latest Threads
Possible to run older ver...
Forum: Getting Started
Last Post: Robert.VanVossen
08-21-2017, 02:48 PM
» Replies: 1
» Views: 44
Which qemu-system-aarch64...
Forum: Getting Started
Last Post: brettstahlman
08-15-2017, 01:55 PM
» Replies: 2
» Views: 48
XZD Yocto Layer
Forum: Knowledge Base
Last Post: ariefgrand
08-14-2017, 05:20 PM
» Replies: 6
» Views: 483
DomU I/O and Communicatio...
Forum: Public Support
Last Post: Nathan.Studer
08-14-2017, 01:21 PM
» Replies: 3
» Views: 309
SD card does not boot pas...
Forum: Public Support
Last Post: jarvis_roach
08-04-2017, 01:58 PM
» Replies: 5
» Views: 363
SD card booting hangs sta...
Forum: Public Support
Last Post: ReubenLewis
07-21-2017, 12:54 PM
» Replies: 1
» Views: 264
booting from SD card
Forum: Public Support
Last Post: jarvis_roach
07-18-2017, 03:07 PM
» Replies: 5
» Views: 451
kpartx won't mount root p...
Forum: Public Support
Last Post: jarvis_roach
07-12-2017, 12:11 AM
» Replies: 1
» Views: 206
XZD_20160930 Release
Forum: Knowledge Base
Last Post: jarvis_roach
07-11-2017, 12:23 PM
» Replies: 5
» Views: 1,666
Yocto image as domU
Forum: Public Support
Last Post: jarvis_roach
07-11-2017, 12:17 PM
» Replies: 12
» Views: 868

 
  Unable to Boot the Emulated System
Posted by: wmurwin - 12-16-2015, 08:53 PM - Forum: Public Support - Replies (2)

Unable to Boot the Emulated System

Using the instructions from the Xen Zynq Distribution User Manual from section 3.4.1 "Booting the emulated system".

I get the following error:
ERROR: No hardware dtb found. This is required to boot ZynqMP

But if I look in $RELEASE_DIR/dist/images/linux I see a xen.dtb

I am using petalinux-boot from 2015.4

Print this item

  Welcome!
Posted by: jarvis_roach - 11-13-2015, 08:06 PM - Forum: Getting Started - No Replies

Welcome to the Xen Zynq Distribution (XZD) Community Forum, an online community built around providing support for Xen on the Zynq MPSoC. This forum is moderated by admins from DornerWorks, engineers who's expertise is where software and hardware meets.

The XZD is everything you need to start up a target in 5 minutes, plus everything you need to start adding your own features and applications, and includes:

  • Xen Hypervisor
  • Control domain kernel and file system
  • Guest kernel and multiple file systems
  • Bare metal and device passthrough examples
  • System and guest configuration files
  • Boot files
  • FSBL
  • ATF
  • U-Boot
  • Zynq UltraScale+ MPSoC Project BSP
  • Quick EMUlator (QEMU) supporting a model of the MPSoC hardware
Best of all, it's freely available to everyone!  http://xen.world

Feel free to browse our forum for answers to questions or problems you might have. If you don't see you're problem already listed somewhere, please post your question, asking a question is as much of a service as answering one. If you see a question and know the answer, we encourage you to post your answer; show off your mad skills and impress your friends. Please no spam or foul language, let's keep this forum coolly professional and cordial.

Still at a loss and are desperate for help? Check us out at http://dornerworks.com/services/xilinxxe...on-support.

Print this item

  XZD beta_09_24_2015 Release
Posted by: jarvis_roach - 09-25-2015, 03:26 PM - Forum: Knowledge Base - No Replies

DornerWorks is pleased to announce the beta_09_24_2015 release of XZD!

XZD Package:  http://dornerworks.com/wp-content/upload...09_24_2015
User's Manual: http://dornerworks.com/wp-content/upload...Manual.pdf

New Features
Device passthrough supported and explained.
Instructions for using Linaro OpenEmbedded or Ubuntu Core file systems; generated images provided.

Print this item

  XZD Past Releases
Posted by: jarvis_roach - 09-25-2015, 03:22 PM - Forum: Knowledge Base - No Replies

beta_04_17_2015
XZD Package
User's Manual

beta_06_25_2015
User's Manual

Print this item

  UART Pass-Through Guide
Posted by: skentzos - 09-25-2015, 02:17 PM - Forum: Knowledge Base - No Replies

Here is a guide on how to pass-through a UART device for the XZD. 

-Paul Skentzos



Attached Files
.pdf   Xen Zynq Distribution (XZD) UART Pass Through How To Guide.pdf (Size: 51.75 KB / Downloads: 59)
Print this item

  Bare Metal Guest Guide
Posted by: Robert.VanVossen - 09-25-2015, 01:59 PM - Forum: Knowledge Base - Replies (2)

Here is a guide on how to use the Bare Metal Guest container for the XZD. 

-Robbie VanVossen



Attached Files
.pdf   Xen Zynq Distribution (XZD) Bare Metal Guest How To Guide.pdf (Size: 50.82 KB / Downloads: 150)
Print this item

  Enable multiple CPUs in QEMU
Posted by: jarvis_roach - 06-18-2015, 08:02 PM - Forum: Public Support - No Replies

1. In dts/xen.dts, change device_type = "none"; to device_type ="cpu"; for each core you want to enable.
2. In dts/xen.dts, change maxcpus=1 to maxcpus=2; or maxcpus=3; in chosen/xen,xen-bootargs and chosen/xen,dom0-bootargs.
 *Setting maxcpus=4 seems to cause some sort of deadlock during kernel initialization. 
3. Build new /tftpboot/xen.dtb from dts/xen.dts (make install-xen-dtb or use dtc).


From dom0, cat /proc/cpuinfo or xl cpupool-list will show the extra cores in use.

Print this item

  QEMU, Multiple NICs
Posted by: jarvis_roach - 06-18-2015, 07:53 PM - Forum: Public Support - No Replies

1. In dts/xen.dts, change status = "disabled"; to status = "okay"; for each Ethernet controller you want to use in the QEMU target.
2. Rebuild /tftpboot/xen.dtb from dts/xen.dts using make install-xen-dtb or dtc.
3. For each NIC you want to use, including the first one, add "-net nic,vlan=0 -net user,vlan=0" options to the QEMU invocation.
4. From dom0, issue 'udhcpc -i ethN' for each NIC other than eth0 that you want the QEMU DHCP server to assign an address to.
   *Note that using vlan=0 for each configuration pair means that all NICs will be on the same virtual network, and the DHCP server will assign a unique IP address. If you assign each NIC to its own vlan (by using unique vlan IDs for each configuration pair), then the DHCP server will assign the same IP address (10.0.2.15 by default) to each NIC.

From the qemu monitor (normally entered by ctl-a c from serial0)  info network will show how the NICs are configured. With the first two Ethernet controllers enabled and put on the same vlan, info network returns:
hub 0

 \ user.1: index=0,type=user,net=10.0.2.0,restrict=off
 \ ps7-ethernet@0xFF0C0000: index=0,type=nic,
 \ user.0: index=0,type=user,net=10.0.2.0,restrict=off
 \ ps7-ethernet@0xFF0B0000: index=0,type=nic,
ps7-ethernet@0xFF0D0000: index=0,type=nic,
ps7-ethernet@0xFF0E0000: index=0,type=nic,

Print this item

  Enabling UART1 on QEMU MPSoC
Posted by: jarvis_roach - 06-18-2015, 02:29 PM - Forum: Public Support - No Replies

The Zynq MPSoC has two standard UART controllers which, on REMUS and the actual chip, can be used for two independent serial connections. Unfortunately, the default configurations for QEMU in the Beta2 release actively disables the second UART. Fortunately, with a few minor modifications you can enable UART1 and setup QEMU to run so that serial port is connected to a telnet session (or pipe, pty, or file). 

At the high level, you need to enable UART1 in the dtb (device tree blob) that is passed to QEMU which tells it which devices to emulate, you need to update the dtb that is passed to Xen on boot to fix an interrupt issue, and finally you need to invoke QEMU with the options to redirect the input/output of UART1 to a device/file/pipe on your host.

This procedure assumes you have downloaded XZD and created a Xilinx MPSoC project.


1. Enable UART1 in QEMU dtb

a. Convert the QEMU dtb file to dts (device tree specification).


source <petalinux dir>/settings.sh

dtc -I dtb -O dts <project directory>/images/linux/xilinx-ronalado-arm.dtb  -o qemu.dts


b. Delete the line disabling UART1 in qemu.dts (file you just created). Search for serial@FF010000 in your favorite text editor and delete the offending text at line 1013. Save your changes.

  serial@0xFF010000 {

                        compatible = "xlnx,ps7-uart-1.00.a", "xlnx,xuartps";
                        current-speed = <0x1c200>;
                        interrupts = <0x16>;
                        port-number = <0x0>;
                        reg = <0x0 0xff010000 0x1000>;
                        xlnx,has-modem = <0x0>;
                        xlnx,uart-clk-freq-hz = <0x2faf080>;
                        clock-names = "ref_clk", "aper_clk";
                        clocks = <0x29 0x29>;
                        ttrig-polarity = <0x1>;
                        status = "disabled";
                };


c. Convert the modified dts file back to dtb.

dtc -I dts -O dtb qemu.dts -o <project directory>/images/linux/xilinx-ronalado-arm.dtb



2. Update the Xen dtb file

a. Edit the xen.dts file provided in the XZD, located at <XZD path>/dts/xen.dts, and change the UART1's interrupt from level triggered to edge triggered (line 363, change 0x4 to 0x1), and delete the text on 361. Save your changes.


  serial@ff010000 {
                        compatible = "cdns,uart-r1p8";
                        status = "disabled";
                        interrupt-parent = <0x1>;
                        interrupts = <0x0 0x16 0x1>;
                        reg = <0x0 0xff010000 0x1000>;
                        clock-names = "uart_clk", "pclk";
                        clocks = <0x2 0x2>;
                };


b. Rebuild the xen.dtb file.

$ cd <XZD directory>
$ make install-xen-dtb



3. Invoke QEMU with options to redirect UART1 to host device (in this case a telnet session)

a. Run standard QEMU to get default parameters. Copy the QEMU arguments.


$ cd <XZD directory>

$ make boot


Was PetaLinux settings.sh sourced? YES

touch /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/.running
# Note, this target won't ever finish until the device is powered off...
cd /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP && petalinux-boot --qemu --u-boot --qemu-args "-drive file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/dom0.qcow,format=qcow2,id=sata-drive -device ide-drive,drive=sata-drive,bus=ahci@0xFD0C0000.0 -redir tcp:2222::22" | tee /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/.running && rm -f /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/.running
qemu_cmd=qemu-system-aarch64
--------------------------------------------------------------------
Xilinx QEMU Apr  9 2015 20:01:21.
--------------------------------------------------------------------
INFO: TCP PORT is free 
INFO: Starting aarch64 QEMU
INFO:  qemu-system-aarch64 -L /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/petalinux-v2015.SW_Beta2-final/etc/qemu -M arm-generic-fdt -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4   -serial mon:stdio -serial /dev/null -display none -device loader,file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/bl31.elf,cpu=0 -device loader,file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/u-boot.elf -gdb tcp::9000  -tftp /tftpboot -drive file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/dom0.qcow,format=qcow2,id=sata-drive -device ide-drive,drive=sata-drive,bus=ahci@0xFD0C0000.0 -redir tcp:2222::22 -hw-dtb /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/xilinx-ronaldo-arm.dtb -pflash /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/nand0.qcow2 -pflash /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/nand0.qcow2


b. Paste the QEMU invocation to a command prompt, replace the "-serial /dev/null" option with "-serial telnet::4444,server".

qemu-system-aarch64 -L /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/petalinux-v2015.SW_Beta2-final/etc/qemu -M arm-generic-fdt -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4   -serial mon:stdio -serial telnet::4444,server -display none -device loader,file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/bl31.elf,cpu=0 -device loader,file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/u-boot.elf -gdb tcp::9000  -tftp /tftpboot -drive file=/home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/dom0.qcow,format=qcow2,id=sata-drive -device ide-drive,drive=sata-drive,bus=ahci@0xFD0C0000.0 -redir tcp:2222::22 -hw-dtb /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/xilinx-ronaldo-arm.dtb -pflash /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/nand0.qcow2 -pflash /home/jarvis/CONFIDENTIAL_Zinq_Next_Gen_Hypervisor_2132/Xilinx-ZynqMP/images/linux/nand0.qcow2


Note the bolded text is what you can change for other redirection options (such as file:<path to file>, pipe:<path to pipe>, pty, etc). For more details see QEMU User Doc.

c. From another terminal, run telnet:

$ telnet localhost 4444

At this point, the QEMU should boot to a dom0 login prompt (user: root, pwd: root). From the dom0 shell, you will see that ttyPS0 was installed (ls /dev or dmesg | grep tty). Writing to or reading from /dev/ttyPS0 from the guest will result in reverse operation on the host device. For example, echo hello > /dev/ttyPS0 will cause "hello" to appear on the telnet terminal, and cat /dev/ttyPS0 will display strings of data entered in the telnet terminal after a newline (return) is entered.

From dom0:

[root@xilinx-dom0 ~]# dmesg | grep tty

[    4.225433] xuartps ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 54, base_baud = 1562500) is a xuartps
[root@xilinx-dom0 ~]# echo hello > /dev/ttyPS0
[root@xilinx-dom0 ~]# cat /dev/ttyPS0
This data is coming from the telnet session
blah
asdfasd;gja;lsdgja;klgja;lksdgja;lkdfgja;lsdfkgjakl;gja;klgha;klghakl;dgal;ksdgjal;skghakl;gha;lskdgha;lskdgha;lsdkgha;lsgha;lsdghka;slgkha;sdklgha;slgkhas;lgkha;slgkha;sdlghka;gklhal;sdgkha;sgklhasd;gklahdg;lkhadg;khasd;ghklasd;gkahsd;gklahsd;gklahsdg;ahsdg;aklshdg;aklsdhg;alskdgh;aklsdgh;alsdkgha;sldkgha;sdlgh;alskdgh;asdghka;sdlgkha;sdlghka;sdghasdkl;gha;sdghka;sdklghas;dklgha;sldkgha;sdklgha;sdlgkha;sdlgha;sdlgkhasdl;gkhasdl;gkhas;dlgkhasdl;gkah
String is sent when enter/return/newline is typed in telnet session



From the host terminal:


$ telnet localhost 4444

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
hello
This data is coming from the telnet session
blah

asdfasd;gja;lsdgja;klgja;lksdgja;lkdfgja;lsdfkgjakl;gja;klgha;klghakl;dgal;ksdgjal;skghakl;gha;lskdgha;lskdgha;lsdkgha;lsgha;lsdghka;slgkha;sdklgha;slgkhas;lgkha;slgkha;sdlghka;gklhal;sdgkha;sgklhasd;gklahdg;lkhadg;khasd;ghklasd;gkahsd;gklahsd;gklahsdg;ahsdg;aklshdg;aklsdhg;alskdgh;aklsdgh;alsdkgha;sldkgha;sdlgh;alskdgh;asdghka;sdlgkha;sdlghka;sdghasdkl;gha;sdghka;sdklghas;dklgha;sldkgha;sdklgha;sdlgkha;sdlgha;sdlgkhasdl;gkhasdl;gkhas;dlgkhasdl;gkah

Print this item

  Ethernet Passthrough
Posted by: Robert.VanVossen - 06-12-2015, 03:14 PM - Forum: Public Support - Replies (4)

Some people have been interested in a guide on doing ethernet passthrough, so I thought I would write one here. 

First off you need to modify your Xen device tree that is loaded through U-Boot. Disable the Ethernet gem and enable Xen passthrough:

Code:
        gem1: ethernet@ff0c0000 {
            #stream-id-cells = <0x1>;
            compatible = "cdns,gem";
            interrupt-parent = <0x1>;
            interrupts = <0x0 0x4b 0x4>;
            reg = <0x0 0xff0c0000 0x1000>;
            clock-names = "pclk", "hclk", "tx_clk";
            clocks = <0x2 0x2 0x2>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;

+            xen,passthrough = <1>;
+            status = "disabled";
        };

Then add the device as an mmu-master to the smmu in the same device tree:

Code:
              smmu0: smmu0@0xFD800000 {
                       compatible = "arm,mmu-500";
                       reg = <0x0 0xfd800000 0x20000>;
                       #global-interrupts = <1>;
                       interrupt-parent = <&gic>;
                       interrupts = <0 157 4>,
                               <0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
                               <0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
                               <0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
                               <0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>;

-                        mmu-masters = <&gem0 0x874 >;
+                        mmu-masters = <&gem0 0x874 &gem1 0x875 >;
               };

After that, you will need to modify the configuration file for the guest through which you are passing the Ethernet gem. You will need to define the following options:

dtdev - The absolute path of the device to passthrough in the device tree
device_tree - dom0 path to partial device tree to be passed to the guest
irqs - irq to be given to the guest
iomem = the physical pages to be passed in to the guest

Here are the values added to a configuration file for gem1 being passed through:

Code:
dtdev = [ "/amba/ethernet@ff0d0000" ]
device_tree = "/etc/xen/xen-partial.dtb"
irqs = [ 109 ]
iomem = [ "0xff0c0,1" ]
 
The last step is to create the partial device tree that the configuration file points to. This is used to let the guest know how to setup the passthrough device. Here is how to configure the file:
Code:
/dts-v1/;

/ {
    #address-cells = <0x2>;
    #size-cells = <0x1>;

    passthrough {
        compatible = "simple-bus";
        ranges;
        #address-cells = <0x2>;
        #size-cells = <0x1>;

        misc_clk {
            #clock-cells = <0x0>;
            clock-frequency = <0x17d7840>;
            compatible = "fixed-clock";
            linux,phandle = <0x2>;
            phandle = <0x2>;
        };

        ethernet@ff0c0000 {
            #stream-id-cells = <0x1>;
            compatible = "cdns,gem";
            reg = <0x0 0xff0c0000 0x1000>;
            interrupts = <0x0 0x4b 0x4>;
            clock-names = "pclk", "hclk", "tx_clk";
            clocks = <0x2 0x2 0x2>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            local-mac-address = [00 0a 35 00 02 02];
            phy-handle = <0x1>;
            phy-mode = "rgmii-id";

            phy@0 {
                reg = <0x0>;
                max-speed = <0x64>;
                linux,phandle = <0x1>;
                phandle = <0x1>;
            };
        };
    };
};

Then generate the dtb using the following command:
Code:
dtc -I dts -O dtb -o xen-partial.dtb xen-partial.dts

Then when you start your guest, it should initialize gem1 and have exclusive access to the device.

Print this item