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 E1AA7AC14FD for ; Wed, 24 Jan 2024 13:53:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+ch1fgM1x3xwAdtinoLVVJDg6lmGyJUDJ5uHPEzKlLo=; 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=Kcq+fosa4GtDmNhbbIVdEOYhJqvjPa+mebJc0fWP2kA1KCgg9Q8SWniS92JhlP716RuJv3wx XvqcYQRYKKN9io3kEUqY4OJmhMvZPxzEAXO89EbHnF38ljxnxUi/mfZVEJmpfbIhKybFjCsV4le u2hkiiCwXRsQeGoS2CUXml8o= X-Received: by 127.0.0.2 with SMTP id PBw0YY7687511xposYveJEdH; 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: t2zcqVThkff5H7LB7mP60nVcx7686176AA= 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=20140610 header.b=Kcq+fosa; 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 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/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-