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.web10.2661.1641618757482579402 for ; Fri, 07 Jan 2022 21:12:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=jGHWkLMG; 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 (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2082C5dE024444 for ; Sat, 8 Jan 2022 05:12:36 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=LgnyIVvzFd+cSCDQkGFVM26eCorCdjywRlzyB/hH0ZQ=; b=jGHWkLMGzfnkUeocekYx/+FvZwijWHtHx/I5JiZqDCLfy7E/8EegUIN/70it+S5tcJeD yY4TRaQfQhti7QDX/r5yWAQZdiWFh+zvldAt+Db2w5V02bknrGCFmZduaB4TdecEjrV4 +i0OLDvfmj/NmfNpeGYG6yHnpeguR1bpDB6v1HV9WvCk0zVEMk2mP/b03JymYZhJ7Ask 31oPq7ZBnMrOhhj8lEavoP0SK7DsET54cyRVADBcB1XleaG/mPMhRgmjtcg5t8Y2oEAD EG45Upyzd/0KedAfBq6HrgBu486ZkFCgNpXExg+KarranM2OwPD3pHr2hAFT2AsCw2k6 1w== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df1kq0mjd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 05:12:36 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id EA77D62 for ; Sat, 8 Jan 2022 05:12:35 +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 3E87E36; Sat, 8 Jan 2022 05:12:35 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 15/79] PlatformPkg/Library: NULL instance of RiscVOpensbiPlatformLib Date: Sat, 8 Jan 2022 12:10:35 +0800 Message-Id: <20220108041121.16005-14-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: jWYWvZ4EL060DRC0BLoB2mVjEavlnV2_ X-Proofpoint-GUID: jWYWvZ4EL060DRC0BLoB2mVjEavlnV2_ 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 priorityscore=1501 mlxlogscore=999 clxscore=1015 bulkscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxscore=0 impostorscore=0 spamscore=0 adultscore=0 lowpriorityscore=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 RiscVOpensbiPlatformLib. Signed-off-by: Abner Chang Co-authored-by: Gilbert Chen Reviewed-by: Leif Lindholm Cc: Leif Lindholm Cc: Gilbert Chen --- .../OpensbiPlatformLibNull.inf | 38 ++++++++++++++++ .../Library/OpensbiPlatformLibNull/Platform.c | 44 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibN= ull/OpensbiPlatformLibNull.inf create mode 100644 Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibN= ull/Platform.c diff --git a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Ope= nsbiPlatformLibNull.inf b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatfo= rmLibNull/OpensbiPlatformLibNull.inf new file mode 100644 index 0000000000..125a1220bc --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/OpensbiPla= tformLibNull.inf @@ -0,0 +1,38 @@ +## @file=0D +# RISC-V OpenSbi Platform NULL Library=0D +#=0D +# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x0001001b=0D + BASE_NAME =3D RiscVOpensbiPlatformLibNull=0D + FILE_GUID =3D 9424ED54-EBDA-4FB5-8FF6-8291B07BB151= =0D + MODULE_TYPE =3D SEC=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D RiscVOpensbiPlatformLib=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 + Platform.c=0D +=0D +[Packages]=0D + MdeModulePkg/MdeModulePkg.dec=0D + MdePkg/MdePkg.dec=0D + Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec=0D +=0D +[LibraryClasses]=0D + BaseLib=0D + BaseMemoryLib=0D + DebugLib=0D + DebugAgentLib=0D +=0D +=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Pla= tform.c b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platfo= rm.c new file mode 100644 index 0000000000..e78d811f4c --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c @@ -0,0 +1,44 @@ +/*=0D + *=0D + * Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D + *=0D + * SPDX-License-Identifier: BSD-2-Clause=0D + *=0D + * Copyright (c) 2019 Western Digital Corporation or its affiliates.=0D + *=0D + * Authors:=0D + * Atish Patra =0D + */=0D +=0D +#include =0D +#include =0D +=0D +const struct sbi_platform_operations platform_ops =3D {=0D + .pmp_region_count =3D NULL,=0D + .pmp_region_info =3D NULL,=0D + .final_init =3D NULL,=0D + .console_putc =3D NULL,=0D + .console_getc =3D NULL,=0D + .console_init =3D NULL,=0D + .irqchip_init =3D NULL,=0D + .ipi_send =3D NULL,=0D + .ipi_clear =3D NULL,=0D + .ipi_init =3D NULL,=0D + .timer_value =3D NULL,=0D + .timer_event_stop =3D NULL,=0D + .timer_event_start =3D NULL,=0D + .timer_init =3D NULL,=0D + .system_reboot =3D NULL,=0D + .system_shutdown =3D NULL=0D +};=0D +=0D +const struct sbi_platform platform =3D {=0D + .opensbi_version =3D OPENSBI_VERSION, // The O= penSBI version this platform table is built bassed on.=0D + .platform_version =3D SBI_PLATFORM_VERSION(0x0000, 0x0000), // SBI P= latform version 1.0=0D + .name =3D "NULL platform",=0D + .features =3D 0,=0D + .hart_count =3D 0,=0D + .hart_stack_size =3D 0,=0D + .disabled_hart_mask =3D 0,=0D + .platform_ops_addr =3D 0=0D +};=0D --=20 2.31.1