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.web09.2660.1641618755185802573 for ; Fri, 07 Jan 2022 21:12:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=NlPF8ayn; 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 208455SD007180 for ; Sat, 8 Jan 2022 05:12: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=YMC6ivr//pcV/b0kZIVvhAa9doo1t+motp3O8K/flX0=; b=NlPF8aynuYQA/v5mc2gTs51sF3wAYyB/d15ZRdbzqUx+6eilZHwQOeKzViCnZGbnh0ij 6X9pMYjeK95F9G35fSsxlnXnze5+y+G1lNem4ailwKyD4UbLuaf0+k+SP8l+3bMXnjB9 t0cHL/4ZRWQGXwAXKqAVB6YMOjaQXR1dz3WJrXMKF2KJfg1+ugMzmvyrvBrZryv/6H1k LU0l4TcPV8dIzulBh1d4f0ylke1/AIQUgIUEr5TeGmDJRqT4aDgImJU9M2LECgtQQSMt rZwifSf+t2qhYzcoGVLp/TqlPs158eK7Sa4+9+uQDEhI/Iv8v6MYKA8UQoLQ/khErZim zg== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df395r7r6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 05:12:34 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id D474B65 for ; Sat, 8 Jan 2022 05:12:33 +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 2896736; Sat, 8 Jan 2022 05:12:32 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 13/79] PlatformPkg/Library: RISC-V Platform Temporary Memory library Date: Sat, 8 Jan 2022 12:10:33 +0800 Message-Id: <20220108041121.16005-12-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: CtChAiulbnlApppwp4vf9NH31M_tqcXk X-Proofpoint-GUID: CtChAiulbnlApppwp4vf9NH31M_tqcXk 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=999 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:Platform/RISC-V) NULL instance of RISC-V Platform Temporary Memory library. Signed-off-by: Abner Chang Co-authored-by: Gilbert Chen Reviewed-by: Leif Lindholm Cc: Leif Lindholm Cc: Gilbert Chen --- .../RiscVPlatformTempMemoryInitLibNull.inf | 38 +++++++++++++++++++ .../Library/RiscVPlatformTempMemoryInitLib.h | 17 +++++++++ .../Riscv64/TempMemInit.S | 26 +++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMe= moryInitLibNull/RiscVPlatformTempMemoryInitLibNull.inf create mode 100644 Platform/RISC-V/PlatformPkg/Include/Library/RiscVPlatfo= rmTempMemoryInitLib.h create mode 100644 Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMe= moryInitLibNull/Riscv64/TempMemInit.S diff --git a/Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryIni= tLibNull/RiscVPlatformTempMemoryInitLibNull.inf b/Platform/RISC-V/PlatformP= kg/Library/RiscVPlatformTempMemoryInitLibNull/RiscVPlatformTempMemoryInitLi= bNull.inf new file mode 100644 index 0000000000..1634a05f58 --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryInitLibNul= l/RiscVPlatformTempMemoryInitLibNull.inf @@ -0,0 +1,38 @@ +## @file=0D +# RISC-V platform temporary memory library.=0D +#=0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x0001001b=0D + BASE_NAME =3D RiscVPlatformTempMemoryInitLibNull=0D + FILE_GUID =3D 67294857-C0F8-4ACB-8237-D91FE506B710= =0D + MODULE_TYPE =3D SEC=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D RiscVPlatformTempMemoryInitLib=0D +=0D +#=0D +# The following information is for reference only and not required by the = build tools.=0D +#=0D +# VALID_ARCHITECTURES =3D RISCV64=0D +#=0D +=0D +[Sources]=0D +=0D +[Sources.RISCV64]=0D + Riscv64/TempMemInit.S=0D +=0D +[Pcd]=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdTemporaryRamBase=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdTemporaryRamSize=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D + MdeModulePkg/MdeModulePkg.dec=0D + Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec=0D +=0D +=0D diff --git a/Platform/RISC-V/PlatformPkg/Include/Library/RiscVPlatformTempM= emoryInitLib.h b/Platform/RISC-V/PlatformPkg/Include/Library/RiscVPlatformT= empMemoryInitLib.h new file mode 100644 index 0000000000..4f9f7950c1 --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Include/Library/RiscVPlatformTempMemoryIn= itLib.h @@ -0,0 +1,17 @@ +/** @file=0D + RISC-V package definitions.=0D +=0D + Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +**/=0D +=0D +#ifndef RISCV_PLATFORM_TEMP_MEM_LIB_H_=0D +#define RISCV_PLATFORM_TEMP_MEM_LIB_H_=0D +=0D +#include "RiscVImpl.h"=0D +=0D +VOID EFIAPI RiscVPlatformTemporaryMemInit (VOID);=0D +UINT32 EFIAPI RiscVPlatformTemporaryMemSize (VOID);=0D +UINT32 EFIAPI RiscVPlatformTemporaryMemBase (VOID);=0D +#endif=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryIni= tLibNull/Riscv64/TempMemInit.S b/Platform/RISC-V/PlatformPkg/Library/RiscVP= latformTempMemoryInitLibNull/Riscv64/TempMemInit.S new file mode 100644 index 0000000000..c8fb43c604 --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryInitLibNul= l/Riscv64/TempMemInit.S @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------= ------=0D +//=0D +// RISC-V RiscVPlatformTemporaryMemInit.=0D +//=0D +// Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. A= ll rights reserved.
=0D +//=0D +// SPDX-License-Identifier: BSD-2-Clause-Patent=0D +//=0D +//------------------------------------------------------------------------= ------=0D +#include =0D +=0D +.data=0D +=0D +.text=0D +.align 3=0D +=0D +.global ASM_PFX(RiscVPlatformTemporaryMemInit)=0D +=0D +//=0D +// @retval a0 Temporary memory base.=0D +// a1 Temporary memory size.=0D +//=0D +ASM_PFX(RiscVPlatformTemporaryMemInit):=0D + li a0, FixedPcdGet32 (PcdTemporaryRamBase)=0D + li a1, FixedPcdGet32 (PcdTemporaryRamSize)=0D + ret=0D --=20 2.31.1