diff options
author | Ayan Kumar Halder | 2021-11-10 16:03:45 +0000 |
---|---|---|
committer | Stefano Stabellini | 2021-11-10 12:05:38 -0800 |
commit | 4435825070fe062bb5576e9e048883191c0d87b7 (patch) | |
tree | 326dd1bb6cca9c7db85678b13260a679d8494aba | |
parent | c3ae3077b9489c105089592d59b146c456f5ed6b (diff) |
Enable setting xen,passthrough
Add an option 'XEN_PASSTHROUGH_PATHS' to the imagebuilder config file.
It takes a list of device paths (separated by spaces) which needs to be
marked with xen,passthrough.
Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | scripts/uboot-script-gen | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -34,6 +34,7 @@ LOAD_CMD="tftpb" DEVICE_TREE="mpsoc.dtb" XEN="xen" XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1G dom0_max_vcpus=1 bootscrub=0 vwfi=native sched=null" +XEN_PASSTHROUGH_PATHS="/axi/ethernet@ff0e0000 /axi/serial@ff000000" DOM0_KERNEL="Image-dom0" DOM0_CMD="console=hvc0 earlycon=xen earlyprintk=xen clk_ignore_unused" DOM0_RAMDISK="dom0-ramdisk.cpio" @@ -86,6 +87,9 @@ Where: - XEN_CMD specifies the command line arguments used for Xen. If not set, the default one will be used. +- XEN_PASSTHROUGH_PATHS specifies the passthrough devices (separated + by spaces). It adds "xen,passthrough" to the corresponding dtb nodes. + - DOM0_KERNEL specifies the Dom0 kernel file to load. - DOM0_CMD specifies the command line arguments for Dom0's Linux diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 66bcad7..4f9c04a 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -133,6 +133,11 @@ function xen_device_tree_editing() dt_set "/chosen/dom0-ramdisk" "reg" "hex" "0x0 $ramdisk_addr 0x0 $(printf "0x%x" $ramdisk_size)" fi + for devpath in $XEN_PASSTHROUGH_PATHS + do + dt_set "$devpath" "xen,passthrough" "str_a" + done + i=0 while test $i -lt $NUM_DOMUS do |