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.2699.1641618775280132704 for ; Fri, 07 Jan 2022 21:12:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=NgRjGnkM; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=000704d8ca=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 ESMTP id 2084I2kk032072 for ; Sat, 8 Jan 2022 05:12:54 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=iNcYq7gbEh/uZFPtliB4YyBWVcFZyAitPyU9I7agVTc=; b=NgRjGnkM3rsTojrDqyjHTP5Hu6RY/lzjc/nZAXPjtudTDLdGWjlhn1RRBgRlFKgTmL0h OgryEKd+8RzPUZW9ImfHhj39AM5flQwxj7CgpH7h4luUFosBY2YMokkcUI7XY8uKTLUd +GiAk/7Xy511ozWrClwuuoFHWMVQFL21/ZVWzAPhy+wUUvQh56V1X8G41zBon64JJQZI GxogPMj4F5BqHuTbsNMxUlxDZlbSMTowRKyvQwY+I1KbdMtZqHmSP1v3ywT7lvKqZw5A xDfHrpkZL+DtZXTz11LiT+VtZ8/YWQLxUdj9zLuorCXOYd4IKcNXRXADEjjHkThvQHqE CQ== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df395r7sd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 05:12:54 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id ABC1465 for ; Sat, 8 Jan 2022 05:12:53 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id F359637; Sat, 8 Jan 2022 05:12:52 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 32/79] Silicon/RISC-V: PeiServiceTableLib uses RiscVFirmwareContextLib Date: Sat, 8 Jan 2022 12:10:52 +0800 Message-Id: <20220108041121.16005-31-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220108041121.16005-1-abner.chang@hpe.com> References: <20220108041121.16005-1-abner.chang@hpe.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ng97DUO1W6fKS4J9S6aULK-HtBLFnItL X-Proofpoint-GUID: ng97DUO1W6fKS4J9S6aULK-HtBLFnItL X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-08_01,2022-01-07_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 mlxlogscore=937 adultscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201080036 Content-Transfer-Encoding: quoted-printable (This is migrated from edk2-platforms:Silicon) Use RISC-V FirmwareContext library to set and get the pointer of PeiService. Cc: Sunil V L Cc: Daniel Schaefer Reviewed-by: Daniel Schaefer Signed-off-by: Abner Chang --- .../PeiServicesTablePointerLibOpenSbi.inf | 4 ++-- .../PeiServicesTablePointerOpenSbi.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLib= OpenSbi/PeiServicesTablePointerLibOpenSbi.inf b/Silicon/RISC-V/ProcessorPkg= /Library/PeiServicesTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSb= i.inf index f23272016b..fa9fe78518 100644 --- a/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi= /PeiServicesTablePointerLibOpenSbi.inf +++ b/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi= /PeiServicesTablePointerLibOpenSbi.inf @@ -4,7 +4,7 @@ # PEI Services Table Pointer Library implementation that retrieves a poin= ter to the=0D # PEI Services Table from a RISC-V OpenSBI sbi_platform firmware context = structure.=0D #=0D -# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -35,5 +35,5 @@ [LibraryClasses]=0D DebugLib=0D RiscVCpuLib=0D - RiscVEdk2SbiLib=0D + RiscVFirmwareContextLib=0D =0D diff --git a/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLib= OpenSbi/PeiServicesTablePointerOpenSbi.c b/Silicon/RISC-V/ProcessorPkg/Libr= ary/PeiServicesTablePointerLibOpenSbi/PeiServicesTablePointerOpenSbi.c index 0c1473e932..9aa74b4f9f 100644 --- a/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi= /PeiServicesTablePointerOpenSbi.c +++ b/Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi= /PeiServicesTablePointerOpenSbi.c @@ -1,7 +1,7 @@ /** @file=0D PEI Services Table Pointer Library.=0D =0D - Copyright (c) 2019 - 2020, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=0D + Copyright (c) 2019 - 2021, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D **/=0D @@ -9,7 +9,7 @@ #include =0D #include =0D #include =0D -#include =0D +#include =0D #include =0D #include =0D #include =0D @@ -32,8 +32,8 @@ SetPeiServicesTablePointer ( )=0D {=0D EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext;=0D - SbiGetFirmwareContext (&FirmwareContext);=0D =0D + GetFirmwareContextPointer (&FirmwareContext);=0D FirmwareContext->PeiServiceTable =3D (VOID *)(UINTN)PeiServicesTablePoin= ter;=0D =0D DEBUG ((DEBUG_INFO, "Set PEI Service 0x%x at OpenSBI Firmware Context at= 0x%x\n",=0D @@ -61,8 +61,8 @@ GetPeiServicesTablePointer ( )=0D {=0D EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext;=0D - SbiGetFirmwareContext (&FirmwareContext);=0D =0D + GetFirmwareContextPointer (&FirmwareContext);=0D return (CONST EFI_PEI_SERVICES **)FirmwareContext->PeiServiceTable;=0D }=0D =0D --=20 2.31.1