From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3AE85740048 for ; Wed, 6 Mar 2024 11:42:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=eWDTAruuuuSCrV6gCeuLeDRo+s9MnsxYIl7+69o1B+0=; c=relaxed/simple; d=groups.io; h=From:Date:Subject:MIME-Version:Message-Id:References:In-Reply-To:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1709725323; v=1; b=Q/ZtqAEqYLaNNc/VCJ5WDXtuvgVGQ0UIvtPJcqKp+l2ALxDOw5d879X2giDBR92KebjTQ3GN LYd3kAaH5gjB9LKumBWNZ+E2RxYoKYmP5lHBSR3zFyr5z3F4SmrjeONSIVeLwoFJHqiONfIxBR/ +mWVvhjcSY6saj1TN8lU9U6kooWnyDams/jNZcqU0f3ZtW9xemTreAHg0zBOgYuB5mNrJYNeQOq wP8H9LJzrsVxSLAbEn3i75lSUBFDeUo5P+gQjbvWz2YoMvLVDf/Kdvz1ezlH/1BjrK/CwpPBsFF f/GkeXlUeAOpGpoE4MIUZZaNV58x0j10yfvEvkD0gaqLw== X-Received: by 127.0.0.2 with SMTP id hk7iYY7687511x4YhX7vhlTK; Wed, 06 Mar 2024 03:42:03 -0800 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.9855.1709725322258098915 for ; Wed, 06 Mar 2024 03:42:02 -0800 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 369BD260933; Wed, 6 Mar 2024 12:42:00 +0100 (CET) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id SFQC8j4Vn2yG; Wed, 6 Mar 2024 12:41:58 +0100 (CET) X-Received: from [172.17.0.1] (83.11.22.169.ipv4.supernova.orange.pl [83.11.22.169]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 2DAD4260839; Wed, 6 Mar 2024 12:41:57 +0100 (CET) From: "Marcin Juszkiewicz" Date: Wed, 06 Mar 2024 03:42:02 -0800 Subject: [edk2-devel] [PATCH edk2-platforms v6 5/7] Platform/SbsaQemu: hang if there is no cpu information MIME-Version: 1.0 Message-Id: <20240306-no-dt-for-cpu-v6-5-acd8727a1b59@linaro.org> References: <20240306-no-dt-for-cpu-v6-0-acd8727a1b59@linaro.org> In-Reply-To: <20240306-no-dt-for-cpu-v6-0-acd8727a1b59@linaro.org> To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Graeme Gregory , Xiong Yining , Chen Baozi , Marcin Juszkiewicz Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: LBUCQENL3EQjEuBMhe1fdCD9x7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="Q/ZtqAEq"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io In case we do not have cpu information (SMC call fails, our minimal DT lacks info) we shutdown system. Signed-off-by: Marcin Juszkiewicz --- .../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/SbsaQemu= HardwareInfoLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib= /SbsaQemuHardwareInfoLib.inf index 5358dd339eb3..acf91225b4c7 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.inf +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.inf @@ -21,6 +21,7 @@ [Packages] ArmPkg/ArmPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec Silicon/Qemu/SbsaQemu/SbsaQemu.dec =20 [LibraryClasses] @@ -28,6 +29,7 @@ [LibraryClasses] BaseMemoryLib DebugLib FdtLib + ResetSystemLib =20 [Pcd] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemu= HardwareInfoLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/S= bsaQemuHardwareInfoLib.c index 6315cce3fb7f..e1f1a9588b19 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.c +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -95,7 +96,7 @@ FdtHelperCountCpus ( Node =3D fdt_path_offset (DeviceTreeBase, "/cpus"); if (Node <=3D 0) { DEBUG ((DEBUG_ERROR, "Unable to locate /cpus in DeviceTree\n")); - return 0; + ResetShutdown(); } =20 CpuCount =3D 0; --=20 2.44.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-