]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
ArmPkg: allow HYP timer interrupt to be omitted
[mirror_edk2.git] / ArmPlatformPkg / ArmVirtualizationPkg / VirtFdtDxe / VirtFdtDxe.c
index be74d62ad748fe14d74682f2a3b7753589379a3b..274cdeb8c8f49e5cced2d6e01261a715814df989 100644 (file)
@@ -452,7 +452,7 @@ InitializeVirtFdtDxe (
       //  hypervisor timers, in that order.\r
       //\r
       InterruptProp = fdt_getprop (DeviceTreeBase, Node, "interrupts", &Len);\r
-      ASSERT (Len == 48);\r
+      ASSERT (Len == 36 || Len == 48);\r
 \r
       SecIntrNum = fdt32_to_cpu (InterruptProp[0].Number)\r
                    + (InterruptProp[0].Type ? 16 : 0);\r
@@ -460,8 +460,8 @@ InitializeVirtFdtDxe (
                 + (InterruptProp[1].Type ? 16 : 0);\r
       VirtIntrNum = fdt32_to_cpu (InterruptProp[2].Number)\r
                     + (InterruptProp[2].Type ? 16 : 0);\r
-      HypIntrNum = fdt32_to_cpu (InterruptProp[3].Number)\r
-                   + (InterruptProp[3].Type ? 16 : 0);\r
+      HypIntrNum = Len < 48 ? 0 : fdt32_to_cpu (InterruptProp[3].Number)\r
+                                  + (InterruptProp[3].Type ? 16 : 0);\r
 \r
       DEBUG ((EFI_D_INFO, "Found Timer interrupts %d, %d, %d, %d\n",\r
         SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum));\r