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 84A52AC12F8 for ; Wed, 31 Jan 2024 10:01:25 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ZGow9Q3Fy2YwTpbZguyhnp1ywEQsUlzorkR0LIj9SwQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706695284; v=1; b=fm+8uaLcFhI4doDgkfpu6GVfuS0V5T5CcDf0uq0clmu1ODVXD0to6aRarOhRU45B4ewPdwed D0JinRxXfEpGVfqKLszeKgBMvf6kvQ19JILLYR4feqnqyG7E+W0PDqf1xsABXuBF2x+Q7TDOW0n K3KFMumJMiUJJ8Ov7uR6v3co= X-Received: by 127.0.0.2 with SMTP id eH1SYY7687511xLAcSYbgNyf; Wed, 31 Jan 2024 02:01:24 -0800 X-Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by mx.groups.io with SMTP id smtpd.web11.10716.1706695282280502574 for ; Wed, 31 Jan 2024 02:01:22 -0800 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwBXEnFwGrploSbqBw--.20639S2; Wed, 31 Jan 2024 18:01:20 +0800 (CST) X-Received: from phytium.com.cn (unknown [218.76.62.144]) by mail (Coremail) with SMTP id AQAAfwAXA2lhGrplG5kCAA--.1801S7; Wed, 31 Jan 2024 18:01:16 +0800 (CST) From: "Xiong Yining" To: devel@edk2.groups.io Cc: quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, graeme@xora.org.uk, marcin.juszkiewicz@linaro.org, chenbaozi@phytium.com.cn Subject: [edk2-devel] [PATCH v4 4/6] Platform/SbsaQemu: hang if there is no cpu information Date: Wed, 31 Jan 2024 10:00:25 +0000 Message-Id: <20240131100027.2538549-5-xiongyining1480@phytium.com.cn> In-Reply-To: <20240131100027.2538549-1-xiongyining1480@phytium.com.cn> References: <20240131100027.2538549-1-xiongyining1480@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwAXA2lhGrplG5kCAA--.1801S7 X-CM-SenderInfo: x0lr0wp1lqx0bjrumio6sk53xlxphulrpou0/1tbiAQABBmW5T2UFegACsN X-Coremail-Antispam: 1Uk129KBjvdXoWrtr1rCFy7WF18Ar18CrW3Jrb_yoWkWFX_Za nru397Gr1UXFs2kF4F9Fy3XrWrZF9Yg3W8C3Z8tr13JF1093yFgryDJa1Fyr1jyayF9r9Y kr4jvr1fAw4IgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrnU Uv73VFW2AGmfu7jjvjm3AaLaJ3UjIYCTnIWjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRUUUUU UUUU= 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,xiongyining1480@phytium.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: HhZLd1hPJCEbLGrW7Ud6U5iSx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fm+8uaLc; dmarc=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 From: Marcin Juszkiewicz 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 --- .../Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c index 6315cce3fb..923997edb2 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c @@ -95,6 +95,9 @@ FdtHelperCountCpus ( Node = fdt_path_offset (DeviceTreeBase, "/cpus"); if (Node <= 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; } -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114871): https://edk2.groups.io/g/devel/message/114871 Mute This Topic: https://groups.io/mt/104072177/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-