From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=lu6QEEXF; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0926d272d9=abner.chang@hpe.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=NVw3sqsOKlWxcFGDgf/OehXqKV1XXEadyb0d37gRdDU=; b=lu6QEEXFZ3uF8wGmqKCpb7iSH/8wzumtyWQZeKc/HbjF+i8iCRrmIcQJgJxoFNhVjtJm Rk3lvYv2/Bszah4PUVTK06NZ3e0IJRqFC66w+GZdLqpbHE1FdsWiopa+NDY+WLANZpdP Eoza1yrHa6LhuHseQVPaUHiGci2DNav2q/leC8SH2VeYi9OiCYs/7zmhG36yJbhdxdMg aB+T5Zw8ZFC27uftldFgwIBugb4H8Ol9scEbAOyv4E5XAJq5KXIvGdt7BD8zwb43iTpe NmfRd3MtuFkUlfvkidoqH6o0heI89jM7kWaGsWQ1etTGFHsz6hQHQzoo6kEcgm/xJktr /g== 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 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) 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-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> X-Mailer: git-send-email 2.31.1 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 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_07,2021-10-18_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190056 Content-Transfer-Encoding: quoted-printable 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,=0D };=0D =0D -#if FixedPcdGet32(PcdBootableHartNumber) =3D=3D 4=0D -#define U540_BOOTABLE_HART_COUNT FixedPcdGet32(PcdBootableHartNumber)=0D -static u32 U540_hart_index2id[U540_BOOTABLE_HART_COUNT] =3D {1, 2, 3, 4};= =0D -#endif=0D -=0D struct sbi_platform platform =3D {=0D - .opensbi_version =3D OPENSBI_VERSION,=0D - .platform_version =3D SBI_PLATFORM_VERSION(0x0, 0x01),=0D - .name =3D "Generic",=0D - .features =3D SBI_PLATFORM_DEFAULT_FEATURES,=0D - .hart_count =3D SBI_HARTMASK_MAX_BITS,=0D -// TODO: Workaround for U540. Not sure why we need this. OpenSBI doesn't n= eed it.=0D -#if FixedPcdGet32(PcdBootableHartNumber) =3D=3D 4=0D - .hart_index2id =3D U540_hart_index2id,=0D -#else=0D - .hart_index2id =3D generic_hart_index2id,=0D -#endif=0D - // TODO: Any reason why it shouldn't just be SBI_PLATFORM_DEFAULT_HART_S= TACK_SIZE?=0D - .hart_stack_size =3D FixedPcdGet32(PcdOpenSbiStackSize),=0D + .opensbi_version =3D OPENSBI_VERSION,=0D + .platform_version =3D SBI_PLATFORM_VERSION(0x0, 0x01),=0D + .name =3D "Generic",=0D + .features =3D SBI_PLATFORM_DEFAULT_FEATURES,=0D + .hart_count =3D SBI_HARTMASK_MAX_BITS,=0D + .hart_index2id =3D generic_hart_index2id,=0D + .hart_stack_size =3D FixedPcdGet32(PcdOpenSbiStackSize), // The stack= given by SEC for each hart=0D .platform_ops_addr =3D (unsigned long)&platform_ops=0D };=0D --=20 2.31.1