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.10797.1633521468859522361 for ; Wed, 06 Oct 2021 04:57:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=caTJb8IF; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0913d10296=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 196AfvSS015813; Wed, 6 Oct 2021 11:57:48 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 : content-transfer-encoding : content-type : mime-version; s=pps0720; bh=3Y4bEj8VgxLHz7/0J0ql2+oYwVBAIM9atyaiAeKRFX8=; b=caTJb8IFu4aX6qTGyALlKofFPEYvbZiRmEN7h8BE5AEbrBCHwUQwqNiryZhlj1VBGk6x H6QB7qBp5PxppDGwGZ02sOV0/NqUboEsj4dkdMbEdZPVA+HOsLm1Lr8f4c5l4gp2hlRp jIwiYTGS9IogOBS90DAKgc08j6fySGIhjHlN64ba8ZK0tQRPNw95ln/dC/FLAcd8yvJh LzFw8LHTd8XlfkrJZDciVQiXrUVxOiC8o5c7ozAW3Bod3vPPkX7nielop9GbKNJYBL9B K2gMmdP/Ss7HhtpA0Urhzp9hr576zI3Vr26D8YeJmUniXqSSHRYyDXU9CxDWOdzOgaYJ HA== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bgs19gw7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Oct 2021 11:57:48 +0000 Received: from G9W8456.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.161.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 6DD8866; Wed, 6 Oct 2021 11:57:47 +0000 (UTC) Received: from G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) by G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 6 Oct 2021 11:57:47 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.241.52.10) by G9W8455.americas.hpqcorp.net (16.216.161.94) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Wed, 6 Oct 2021 11:57:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lsBUxK16b5wog/Azbcs5Ja4Lrb7gy5Sz0mRoOkXIPE72TxMkUnAWF1BTYbqHi0jAtAkJVYHIpBFSybUoY2CEUFczcrTCjoxcLrKyTStP6YM7AeFG8zYIoTK558J6gAQ7TfX5Vf/dfMXUcOiHYsJB1rMwqawXsI0XtTr/Kjl8FFyddfBb8xFz1A4Fa0bLuDR9amffBImZu7xXfEltz1qMb181Q4hMfzPs9YKUeQumw7GKPoW9/WObPQvZskl+A1oLpvhOa7Z5vxuVMzTn2M2K99OJa3c/n1+szaL7SDjY7VWAcdpPRZPkheWcpNWAlXiVIuZfGTROx/UKAaJOqA38fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3Y4bEj8VgxLHz7/0J0ql2+oYwVBAIM9atyaiAeKRFX8=; b=h/oxCvKRn/+J0KPW4vpQ7sc/KjdtjbbB4AGwpuP9yw6SVGVsEryKKvyf7sHGI20rEeJ5m5NszM+v44CththXGVO/altfdZZXwojtmTiRnXGsCMdkoVB3+LsBZ7ysjQydFxO4WUTfnyUPBrwf1nsNobHHOWDzpW6ZLQBY7P+sVzlY1zRsFBEUdkSBkmpFpxOETuC1w1mt3hNuWHXFVhZhCWB/XXe1JDls8aaqBy1kmW7Kb72dUQSBpmHGrm1NIBeppG2iHeH93s3LDRaLFEyYSQrhbuX6NNwZt4/kUawct6ZbDKCdBnkmLyaCwO4ifAkBt+81zOE36tX/WuexmJmWrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) by DF4PR8401MB1034.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7613::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Wed, 6 Oct 2021 11:57:45 +0000 Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469]) by DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469%3]) with mapi id 15.20.4566.023; Wed, 6 Oct 2021 11:57:45 +0000 From: "Daniel Schaefer" To: CC: Abner Chang , Sunil V L Subject: [edk2-platforms][PATCH v2 08/14] RISC-V/PlatformPkg: Build DeviceTree and use that in SEC Date: Wed, 6 Oct 2021 19:56:46 +0800 Message-ID: <20211006115652.3635489-9-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006115652.3635489-1-daniel.schaefer@hpe.com> References: <20211006115652.3635489-1-daniel.schaefer@hpe.com> X-ClientProxiedBy: HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) To DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) MIME-Version: 1.0 Received: from localhost.localdomain (123.193.59.220) by HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17 via Frontend Transport; Wed, 6 Oct 2021 11:57:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b4efe4f-712b-4940-e445-08d988c08298 X-MS-TrafficTypeDiagnostic: DF4PR8401MB1034: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +K09VbIQshHto0i1WIRGHIv6LpAHal2i2Enm8oWUVDnjLpSZbESLUEqsx2Oi0sEo6W/N34UJ5w9ppSotkwzCoK+YTYCrShuqFmGIoAWwkPnOygD1Gwl3Lbd3K+hTwEUT41r3JCdoYvKiYhksiznJ/QcKk3d8FpWmAXQBftILsVZyDNbQng4WinvAoLvua5B+q2jVxVC29OCH+6y8WdLeQuz3UEaSKYADiQIoNZpb7jHHUYc3iBuxif3dg3Ym2592m4mDwA+mP1ZVytLwYuDaqEy/NmFPMyX3NdCYDTmNxxbp7QVdDCl5zIhRRXZHTxIo6sR1L6BASnhzHzlpg1cRrZs3D9ovn4uEzjvA6kfJm4oh8TW7jpyP0Cuv0/m1FLtR/CD4zrTyMaFaDzh4G3l/lhXxK4+0Om9dInQhmHES3T/G/LvSmqHxLnjcXPH4BXvQPyjMRKDpxO5q7PCglcDq7tSOEQEZIf0pbl4llZCrP+C2boGTMkyHmqbJjmab5w2GjZ53V7ui8jDf9efDVcEGP4stLy5xDNGy943a2G329G3EszWpu5CRgddBTj9IpJpxN56iAihm5236Tn3P1zKzSB9RYkUV7svphz91rp03adOvZz5ajS88zn0oVka8KLI/mI52O+CAR+ddbQr/njF2Hhuc41+9Svgj0CR3NItPZK65vfLhHVXO05caK+HKaTGmQZFdIRqxWHrgG/QDh6GNuA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(186003)(6506007)(956004)(316002)(26005)(52116002)(6916009)(8676002)(8936002)(5660300002)(6486002)(508600001)(83380400001)(66556008)(66476007)(38350700002)(6512007)(38100700002)(86362001)(36756003)(4326008)(2906002)(54906003)(2616005)(1076003)(66946007)(44832011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?77MkVWnvv3TWsbV7CnnZf5Zq1lXEMMkNRdiSSxHaXsMdMZPvv92MRdbAEjRn?= =?us-ascii?Q?E20PXyCLA2YQ5BshX7gMB7USjaaK+fa6rf0Uj8kbxEJ3lww31I5abUamc9hW?= =?us-ascii?Q?YFzfXMhhIlmWscoitouDOiDFcivUEf4Bffu5wc0MKffgS6HalOxN0kE5kYbW?= =?us-ascii?Q?PcuaO8/7bbG/exKTvDEX9tRLBuUE0yJ/H0F2kqyarUsO8e5q7XROePjWm7ig?= =?us-ascii?Q?zWiEMiwXyE11lSObyKPqBmBLB9y7M5up7JYiQDfbkXirXtTNLc4eL0nI2Axt?= =?us-ascii?Q?HCtW4PctKQtAWUdlyJfGjG6iUhHTGUUw+reVZ/TcAf+i5ArfgNpIRQMZB5bs?= =?us-ascii?Q?zZffVMpnfU3l0DwmHGA/wHEfmZAcaxcI/y+s0Zm558pmeBrJdkzlSLPvaN60?= =?us-ascii?Q?F/VPyRtIHQr4Fpt9AYmcQ3RDbiXAFkYQg1jdYBavqCiqoDKYl9bnZjFmu5Pp?= =?us-ascii?Q?8gTLmA3LV2CAKSh4RZ1JQPq7szIzPQ0OFmCfMgYZd4XWl1eXB1wJET0DpXpi?= =?us-ascii?Q?z2gU6c1W745Qd+unBodlIy8jlnvETE/UfWdSKN5upWLJbDyhNoctIGYEYp+k?= =?us-ascii?Q?WdDAsm66kXOyRtxex4Hs1lwDFcyy0wTDu2ffeOMi3NNmAcDI4Q83NqT21UIy?= =?us-ascii?Q?RRUj4+L+FXBxxKkfaRzb7KFnN6oL+urgxZg60qIAtsiIOskT434l/tdpDnk/?= =?us-ascii?Q?QuvWZId02pUiX4PvGqBCFoxywPEBp16Z3EBVYSVGgW3jIhz0+eCgp/X9Tfqn?= =?us-ascii?Q?O6D1pPJ2+ajc/d0jmOvCA5sapYRQ216dKa5pV1DctWD7Wpkjq0MnTxyJqLuW?= =?us-ascii?Q?4T9XRdQyxGmo9OwvgoGEJicIr0JGpyulY9uIs8aOX47mWxb+wS3Umr0D2FGE?= =?us-ascii?Q?t3V+/ko6uDlEGM/ioZ56+apRGJybf05qRTYZrULFFitZ7BTsk4iizYDF0J+7?= =?us-ascii?Q?7kkNjjW6iUvSKoUYkk+jCkUPdlT7pQ8U0yT+eBKsDmK7IDH5j3D2IRJIG4Tu?= =?us-ascii?Q?qQLUO73yOb10K4+XeRdDIV04/0vnhpvJjlP05hOcATIJf3cUAjsaa3ePsAq5?= =?us-ascii?Q?ZovsmkY9gvuDK5h3tBVfPij21NTUdXZsv5Ey8yXk5wZ239TFAM9ugK/oEtLW?= =?us-ascii?Q?RpsD2BNhMASbGtxKroNwlJ2xaDQmdDEhytC2+9+6dHDOSFALih870oOflWbx?= =?us-ascii?Q?ZY4vvEhct4vIyga+yxqQlegjRexR2jkOsQ5R1vPQGt6+q57lryLVM7NGQ0mO?= =?us-ascii?Q?M7lYdE0h5ziaRrI30PyUKTwzN39Jdv9+lpIynzTv+BMSWBT3NR6URfdHeRKm?= =?us-ascii?Q?gvmUkm7BElDZFD5VGIRfEeBW?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0b4efe4f-712b-4940-e445-08d988c08298 X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2021 11:57:45.7391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R3Ofbr5zbb9b3aREkD7y251DuKwrRUuCV8o5geIKf6dtevkC5fcXKkF6JYAw1DwOLw8HqP61uMLI3Cj8yHDQGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB1034 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: c9PEwNM_Jr8vmZaZgGu_zBG4ssZ7zuPA X-Proofpoint-GUID: c9PEwNM_Jr8vmZaZgGu_zBG4ssZ7zuPA X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-06_02,2021-10-06_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 adultscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 phishscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110060075 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain OpenSBI uses the device tree for platform specific initialization, so we need to have it already in SEC. Cc: Daniel Schaefer Cc: Abner Chang Cc: Sunil V L Signed-off-by: Daniel Schaefer --- Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec | 4 ++ Platform/RISC-V/PlatformPkg/Universal/Sec/Riscv64/SecEntry.S | 22 -= -------- Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c | 49 += +++++++++++++++++++ Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf | 2 + Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h | 1 + 5 files changed, 56 insertions(+), 22 deletions(-) diff --git a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec b/Platform/RI= SC-V/PlatformPkg/RiscVPlatformPkg.dec index 48aeb97431..ad15a155fe 100644 --- a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec +++ b/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec @@ -31,6 +31,8 @@ gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVPeiFvSize|0x0|UINT32|0x00001= 003=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDxeFvBase|0x0|UINT32|0x00001= 004=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDxeFvSize|0x0|UINT32|0x00001= 005=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDtbFvBase|0x0|UINT32|0x00001= 016=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDtbFvSize|0x0|UINT32|0x00001= 017=0D =0D #=0D # Definition of EFI Variable region=0D @@ -66,6 +68,8 @@ gUefiRiscVPlatformPkgTokenSpaceGuid.PcdTemporaryRamSize|0|UINT32|0x00001= 104=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdPeiCorePrivilegeMode|0|UINT32|0x0= 0001105=0D =0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdDeviceTreeAddress|0|UINT32|0x0000= 1106=0D +=0D [PcdsPatchableInModule]=0D =0D [PcdsFeatureFlag]=0D diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/Riscv64/SecEntry.S b= /Platform/RISC-V/PlatformPkg/Universal/Sec/Riscv64/SecEntry.S index 8434d1a4e0..0e3940180d 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/Riscv64/SecEntry.S +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/Riscv64/SecEntry.S @@ -75,11 +75,6 @@ _scratch_init: sd a4, SBI_SCRATCH_FW_START_OFFSET(tp)=0D sd a5, SBI_SCRATCH_FW_SIZE_OFFSET(tp)=0D =0D - /*=0D - * Note: fw_next_arg1() uses a0, a1, and ra=0D - */=0D - call fw_next_arg1=0D - sd a0, SBI_SCRATCH_NEXT_ARG1_OFFSET(tp) /* Save agr1 in scratch buffe= r*/=0D /*=0D Note: fw_next_addr()uses a0, a1, and ra=0D */=0D @@ -500,23 +495,6 @@ _reset_regs: csrw CSR_MSCRATCH, 0=0D ret=0D =0D - .align 3=0D - .section .entry, "ax", %progbits=0D - .global fw_prev_arg1=0D -fw_prev_arg1:=0D -=0D - /* We return previous arg1 in 'a0' */=0D - add a0, zero, zero=0D - ret=0D -=0D - .align 3=0D - .section .entry, "ax", %progbits=0D - .global fw_next_arg1=0D -fw_next_arg1:=0D - /* We return next arg1 in 'a0' */=0D - li a0, FixedPcdGet32(PcdRiscVPeiFvBase)=0D - ret=0D -=0D .align 3=0D .section .entry, "ax", %progbits=0D .global fw_next_addr=0D diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c b/Platform= /RISC-V/PlatformPkg/Universal/Sec/SecMain.c index fa9ecd789a..0af0b4bac8 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c @@ -557,6 +557,12 @@ VOID EFIAPI PeiCore ( &FirmwareContext=0D ));=0D ThisSbiPlatform->firmware_context =3D (unsigned long)&FirmwareContext;=0D +=0D + //=0D + // Save Flattened Device tree in firmware context=0D + //=0D + FirmwareContext.FlattenedDeviceTree =3D FuncArg1;=0D +=0D //=0D // Set firmware context Hart-specific pointer=0D //=0D @@ -647,6 +653,42 @@ RiscVOpenSbiHartSwitchMode ( sbi_hart_switch_mode(FuncArg0, FuncArg1, NextAddr, NextMode, NextVirt);= =0D }=0D =0D +/**=0D + Get device tree address=0D +=0D + @retval The address of Device Tree binary.=0D +**/=0D +VOID *=0D +EFIAPI=0D +GetDeviceTreeAddress (=0D + VOID=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_COMMON_SECTION_HEADER *FoundSection;=0D +=0D + if (FixedPcdGet32 (PcdDeviceTreeAddress)) {=0D + return (VOID *)*((unsigned long *)FixedPcdGet32 (PcdDeviceTreeAddres= s));=0D + } else if (FixedPcdGet32 (PcdRiscVDtbFvBase)) {=0D + Status =3D FindFfsFileAndSection (=0D + (EFI_FIRMWARE_VOLUME_HEADER *)FixedPcdGet32 (PcdRiscVDtbF= vBase),=0D + EFI_FV_FILETYPE_FREEFORM,=0D + EFI_SECTION_RAW,=0D + &FoundSection=0D + );=0D + if (EFI_ERROR(Status)) {=0D + DEBUG ((DEBUG_ERROR, "Platform Device Tree is not found from FV.\n= "));=0D + return NULL;=0D + }=0D + FoundSection ++;=0D + return (VOID *)FoundSection;=0D + } else {=0D + DEBUG ((DEBUG_ERROR, "Must use DTB either from memory or compiled in= FW. PCDs configured incorrectly.\n"));=0D + ASSERT (FALSE);=0D + }=0D + return NULL;=0D +}=0D +=0D /**=0D This function initilizes hart specific information and SBI.=0D For the boot hart, it boots system through PEI core and initial SBI in t= he DXE IPL.=0D @@ -686,6 +728,13 @@ VOID EFIAPI SecCoreStartUpWithStack( UINT64 NonBootHartMessageLockValue;=0D EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC *HartFirmwareContext;=0D =0D + Scratch->next_arg1 =3D (unsigned long)GetDeviceTreeAddress ();=0D + if (Scratch->next_arg1 =3D=3D (unsigned long)NULL) {=0D + DEBUG ((DEBUG_ERROR, "Platform Device Tree is not found\n"));=0D + ASSERT (FALSE);=0D + }=0D + DEBUG ((DEBUG_INFO, "DTB address: 0x%08x\n", Scratch->next_arg1));=0D +=0D //=0D // Setup EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC for each hart.=0D //=0D diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf b/Platfo= rm/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf index 89bcb039a6..78bd75e3ac 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf @@ -57,6 +57,8 @@ [FixedPcd]=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVPeiFvBase=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVPeiFvSize=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdRiscVDtbFvBase=0D + gUefiRiscVPlatformPkgTokenSpaceGuid.PcdDeviceTreeAddress=0D =0D [Pcd]=0D gUefiRiscVPlatformPkgTokenSpaceGuid.PcdBootHartId=0D diff --git a/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpen= sbi.h b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h index 2dab696af8..e7ac6d26ee 100644 --- a/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h +++ b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h @@ -47,6 +47,7 @@ typedef struct { =0D typedef struct {=0D VOID *PeiServiceTable; // PEI Service table=0D + UINT64 FlattenedDeviceTree; // Pointer to Flattened Device t= ree=0D EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC *HartSpecific[RISC_V_MAX_HART_= SUPPORTED];=0D } EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT;=0D =0D --=20 2.33.0