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 D561AD8030B for ; Wed, 31 Jan 2024 12:05:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DyzJXvk3tqsRq2o6+VQHcYbCN8qCRWIudx0vFIfqyGk=; 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=1706702725; v=1; b=Ii7+EgLHEJm/DYeQT7Bphu+Z/nqHkMJ3e6WC3hjyhciDNk4sL6WPCHxcLyrJETJBfhGfCKMW MThgM8y1nmBDmN28Z5ZczC0ezShVWn0BDUQnQfidSkgcUKWK4SQH1J5mEI0bJcTe92qwVd2lSTB rfLnBheeQqacJJaGTg10qiLE= X-Received: by 127.0.0.2 with SMTP id Zj2zYY7687511xy6vhZltp4S; Wed, 31 Jan 2024 04:05:25 -0800 X-Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by mx.groups.io with SMTP id smtpd.web10.12337.1706702723632334093 for ; Wed, 31 Jan 2024 04:05:24 -0800 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwBXEnGBN7pl2bHsBw--.23008S2; Wed, 31 Jan 2024 20:05:21 +0800 (CST) X-Received: from phytium.com.cn (unknown [218.76.62.144]) by mail (Coremail) with SMTP id AQAAfwAXA2l4N7pl8_MCAA--.2280S8; Wed, 31 Jan 2024 20:05:20 +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 v5 5/7] Platform/SbsaQemu: hang if there is no cpu information Date: Wed, 31 Jan 2024 12:05:05 +0000 Message-Id: <20240131120507.2829117-6-xiongyining1480@phytium.com.cn> In-Reply-To: <20240131120507.2829117-1-xiongyining1480@phytium.com.cn> References: <20240131120507.2829117-1-xiongyining1480@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwAXA2l4N7pl8_MCAA--.2280S8 X-CM-SenderInfo: x0lr0wp1lqx0bjrumio6sk53xlxphulrpou0/1tbiAQABBmW5T2UIJQABsc X-Coremail-Antispam: 1Uk129KBjvdXoWrtr1rCFy7WF18Ar18CrW3Jrb_yoWkArc_Za nru397Gr1UXFs2kF4F9Fy3XrWrZF9Yg3W8C3Z8tr13JF1093yFgryDJa10yr1jyayF9r95 Cr4jvr1fAw4IgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrnU 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: P8JHDTcZsO5UVlcllxzOlWnJx7686176AA= 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=Ii7+EgLH; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none 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 6315cce3fb7f..923997edb2f1 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 (#114887): https://edk2.groups.io/g/devel/message/114887 Mute This Topic: https://groups.io/mt/104073376/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-