From nobody Thu Dec 26 13:11:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114299+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114299+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706104427; cv=none; d=zohomail.com; s=zohoarc; b=O+03hqEAb0br8xXepvSkOtBAqCjJ2tS74gi2Jw7yIf/EsIWf2X1pLpN9liOkLZhZM5+AypY44qjMFj6ErRtpVcneESgS67dco/UCLMxIY/9omOcO5lHboKvf7k/r/gfHeywnFRllMyQ+Z3t1iS2SCAi6clfPQQUZm/ZcJ91mSF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706104427; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=GaNtbarwgVrreYL5iuzON2Kobm71eKgzno9TC3D+XWo=; b=Rd7w7HfrBw458EeZrpYZDF8QDuBynCvPExS5fpNdhN1t1CkVYzwg27+NDeY1QK0QHC0jwNNMVRoFW3/03+iX4F1lI2HpnjSLYgRdosZAsQYg6QPpvuspE44gRfc+uh13XePqbWg+e5Z3c1ri08GrN74nWyxrM6uI9hAyM3JwJtc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114299+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706104427683593.2826528335162; Wed, 24 Jan 2024 05:53:47 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=fNR9eQzw2lVMGFdmYZVXAfkkqAA1hOtMOdXQ/1/zdYg=; 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=20140610; t=1706104427; v=1; b=WR044T5teQnM/J/OOTthV2Zx+LRmey9VGxp7BxZ1V0q+2P7eDx5gWQdtmhKc68JBf54TZJ1/ kE1J6Q20835caYOqDRkfjD4Nzds/YROoYueiwkiLpSj2Lnc2+ldcf9pb3To2Gv6fyEX6CwskoCq cs5yy5vRKqxqBhfDBDESArxY= X-Received: by 127.0.0.2 with SMTP id TxrrYY1788612x9wh5XosmBA; Wed, 24 Jan 2024 05:53:47 -0800 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web10.22795.1706104426536406194 for ; Wed, 24 Jan 2024 05:53:46 -0800 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 6E05C260AD4; Wed, 24 Jan 2024 14:53:44 +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 ApflY-1euhPw; Wed, 24 Jan 2024 14:53:42 +0100 (CET) X-Received: from [192.168.200.139] (83.11.3.72.ipv4.supernova.orange.pl [83.11.3.72]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 9A1E926084B; Wed, 24 Jan 2024 14:53:40 +0100 (CET) From: "Marcin Juszkiewicz" Date: Wed, 24 Jan 2024 14:53:40 +0100 Subject: [edk2-devel] [PATCH edk2-platforms v3 5/5] Platform/SbsaQemu: hang if there is no cpu information MIME-Version: 1.0 Message-Id: <20240124-no-dt-for-cpu-v3-5-5375fcf09037@linaro.org> References: <20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org> In-Reply-To: <20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org> To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Graeme Gregory , 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: zJNUSrZb8rwo7Yapv7pI7Sfex1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706104429867100019 In case we do not have cpu information (SMC call fails, our minimal DT lacks info) we hang. TODO: shutdown instead Signed-off-by: Marcin Juszkiewicz --- .../SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c | 3= +++ 1 file changed, 3 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemu= HardwareInfoLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/S= bsaQemuHardwareInfoLib.c index 6315cce3fb7f..923997edb2f1 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.c +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwar= eInfoLib.c @@ -95,6 +95,9 @@ FdtHelperCountCpus ( Node =3D fdt_path_offset (DeviceTreeBase, "/cpus"); if (Node <=3D 0) { DEBUG ((DEBUG_ERROR, "Unable to locate /cpus in DeviceTree\n")); + // as we do not have information about cpu count we panic here + // TODO: shutdown rather than hang + CpuDeadLoop(); return 0; } =20 --=20 2.43.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 (#114299): https://edk2.groups.io/g/devel/message/114299 Mute This Topic: https://groups.io/mt/103931821/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-