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.web11.2712.1641618754408415403 for ; Fri, 07 Jan 2022 21:12:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=eVqKBtoH; 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 2084I2ki032072 for ; Sat, 8 Jan 2022 05:12:33 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=YOSjN1s7pbHxsBzN46N22YS1gqiNh9bbn88R75wefCU=; b=eVqKBtoH4V9uBTDM137I0UFzsuGuupi0kqyps+Szg7Fc6GcFKTvkDYo9IjbS259p8r1L wkSqIgmgNDAWKgtqB9z+EnhR+ePbphG2GsfMqUkhZ/YB33UIbk1hFSlP2V3Xu92kXABX RLxQ/JhgpLciSO2nCy4LcEU9z8Bq9s/Q26x+nJIRgfzfP87N6MalE0ynP66C9PxLNhek wCrREtFc857YNMz4Jho7ut2I2iO1yjgxx3Jg4j2hJ+G1Dabs73VWxtWn2XEKi4PCTjoa vWQM1AL4nBqHBQSU12rn4IPhOg1hqkhY+Xf8s+jOwZZs/44bUm2/GTE1oDwYH8kAuAzf Eg== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df395r7r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 05:12:33 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id D222677 for ; Sat, 8 Jan 2022 05:12:32 +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 1D04C36; Sat, 8 Jan 2022 05:12:31 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 12/79] RISC-V/ProcessorPkg: RISC-V package. Date: Sat, 8 Jan 2022 12:10:32 +0800 Message-Id: <20220108041121.16005-11-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: ySiGrFGwz0l3t3jiVELuSMmrXli7c4En X-Proofpoint-GUID: ySiGrFGwz0l3t3jiVELuSMmrXli7c4En 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:Silicon/RISC-V) - Add RISC-V ProcessorPkg package which provides RISC-V processor related drivers and libraries. - Support RISC-V OpenSBI and RISC-V platforms Signed-off-by: Abner Chang Co-authored-by: Daniel Schaefer Co-authored-by: Gilbert Chen Reviewed-by: Leif Lindholm Cc: Leif Lindholm Cc: Gilbert Chen --- .../RISC-V/ProcessorPkg/RiscVProcessorPkg.dec | 47 ++++++++ .../RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc | 100 ++++++++++++++++++ .../RISC-V/ProcessorPkg/RiscVProcessorPkg.uni | 13 +++ .../ProcessorPkg/RiscVProcessorPkgExtra.uni | 13 +++ 4 files changed, 173 insertions(+) create mode 100644 Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec create mode 100644 Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc create mode 100644 Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.uni create mode 100644 Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkgExtra.uni diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec b/Silicon/RI= SC-V/ProcessorPkg/RiscVProcessorPkg.dec new file mode 100644 index 0000000000..0b64b33f0f --- /dev/null +++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec @@ -0,0 +1,47 @@ +## @file RiscVProcesssorPkg.dec=0D +# This Package provides UEFI RISC-V processor modules and libraries.=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 + DEC_SPECIFICATION =3D 0x0001001b=0D + PACKAGE_NAME =3D RiscVProcessorPkg=0D + PACKAGE_UNI_FILE =3D RiscVProcessorPkg.uni=0D + PACKAGE_GUID =3D 993C7CAC-C87C-4F08-A2CF-AD3AABA859D1= =0D + PACKAGE_VERSION =3D 1.0=0D +=0D +[Includes]=0D + Include=0D + Include/Library=0D + Library/RiscVOpensbiLib/opensbi # OpenSBI header file reference = ("include/sbi/...")=0D + Library/RiscVOpensbiLib/opensbi/include # Header file reference from ope= nsbi files, ("sbi/...")=0D +=0D +[LibraryClasses]=0D + RiscVPlatformDxeIplLib|Include/Library/RiscVPlatformDxeIpl.h=0D + RiscVCpuLib|Include/Library/RiscVCpuLib.h=0D + RiscVEdk2SbiLib|Include/Library/RiscVEdk2SbiLib.h=0D +=0D +[Guids]=0D + gUefiRiscVPkgTokenSpaceGuid =3D { 0x4261e9c8, 0x52c0, 0x4b34, { 0x85, 0= x3d, 0x48, 0x46, 0xea, 0xd3, 0xb7, 0x2c}}=0D +=0D +[PcdsFixedAtBuild]=0D + # Processor Specific Data GUID HOB GUID=0D + gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSpecificDataGuidHobGuid|{0x20, 0= x72, 0xD5, 0x2F, 0xCF, 0x3C, 0x4C, 0xBC, 0xB1, 0x65, 0x94, 0x90, 0xDC, 0xF2= , 0xFA, 0x93}|VOID*|0x00001000=0D + gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosGuidHobGuid|{0x0F, 0x34, 0= x00, 0x92, 0x04, 0x12, 0x45, 0x4A, 0x9C, 0x11, 0xB8, 0x8B, 0xDF, 0xC6, 0xFA= , 0x6F}|VOID*|0x00001001=0D + gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType4GuidHobGuid|{0x5B, 0x= 36, 0xEA, 0x23, 0x79, 0x6D, 0x4F, 0xCF, 0x9C, 0x22, 0x25, 0xC0, 0x89, 0x8C,= 0x25, 0xB9}|VOID*|0x00001002=0D + gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType7GuidHobGuid|{0xBF, 0x= B4, 0x6D, 0x1B, 0x7E, 0x10, 0x47, 0x44, 0xB8, 0xBD, 0xFF, 0x1E, 0xDD, 0xDF,= 0x71, 0x65}|VOID*|0x00001003=0D +=0D + #=0D + # 1000000000=0D + # PcdRiscVMachineTimerTickInNanoSecond =3D -----------------------------= ----------=0D + # PcdRiscVMachineTimerFrequency= InHerz=0D + #=0D + gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerTickInNanoSecond|100|UIN= T64|0x00001010=0D + gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerFrequencyInHerz|10000000= |UINT64|0x00001011=0D +=0D +[UserExtensions.TianoCore."ExtraFiles"]=0D + RiscVProcessorPkgExtra.uni=0D diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc b/Silicon/RI= SC-V/ProcessorPkg/RiscVProcessorPkg.dsc new file mode 100644 index 0000000000..5f88f5e89f --- /dev/null +++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc @@ -0,0 +1,100 @@ +#/** @file=0D +# RISC-V processor package.=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 +##########################################################################= ######=0D +#=0D +# Defines Section=0D +#=0D +##########################################################################= ######=0D +[Defines]=0D + PLATFORM_NAME =3D RiscVProcessor=0D + PLATFORM_GUID =3D 55D77916-B270-41B4-9325-2CE9DCE0926E= =0D + PLATFORM_VERSION =3D 0.1=0D + DSC_SPECIFICATION =3D 0x0001001c=0D + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME)=0D + SUPPORTED_ARCHITECTURES =3D RISCV64=0D + BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT=0D + SKUID_IDENTIFIER =3D DEFAULT=0D +=0D +[BuildOptions]=0D + GCC:RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + GCC:*_*_RISCV64_GENFW_FLAGS =3D --keepexceptiontable=0D +!endif=0D +=0D +##########################################################################= ######=0D +#=0D +# SKU Identification section - list of all SKU IDs supported by this Platf= orm.=0D +#=0D +##########################################################################= ######=0D +[SkuIds]=0D + 0|DEFAULT=0D +=0D +[LibraryClasses.common]=0D + CpuExceptionHandlerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptio= nLib/CpuExceptionHandlerDxeLib.inf=0D + RiscVCpuLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/RiscVCpuLib.= inf=0D + RiscVEdk2SbiLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/Risc= VEdk2SbiLib.inf=0D + RiscVOpensbiLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/Risc= VOpensbiLib.inf=0D + TimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/BaseRiscVTime= rLib.inf=0D + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.i= nf=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf=0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf=0D + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf=0D + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D + SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf=0D + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf=0D + CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf=0D + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf=0D + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf=0D + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf=0D + UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf=0D + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf=0D + DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDev= icePathLibDevicePathProtocol.inf=0D + RiscVPlatformTimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVPlatformT= imerLibNull/RiscVPlatformTimerLib.inf=0D + PeiServicesTablePointerLib|Silicon/RISC-V/ProcessorPkg/Library/PeiServic= esTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSbi.inf=0D +=0D +[LibraryClasses.common.PEI_CORE]=0D + PeiServicesTablePointerLib|Silicon/RISC-V/ProcessorPkg/Library/PeiServic= esTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSbi.inf=0D +=0D +[LibraryClasses.common.PEIM]=0D + PeiServicesTablePointerLib|Silicon/RISC-V/ProcessorPkg/Library/PeiServic= esTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSbi.inf=0D + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D + PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf=0D +=0D +[LibraryClasses.common.DXE_CORE]=0D + TimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/BaseRiscVTime= rLib.inf=0D +=0D +[LibraryClasses.common.DXE_DRIVER]=0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + PlatformBootManagerLib|Platform/RISC-V/PlatformPkg/Library/PlatformBootM= anagerLib/PlatformBootManagerLib.inf=0D +=0D +[LibraryClasses.common.DXE_RUNTIME_DRIVER]=0D + TimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/BaseRiscVTime= rLib.inf=0D +=0D +[LibraryClasses.common.UEFI_DRIVER]=0D + TimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/BaseRiscVTime= rLib.inf=0D +=0D +[Components]=0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/BaseRiscVTimerLib.inf= =0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptionLib/CpuExceptionHandle= rDxeLib.inf=0D + Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi/Pe= iServicesTablePointerLibOpenSbi.inf=0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/RiscVOpensbiLib.inf= =0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVPlatformTimerLibNull/RiscVPlatf= ormTimerLib.inf=0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/RiscVCpuLib.inf=0D + Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.inf= =0D +=0D + Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.inf=0D + Silicon/RISC-V/ProcessorPkg/Universal/SmbiosDxe/RiscVSmbiosDxe.inf=0D diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.uni b/Silicon/RI= SC-V/ProcessorPkg/RiscVProcessorPkg.uni new file mode 100644 index 0000000000..83da92fe40 --- /dev/null +++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.uni @@ -0,0 +1,13 @@ +// /** @file=0D +// RISC-V Processor Package Localized Strings and Content.=0D +//=0D +// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +//=0D +// SPDX-License-Identifier: BSD-2-Clause-Patent=0D +//=0D +// **/=0D +=0D +#string STR_PACKAGE_ABSTRACT #language en-US "Provides UEFI com= patible RISC-V processor modules and libraries"=0D +=0D +#string STR_PACKAGE_DESCRIPTION #language en-US "This Package prov= ides UEFI compatible RISC-V processor modules and libraries."=0D +=0D diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkgExtra.uni b/Silic= on/RISC-V/ProcessorPkg/RiscVProcessorPkgExtra.uni new file mode 100644 index 0000000000..207adfb671 --- /dev/null +++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkgExtra.uni @@ -0,0 +1,13 @@ +// /** @file=0D +// RISC-V Package Localized Strings and Content.=0D +//=0D +// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +//=0D +// SPDX-License-Identifier: BSD-2-Clause-Patent=0D +//=0D +// **/=0D +=0D +#string STR_PROPERTIES_PACKAGE_NAME=0D +#language en-US=0D +"RISC-V processor package"=0D +=0D --=20 2.31.1