In case we do not have cpu information (SMC call fails, our minimal DT lacks info) we shutdown system.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiew...@linaro.org> --- .../Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf | 2 ++ .../SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf index 5358dd339eb3..acf91225b4c7 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf @@ -21,6 +21,7 @@ [Packages] ArmPkg/ArmPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec Silicon/Qemu/SbsaQemu/SbsaQemu.dec [LibraryClasses] @@ -28,6 +29,7 @@ [LibraryClasses] BaseMemoryLib DebugLib FdtLib + ResetSystemLib [Pcd] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c index 6315cce3fb7f..e1f1a9588b19 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c @@ -10,6 +10,7 @@ #include <Library/ArmSmcLib.h> #include <Library/DebugLib.h> #include <Library/PcdLib.h> +#include <Library/ResetSystemLib.h> #include <Library/SbsaQemuHardwareInfoLib.h> #include <libfdt.h> #include <IndustryStandard/SbsaQemuSmc.h> @@ -95,7 +96,7 @@ FdtHelperCountCpus ( Node = fdt_path_offset (DeviceTreeBase, "/cpus"); if (Node <= 0) { DEBUG ((DEBUG_ERROR, "Unable to locate /cpus in DeviceTree\n")); - return 0; + ResetShutdown(); } CpuCount = 0; -- 2.44.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116430): https://edk2.groups.io/g/devel/message/116430 Mute This Topic: https://groups.io/mt/104763767/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-