From nobody Mon Feb 9 03:13:25 2026 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+82332+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+82332+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1634634526; cv=none; d=zohomail.com; s=zohoarc; b=erzo1YtdhKC2ZcKLC7Xt3HlaW/Mjx6JklR22PGsf1vl/EKVhdLe6YPF5OKdLbu/jcZjWtnqb0B6nlNWcj/UO9zoZsOudV6jCCc5WcRFcFj/KowOGyjq7dYR9Kx3Ohdf+LqZwvrVRd87cHg6J8I5eK0dyFpHG+KtaHwPGHAhFEdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634634526; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=O0ZWdXfAcBTXCIcMJk6c51Nh6QzJ3uiQK00hoveqDHQ=; b=NK0sMmsi2sER2Tn1pJwfLPtGsTMd+jfve4uggMSb438zVKJWUbyJ/H7tP3tOfqtjko0UYibikJAuT2K7W+W/maToYv5j6ssueXbgOwx0kOoLVxABk9E8dDfq052eNvVcUoVAnfhK+T/rY2FJUeGkZj9W2bEI0CJG/fEIEe7e2uE= 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+82332+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 1634634526205240.7211068258996; Tue, 19 Oct 2021 02:08:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id u3mKYY1788612xtdQffzX5YZ; Tue, 19 Oct 2021 02:08:45 -0700 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.7310.1634634523022490278 for ; Tue, 19 Oct 2021 02:08:44 -0700 X-Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19ILhNO1008060; Tue, 19 Oct 2021 09:08:42 GMT X-Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0a-002e3701.pphosted.com with ESMTP id 3bs9b3qryg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 09:08:42 +0000 X-Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5008.houston.hpe.com (Postfix) with ESMTP id A41264F; Tue, 19 Oct 2021 09:08:41 +0000 (UTC) X-Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 9470D48; Tue, 19 Oct 2021 09:08:40 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Sunil V L , Daniel Schaefer Subject: [edk2-devel] [edk2-platforms][PATCH 21/30] RiscVPlatformPkg/Sec: Check Cold/Warm hart Date: Tue, 19 Oct 2021 16:09:58 +0800 Message-Id: <20211019081007.31165-22-abner.chang@hpe.com> In-Reply-To: <20211019081007.31165-1-abner.chang@hpe.com> References: <20211019081007.31165-1-abner.chang@hpe.com> MIME-Version: 1.0 X-Proofpoint-GUID: elPg4Nonfmk7uXOWBGUrulK0ksiXWKId X-Proofpoint-ORIG-GUID: elPg4Nonfmk7uXOWBGUrulK0ksiXWKId X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: 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,abner.chang@hpe.com X-Gm-Message-State: sDLMZTSWkwXjrnvA4lScAF9Tx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634634525; bh=upkc3ujYq2xDQpoJ73W0bxNzgbIaEKgi75K92WF8VJg=; h=Cc:Date:From:Reply-To:Subject:To; b=paI42oat3rhwqMA+uX3CjnSUr95usC13bThzWHIL/20ZCyxIToIBfVAZp8nOX1L6nsG 3IxPENf6mwAs8CB+mZ0GP40elWi0jSumOCkTl1zElvBMH9v8Myqgq9rkZIYAlDRxrEYBh DY/cpVJPZWhaOwDDamJLCYj0HwadUnSfyBQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634634527193100004 Content-Type: text/plain; charset="utf-8" Check Coldboot or Warmboot hart in SEC OpenSBI platform function. Cc: Sunil V L Cc: Daniel Schaefer Signed-off-by: Abner Chang --- .../RISC-V/PlatformPkg/Universal/Sec/SecMain.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c b/Platform= /RISC-V/PlatformPkg/Universal/Sec/SecMain.c index 51d9edfe75..9b162fb3b6 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c @@ -398,6 +398,13 @@ SecPostOpenSbiPlatformEarlylInit( IN BOOLEAN ColdBoot ) { + UINT32 HartId; + + if (!ColdBoot) { + HartId =3D current_hartid(); + DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId)); + return 0; + } // // Boot HART is already in the process of OpenSBI initialization. // We can let other HART to keep booting. @@ -423,6 +430,12 @@ SecPostOpenSbiPlatformFinalInit ( struct sbi_platform *SbiPlatform; EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext; =20 + if (!ColdBoot) { + HartId =3D current_hartid(); + DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId)); + return 0; + } + DEBUG((DEBUG_INFO, "%a: Entry, preparing to jump to PEI Core\n\n", __FUN= CTION__)); =20 SbiScratch =3D sbi_scratch_thishart_ptr(); @@ -777,7 +790,7 @@ VOID EFIAPI SecCoreStartUpWithStack( sbi_init(Scratch); } =20 -void xxxx (char *debugstr, ...) +void OpensbiDebugPrint (char *debugstr, ...) { VA_LIST Marker; =20 --=20 2.31.1 -=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 (#82332): https://edk2.groups.io/g/devel/message/82332 Mute This Topic: https://groups.io/mt/86435685/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-