From nobody Mon Feb 9 02:28:26 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+82324+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+82324+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1634634516; cv=none; d=zohomail.com; s=zohoarc; b=ls2gN+CiSSBSmiUFWkqzD9+LpumF4C92RXsTzeHlcO+TSVe3LMHQBoekWaDPnFopgHjEI0riBKA3hRNeHS6/8naHt841l+NIWr+1Nm/+IQMZFbd38CwpPCrZBb4XybJyM/XqlSUewSv5CCWa6+H5Niq/MxmMbSAqY+GP343wLVg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634634516; 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=sgHKqMkQ3tO9qP6gXULW6109QN8BKQCabxDHRj1sxNQ=; b=DDOdyEa/z83pceZW3ElvybFufOgsSBYiKhtPehU7PCp7NRv5xeCy/p5wENW6rld3LPoVMVyZUSrn2QPOJ1UAg+2Abq5PmwTSJgzHH6TyPp2pMBVgaNifrIhdFCSu1EZS+jszlc8Szt7LqP4qwTF0pAz1LzoW4YGyDrAH6VxTy/c= 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+82324+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 1634634516833935.0122766271668; Tue, 19 Oct 2021 02:08:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fRofYY1788612x8YNuMDkiHF; Tue, 19 Oct 2021 02:08:36 -0700 X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web12.7279.1634634514755820028 for ; Tue, 19 Oct 2021 02:08:35 -0700 X-Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J91tms003260; Tue, 19 Oct 2021 09:08:34 GMT X-Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bsu140275-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 09:08:33 +0000 X-Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3427.houston.hpe.com (Postfix) with ESMTP id 2A1137B; Tue, 19 Oct 2021 09:08:33 +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 1B40451; Tue, 19 Oct 2021 09:08:31 +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 15/30] RiscVPlatformPkg/OpensbiPlatformLib: Remove platform code Date: Tue, 19 Oct 2021 16:09:52 +0800 Message-Id: <20211019081007.31165-16-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: JubhAc_GS0cE6tx1NchLcKn9e5nExm_Y X-Proofpoint-ORIG-GUID: JubhAc_GS0cE6tx1NchLcKn9e5nExm_Y 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: FihQvZQ1gxUNNQoI5zRxQRjKx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634634516; bh=SrWluJgwy/+snakhnUg1Uxc4jtLE9XDdG1i3A/pt+Vw=; h=Cc:Date:From:Reply-To:Subject:To; b=qdgOPAwDz1BzcdSxeq6fJhfBBl8dfXH0b/xw8ZOI1ejfpx7pDuBzYe2gGqlXRphbjDH RdnV5YpMRu3OcEU9QoAsy0OUicZbFYmqCGK0CG8YV6cj0MKzcNQ0XHknUKTJ42/T0b1/Z UP5tJjNc5q5+M4/9XFUo2fh8mxZ3pqvX0UM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634634518298100003 Content-Type: text/plain; charset="utf-8" Remove platform code from generic OpensbiPlatfomLib. Cc: Sunil V L Cc: Daniel Schaefer Signed-off-by: Abner Chang --- .../Library/OpensbiPlatformLib/Platform.c | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLib/Platfor= m.c b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLib/Platform.c index 06cd1a299f..b477b81d74 100644 --- a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLib/Platform.c +++ b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLib/Platform.c @@ -270,24 +270,13 @@ const struct sbi_platform_operations platform_ops =3D= { .timer_exit =3D fdt_timer_exit, }; =20 -#if FixedPcdGet32(PcdBootableHartNumber) =3D=3D 4 -#define U540_BOOTABLE_HART_COUNT FixedPcdGet32(PcdBootableHartNumber) -static u32 U540_hart_index2id[U540_BOOTABLE_HART_COUNT] =3D {1, 2, 3, 4}; -#endif - struct sbi_platform platform =3D { - .opensbi_version =3D OPENSBI_VERSION, - .platform_version =3D SBI_PLATFORM_VERSION(0x0, 0x01), - .name =3D "Generic", - .features =3D SBI_PLATFORM_DEFAULT_FEATURES, - .hart_count =3D SBI_HARTMASK_MAX_BITS, -// TODO: Workaround for U540. Not sure why we need this. OpenSBI doesn't n= eed it. -#if FixedPcdGet32(PcdBootableHartNumber) =3D=3D 4 - .hart_index2id =3D U540_hart_index2id, -#else - .hart_index2id =3D generic_hart_index2id, -#endif - // TODO: Any reason why it shouldn't just be SBI_PLATFORM_DEFAULT_HART_S= TACK_SIZE? - .hart_stack_size =3D FixedPcdGet32(PcdOpenSbiStackSize), + .opensbi_version =3D OPENSBI_VERSION, + .platform_version =3D SBI_PLATFORM_VERSION(0x0, 0x01), + .name =3D "Generic", + .features =3D SBI_PLATFORM_DEFAULT_FEATURES, + .hart_count =3D SBI_HARTMASK_MAX_BITS, + .hart_index2id =3D generic_hart_index2id, + .hart_stack_size =3D FixedPcdGet32(PcdOpenSbiStackSize), // The stack= given by SEC for each hart .platform_ops_addr =3D (unsigned long)&platform_ops }; --=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 (#82324): https://edk2.groups.io/g/devel/message/82324 Mute This Topic: https://groups.io/mt/86435676/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-