From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.17944.1636948561506932040 for ; Sun, 14 Nov 2021 19:56:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=YhUliLYq; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0953f1bc5c=abner.chang@hpe.com) Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AF1n218025340; Mon, 15 Nov 2021 03:56:00 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=baVKYVPKAw93BCqkS3nBY6ckeCsOhJqktcSPZWysXhY=; b=YhUliLYqUmzpnVYhcOjlVfzoz8qppFIXRllU+NTCL62NZ9DVQYpXMu3vDfl2vNSk7fjB /C7VaqRxJUx5tvHZNivE0IRQUgdfS/9XkVL0zhK9GoiwnSNQIy0vgTl2FjQjy/RW52AB 04AkR/W3nw488T8d/HTXnlY3yAmGOkjYTn8TlnNG3LZkVudxiGYOY/lpEzvFRtyPmHZd kAIAaiDCAQQDOAypuernOiqpYcI3XP+s2r8uBCXy7+83VLXJok5knZIa1aQZuJ7bAtri Lqk30N8sxlK5EGiN/xL9B8pnmPOyCPLNxqZ89RPyt/cJhL84xDNjSpaX6gAk/iKuLyjD mw== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0a-002e3701.pphosted.com with ESMTP id 3cbe7bgk1b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Nov 2021 03:56:00 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 0954A63; Mon, 15 Nov 2021 03:56:00 +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 EDC0439; Mon, 15 Nov 2021 03:55:58 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Daniel Schaefer , Sunil V L Subject: [edk2-platforms][PATCH 12/14] RiscVPlatformPkg/U500: Add device tree to build Date: Mon, 15 Nov 2021 10:56:38 +0800 Message-Id: <20211115025640.12897-13-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211115025640.12897-1-abner.chang@hpe.com> References: <20211115025640.12897-1-abner.chang@hpe.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: OOUrgieyC7R1MfMbuAWKyTz90dBri5YX X-Proofpoint-GUID: OOUrgieyC7R1MfMbuAWKyTz90dBri5YX 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.0.607.475 definitions=2021-11-15_02,2021-11-12_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=883 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111150021 Content-Transfer-Encoding: quoted-printable Signed-off-by: Abner Chang Cc: Daniel Schaefer Cc: Sunil V L --- .../FreedomU500VC707Board/U500.dsc | 2 ++ .../FreedomU500VC707Board/U500.fdf | 6 ++++ .../FreedomU500VC707Board/DeviceTree.fdf.inc | 33 +++++++++++++++++++ .../FreedomU500VC707Board/U500.fdf.inc | 8 ++++- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/Devic= eTree.fdf.inc diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc b/P= latform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc index 9faa68fd6d..318851332a 100644 --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc @@ -503,6 +503,8 @@ MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.in= f=0D MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D =0D + Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/DeviceTree/U500DeviceT= ree.inf=0D +=0D #=0D # SMBIOS Support=0D #=0D diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf b/P= latform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf index cf9b673e97..4ce192799f 100644 --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf @@ -33,6 +33,7 @@ gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDxeFvBase|gUe= fiRiscVPlatformPkgToken FV =3D FVMAIN_COMPACT=0D =0D !include VarStore.fdf.inc=0D +!include DeviceTree.fdf.inc=0D =0D ##########################################################################= ######=0D =0D @@ -327,3 +328,8 @@ FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { RAW ACPI |.acpi=0D RAW ASL |.aml=0D }=0D +=0D +[Rule.Common.USER_DEFINED.DTB]=0D + FILE FREEFORM =3D $(NAMED_GUID) {=0D + RAW BIN |.dtb=0D + }=0D diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/DeviceTree.f= df.inc b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/DeviceTree.fdf.i= nc new file mode 100644 index 0000000000..5ddaa6b8f2 --- /dev/null +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/DeviceTree.fdf.inc @@ -0,0 +1,33 @@ +## @file=0D +# FDF include file with Layout Regions that define an empty variable stor= e.=0D +#=0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +$(DTB_OFFSET)|$(DTB_SIZE)=0D +gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDtbFvBase|gUefiRiscVPlatformPk= gTokenSpaceGuid.PcdRiscVDtbFvSize=0D +FV =3D DTBFV=0D +=0D +[FV.DTBFV]=0D +BlockSize =3D 0x1000=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +=0D +INF RuleOverride =3D DTB Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board= /DeviceTree/U500DeviceTree.inf=0D diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf.inc= b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf.inc index 3b40f5486c..d7da76f4d3 100644 --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf.inc +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf.inc @@ -54,10 +54,16 @@ DEFINE VARS_FTW_WORKING_SIZE =3D 0x00001000 DEFINE VARS_FTW_SPARE_OFFSET =3D 0x00808000=0D DEFINE VARS_FTW_SPARE_SIZE =3D 0x00018000=0D =0D +#=0D +# Device Tree memory region=0D +#=0D +DEFINE DTB_OFFSET =3D 0x00840000=0D +DEFINE DTB_SIZE =3D 0x00002000=0D +=0D #=0D # Scratch area memory region=0D #=0D -DEFINE SCRATCH_OFFSET =3D 0x00840000=0D +DEFINE SCRATCH_OFFSET =3D 0x00880000=0D DEFINE SCRATCH_SIZE =3D 0x00010000=0D =0D DEFINE FW_DOMAIN_SIZE =3D $(FVMAIN_OFFSET) + $(FVMAIN_SIZE) - $(PEIFV_O= FFSET)=0D --=20 2.31.1