All of lore.kernel.org
 help / color / mirror / Atom feed
* XTF on arm
@ 2021-08-03  7:11 Michal Orzel
  0 siblings, 0 replies; only message in thread
From: Michal Orzel @ 2021-08-03  7:11 UTC (permalink / raw)
  To: xen-devel, Andrew Cooper
  Cc: Julien Grall, Stefano Stabellini, christopher.w.clark, Bertrand Marquis

Hello guys,

During the last Xen community call I was talking about my work to port XTF to arm(more specifically arm64).
There was quite a bigh interest in this topic hence I created a pull request for Andrew's XTF on github with the first patch series.
It consists of several patches creating a base for further implementations.

Support for arm64 allows to run a hello-world test(tests/example) with 2 environments:
-64le: arm64, little endian, no MMU
-mmu64le: arm64, little endian, MMU
Support for arm32 allows to run only a startup code.

This series was tested using qemu-system-aarch64 and FVP_Base_RevC-2xAEMvA with XTF running
as dom0 or domU.

Please review, test, comment and feel free to ask questions(please do that on github).

Pull request:
https://github.com/andyhhp/xtf/pull/4

How to download pull request from github:
https://patch-diff.githubusercontent.com/raw/andyhhp/xtf/pull/4.patch

Instructions on how to prepare base setup for testing XTF on arm64 using QEMU:

1. Build XTF:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CONFIG_LOAD_ADDRESS=0x80000000
-this will result in 2 binaries inside tests/example:
->test-arm-64le-example - no MMU(uses 0x80000000 as a start address)
->test-arm-mmu64le-example - with MMU

2. Build Xen for arm64
-select early printk for PL011, 0x9000000, 115200

3. Generate device tree:
qemu-system-aarch64 -machine virt,gic_version=3 -machine virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -display none -machine dumpdtb=virt-gicv3.dtb

4. Add chosen node:
chosen {
xen,xen-bootargs = "noreboot dom0_mem=1024M console=dtuart dtuart=serial0 bootscrub=0 iommu=no";

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

module@0 {
reg = <0x47000000 0x1000000>;
compatible = "xen,linux-zimage", "multiboot,module";
};

};
};

5. Build u-boot for qemu arm64

6. Run Xen on QEMU with XTF as dom0:
    qemu-system-aarch64
    -machine virt,gic_version=3
    -machine virtualization=true
    -cpu cortex-a57
    -machine type=virt -m 4096 -smp 4
    -bios <u_boot_binary>
    -device loader,file=<xen_binary>,force-raw=on,addr=0x49000000
    -device loader,file=test-arm-mmu64le-example,addr=0x47000000
    -device loader,file=virt-gicv3.dtb,addr=0x44000000
    -nographic -no-reboot
    -chardev socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet
    -mon qemu-monitor,mode=readline


Cheers,
Michal


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-03  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03  7:11 XTF on arm Michal Orzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.