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.web12.10730.1633521537793461084 for ; Wed, 06 Oct 2021 04:59:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=DAZ4N4BC; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0913d10296=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1963W4NH017930; Wed, 6 Oct 2021 11:58:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=pps0720; bh=3Y4bEj8VgxLHz7/0J0ql2+oYwVBAIM9atyaiAeKRFX8=; b=DAZ4N4BC5rvjkyBrIQkgVb4Oa/XgryZ0H1s3U78RBNKXwz5JRD+D3VxhT2QyzJOk2AWP cbsyX8LtFUk26fbO7CcXs9nE0d4ML8Ghyv9Kp3Zy7+DmaG/BVsb0VUMue1vMFznc3iCH CF9l53GfAc8V/B9n0VMgS8cE22QqYyzlDmodw7UqktkH0BNS42HlZ1GzLqgC4i8w8G5A JjfRLhwumMTXdXqwQ/RX+qqrBbBIs6fhS50Fg3MeNsamTorZB0mSdBEz9k9imK4rmT70 jqbUNGJMvwakxcRH8BInEWRuLuPoRdSRiu20kMSLnJRCc34f42a1RAt1cxKxkLw/0kdL nw== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bgwqgx9cu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Oct 2021 11:58:56 +0000 Received: from G4W10204.americas.hpqcorp.net (g4w10204.houston.hpecorp.net [16.207.82.16]) (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 0724358; Wed, 6 Oct 2021 11:58:56 +0000 (UTC) Received: from G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) by G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 6 Oct 2021 11:58:55 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.241.52.10) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Wed, 6 Oct 2021 11:58:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X0DQhM26Tu88v77rSLsrPruARr3adj4fyPnS/CugWlvqyyQ4nk2oDLyr5qK15dm+YZKVtPdlJX5sFVieKTHEwmhe+UzM0+i09fI9vw0ph7Q0veLdWMN5tE3XM/98o2nBib77r0ikPEd88YYBhoIQSU8TcNK6QaS5LVKMvYO83DWvPZeAeuwKmr3P1NR7lY5397gunQoxNu24bFSbzLdECoYytSagjrkuzLEJnDc8q/Npze/J5r0LZOFxxceyhpliDH4A6btfK3Cj9WILfpC1ljKx051F5dFbj+CVX/NFgmnV9iJVjtlIXKs7YY8fUUziZZFg6dSgWz1ncbnbKwKSHg== 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=mUEiVAaPP0JHHi30arSBiD4tp+SDve/oSWadE0MA3bSRAFGuM9Mz9j1focVWMu2b4F+IdeP7P7klYI49/XunZq33doiI7MHZ4ZfXf0TJJ8YD3gBKRl+kGmEsidYS0ZSuEyf1nXmQGs2kOq4D3buWAa8PJoGlrN6iMe9pXWRI/P4Bbw5eNPuglnZgQhFxATur6XQoSt3xWdky48Ek/y4IFjy6d7du1F0VrmHKrArOAdv3FSliVKPeHUsATT54Hj4XMA1lxF5hIpTxk57+Rl9vDCp8FmsQfWThWF/pd3xirl/Mls9mermdUH+PjjenX0KlEGyQUwUIzRYT1QXLyJE2/g== 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:58:54 +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:58:54 +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:58:30 +0800 Message-ID: <20211006115836.3641776-1-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.33.0 X-ClientProxiedBy: HK2PR02CA0159.apcprd02.prod.outlook.com (2603:1096:201:1f::19) To DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) MIME-Version: 1.0 Received: from localhost.localdomain (123.193.59.220) by HK2PR02CA0159.apcprd02.prod.outlook.com (2603:1096:201:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Wed, 6 Oct 2021 11:58:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8e5f5a4-4956-428b-e346-08d988c0ab7d 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: BPue8qfd0yrsGx3R54CUHCOIGPzgnn7YqQQZXUKuyv917AvCC8iLFpawkuIOwGq8jrEmvo10mpDPQoAuAws8y5ALFhMH8aFax3oAwVD4PmFwpe3JCfP2/0Iv1GbTGTof8wkX0fBv8Jma8WZp9SVBZsBFaYTTgLVQIgF3xXJHRlRcHmVZrCp7YxvbDpE7M6Byt6kNiz+6ae+Kg8bb9I0juoMVqdeJL31kSrQ8dy14WXUD11ZKMBIh0sqOdP9oGx96UQA/RUmb8xnCBXl22qx/hEuoNi5xVnkBunKRqYpGzlR0HLMG/hI7jFd2XQ1D8Gw7zpHYoMuxwue1EL9FgjUw9RHcMxnctXVZMTCX1rd1mSaAGomoKwQroIfyptszPStFVZ20PYgDvhYWfjF8dTLcGYsDLc++r8Ghe7gTke/ySiKPJLolNM83nad5aBGj8O37kVNdSGTdtdXo/EPVWPoLFia9Nsv8p/0XYP4zqgJ3d8KrxRb7lNaVcAn+UTk9o6o/OHK4uNio4YgInSuiKlU4niUG343/fHFwNG8sWGoOCWsJ+l8xDZP9t4IekLD61OC8SQ27k67QOyMOgGnl/eB1qELIBP+IsJmBXhBZEb9QHSBGeDn/Wwyn1aCAZwbVIn2kF8LlNDSCQbdKS0S6Qm4hgMIMp8UvgZiew412S2gSQj3lu+IBZInL23ALt87CUCz0BXaEPApPPKt2s1M/z2D25w== 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)(6666004)(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?79h/HVq5cKgFdYhXYZvsZq7un2aq9RO5Qf4VbHI3rE949lkiEDYCqKWLyLzm?= =?us-ascii?Q?3lbinG0bMbkHS92StfW78jV9U956ubg3rhAmpnGFfDjwyXUUceWey+drLi4r?= =?us-ascii?Q?XhH31XHjiVSz2q1dgRLfTAiP+MQpTr89qCLajjO4EmXOaWHHy238TgT9dtsq?= =?us-ascii?Q?1dG4VBjQLjye2MlSsaDnuoHZPC1WaK4Ru/3zh+OX0aIr/aScaD/zDSimPcIA?= =?us-ascii?Q?4xhRlLTam+ZaMla3VURKkvSbJ86e5cztgvj53imAOg91Z69YFkbcgHbHjCqT?= =?us-ascii?Q?1QrAn0iW9IO6Fa36aqyqe2Bh9eOYPJNibqkZ9h6g6NplBFaAB334mtxJQXUB?= =?us-ascii?Q?eG1KosQH9GXdmzbA3JQfGmzH//l54dJ2/vBljAlAh8ulOIl1+fSmibHaDczX?= =?us-ascii?Q?Shrzs67qzPQI9tGmH0egO1l6lXg/haADGUB6Mfbz5atO8gzp3uzAglnEO5tD?= =?us-ascii?Q?eCBa+Y/9ZM9uNphlHToAEU4MgK/MUYdKpGI383UnA3J2jVdFFY5kY2C47jKu?= =?us-ascii?Q?0qxob6iP1A8jNldJyiCZxuV/OUT6A7MeoAkg+naCmeVC0+uVNxVXSrOICZUk?= =?us-ascii?Q?LzX0MRJHhRcB6FNDeEBeUmEu0Je3evdzzdGKcRDNcx1GaV9dmH20XewDVO4K?= =?us-ascii?Q?EItzglvcuPsKs9AgjbGzdRHurtjQENULlmmJEDIUpdwol2dJZaar8aqRkjpC?= =?us-ascii?Q?FDavrqSdcDDW4JafJpjzJ5F1zvGKlENsp3WuGaBQ8DbJ93SqPR1cCJOG4aoW?= =?us-ascii?Q?//qfwS81VChq7Xil8B9GJ4fQl9KvvACckNB756hCHbbePXI30IvCznuKaHjI?= =?us-ascii?Q?FndiMPLuZyfZu7PUd+Tna9KLHM2nQvyToIOnzAHzMiaXHkHpbX9EwS3PE6lZ?= =?us-ascii?Q?NZOlP3iccbH/WstlV9Vv9Qh5o69SEi2FLqebPuK33ktxyMPp3ojXKtE+F8G9?= =?us-ascii?Q?fNKYjfJDbRqV1vTS1lLrDdkFgbKUsitDVVMBIhqCA8oPs8nVZ8CO9UPLZoke?= =?us-ascii?Q?5JYPOY2be8IAnv0FIIHkBbxYrqRzblDZy4m9g97WFuQwBukvEFHqtXr/6MWZ?= =?us-ascii?Q?22To/VztXiH5vkFu/WzC7Hg0JdnZNv1m9i+/Vz+6txMZjYmjj11hqhYT/lK8?= =?us-ascii?Q?5ac7AzrYXqUPc4HUnmwW9w8eHOotZRZH4QiVX2GtlpOSxUOnblnaDHPwKDxB?= =?us-ascii?Q?dNMNkM8egSNxT/oaiyEEUEdcWbRNjNS67USs27nLHV0FnMT42OANB2BWHRDM?= =?us-ascii?Q?JpCPGvW1UbQx8amTQ/bCmcs1DCl60AsFCZ5KwqOPT50P02f0Y6gBlQ5k5R7M?= =?us-ascii?Q?CdnnmGyF5SW3X0WOOaGdUJiT?= X-MS-Exchange-CrossTenant-Network-Message-Id: b8e5f5a4-4956-428b-e346-08d988c0ab7d 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:58:54.3827 (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: Gk4BIQg00VWgI7/O0SfhMLpPWqLQFuw1Zl21N5i5BfVCBRescAYQRuV88E2rXfNXC8hdOEZv5dtNssHOkKoCEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB1034 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: SbWFXNG8gSsWIbppBuN1_qZDY33d3Zbx X-Proofpoint-ORIG-GUID: SbWFXNG8gSsWIbppBuN1_qZDY33d3Zbx 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 spamscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=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