diff mbox series

[ImageBuilder,5/5] uboot-script-gen: Add ability to specify "nr_spis"

Message ID 20240417120741.2453431-6-olekstysh@gmail.com (mailing list archive)
State New
Headers show
Series Misc updates for the dom0less support | expand

Commit Message

Oleksandr Tyshchenko April 17, 2024, 12:07 p.m. UTC
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

This is needed to have a possibility of assigning a specified number
of shared peripheral interrupts (SPIs) to domain.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
 README.md                | 5 +++++
 scripts/uboot-script-gen | 4 ++++
 2 files changed, 9 insertions(+)

Comments

Michal Orzel April 17, 2024, 12:33 p.m. UTC | #1
On 17/04/2024 14:07, Oleksandr Tyshchenko wrote:
> 
> 
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> This is needed to have a possibility of assigning a specified number
> of shared peripheral interrupts (SPIs) to domain.
> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal
diff mbox series

Patch

diff --git a/README.md b/README.md
index 63c4708..7683492 100644
--- a/README.md
+++ b/README.md
@@ -237,6 +237,11 @@  Where:
   PL011 UART for domain. The default is 1. If explicitly set to 0, then
   "console=ttyAMA0" is not used as a default DOMU_CMD[number].
 
+- DOMU_NR_SPIS[number] is optional. It specifies a number of shared peripheral
+  interrupts (SPIs) to be assigned to domain (depending on the underlying
+  hardware platform). The minimum possible value is 0, if DOMU_VPL011[number]
+  is also explicitly set to 0. Otherwise the minimum value is 1.
+
 - DOMU_CPUPOOL[number] specifies the id of the cpupool (created using
   CPUPOOL[number] option, where number == id) that will be assigned to domU.
 
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index fd37e18..50b6a59 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -348,6 +348,10 @@  function xen_device_tree_editing()
         then
             dt_set "/chosen/domU$i" "vpl011" "hex" "0x1"
         fi
+        if test -n "${DOMU_NR_SPIS[$i]}"
+        then
+            dt_set "/chosen/domU$i" "nr_spis" "int" "${DOMU_NR_SPIS[$i]}"
+        fi
         if [[ "${DOMU_ENHANCED[$i]}" == 1 || ("$DOM0_KERNEL" && "${DOMU_ENHANCED[$i]}" != 0) ]]
         then
             dt_set "/chosen/domU$i" "xen,enhanced" "str" "enabled"