From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.57]) by mx.groups.io with SMTP id smtpd.web09.2892.1638909886855939950 for ; Tue, 07 Dec 2021 12:44:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=MZk20RTJ; spf=pass (domain: arm.com, ip: 40.107.21.57, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8gyF96NFiYRxkClo6iuxprTOuvrQNS6Mb9phr/1oSY8=; b=MZk20RTJ9I4f5P6N9AAGF+Xzxkr+bfnbjqTuiRHtcAfcO/SZ70YIMP0b+gx8q7dfrDwzskxv911J/BuqCOh+WR/YC4qNSJnuaJ/ftRQUhWmPka7W3FzC+u1aSoIaq1Qx3af+yGhUz2oR98hPqodZGB1n0WA9Q9acuRxHpKM8Cak= Received: from AM6P195CA0087.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::28) by PAXPR08MB6894.eurprd08.prod.outlook.com (2603:10a6:102:13d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Tue, 7 Dec 2021 20:44:43 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::cc) by AM6P195CA0087.outlook.office365.com (2603:10a6:209:86::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.14 via Frontend Transport; Tue, 7 Dec 2021 20:44:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.13 via Frontend Transport; Tue, 7 Dec 2021 20:44:43 +0000 Received: ("Tessian outbound de6049708a0a:v110"); Tue, 07 Dec 2021 20:44:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9ab6e147173d045b X-CR-MTA-TID: 64aa7808 Received: from be0e6dd7c0b0.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EC787111-1DB8-425F-88CC-588552A49382.1; Tue, 07 Dec 2021 20:44:30 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id be0e6dd7c0b0.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Dec 2021 20:44:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RSuR55W/EKQJ1jqLCaYkNuRH3TuV1hSq+NCs91dDRQNGGR1009TUPnoM7CvFOAduxQTTFEctdGkQxt+bd/cvKT89EstXOabHOdGZNn0U1PxnfdG2okXvpoAaUdYyxkeXiZz8M4FoBRwW8khGg6sy4wj2W3r09JO4lqtyUOluNo8tocAOdKvZatXo2RKhLo3dK1ulyptkvL8wg9OIIRGud93CuTvJ9H2ioiDlB8soXuOF4f9PQBaJwQPlvJ2gDZ2MrC2vXvsj+9ofZWL+l2te954avQzNjJWewOV9reGkVBz3JHcf8dIHP87ZT0rwx/dtg08kLEfWktjkp98AvfJi8w== 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=8gyF96NFiYRxkClo6iuxprTOuvrQNS6Mb9phr/1oSY8=; b=fp2TscGVopn1idoKaYYMGTmxrwKzZkArAkoWxiv2IE2UAlIu/kqGNLckEIQnkSrNs041wFebzR8+ET43vmg/9KZeiku9CHgmIthbDuMMBg2+SZD6inbzygnOp6OCsFFRSISZpmrohS5u7AyZBatyYRD98u8USBZBxSC/KfJWlI9UOnsPswoWy+O7FcQ65N6gkaJiMsPhFdwk3IAtLrsky9sVCmHuWoHTlHBNQNG8pGZmuhx/uIrxmLa0QS9Mk8H5tkVZSRaVhlOa9Wfx4lL3uyRhGxM2jLjiJAyl/LXaw+Nu4XYhBJZwR0ILYsKR6cMivUEzC/4jVcBioVMMNGYEDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8gyF96NFiYRxkClo6iuxprTOuvrQNS6Mb9phr/1oSY8=; b=MZk20RTJ9I4f5P6N9AAGF+Xzxkr+bfnbjqTuiRHtcAfcO/SZ70YIMP0b+gx8q7dfrDwzskxv911J/BuqCOh+WR/YC4qNSJnuaJ/ftRQUhWmPka7W3FzC+u1aSoIaq1Qx3af+yGhUz2oR98hPqodZGB1n0WA9Q9acuRxHpKM8Cak= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM5PR0801MB1779.eurprd08.prod.outlook.com (2603:10a6:203:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.20; Tue, 7 Dec 2021 20:44:29 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::bdcf:cfa6:b2bb:38ac]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::bdcf:cfa6:b2bb:38ac%6]) with mapi id 15.20.4755.021; Tue, 7 Dec 2021 20:44:29 +0000 Subject: Re: [edk2-platforms][PATCH V1 03/11] Platform/ARM/Morello: Add PlatformDxe for Morello SoC To: Chandni Cherukuri , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , nd References: <20211204123042.32140-1-chandni.cherukuri@arm.com> <20211204123042.32140-4-chandni.cherukuri@arm.com> From: "Sami Mujawar" Message-ID: Date: Tue, 7 Dec 2021 20:44:35 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20211204123042.32140-4-chandni.cherukuri@arm.com> X-ClientProxiedBy: LNXP265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::17) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.50) by LNXP265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Tue, 7 Dec 2021 20:44:29 +0000 X-MS-Office365-Filtering-Correlation-Id: 6f8d93b5-3730-49f1-0f56-08d9b9c265cd X-MS-TrafficTypeDiagnostic: AM5PR0801MB1779:EE_|AM5EUR03FT011:EE_|PAXPR08MB6894:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: xEBADCpdUJh81wOlqDHdux9DedGWi5qdXz1bR7n+QSLcUKvchbhS+lFe0gZ7saKm8WOwizdYShqqAKgE+k9G+UTmtEUm5sqW6ui8q+qG6nABOcXd3b8AXslRE0tUPJVjQ9NPIYWQdmZNnQTiPxGV2ou5akOqnxl2TtdgTBg5qCMSVeBz6MiMA37iqtU6Rfl2Yzb1SdDjpM7zEC6iuL9VjDYrSDe9HmtE0USSQuS+fJS19SnUapeUfjrdv58kVxMcV+MRi14KRpi5a29/EyUkHpD7/JK3E8ZppUclGRUqFV6wRBFQCQ+LAy1KxjZ/GVLdgZSK7sjB2sCVm+giLJVxhXgWuJOI5xjYz9jR1oAxNj4his2CamhRU7QgGjOF4oWvfQIt1pJ55RVrY+riEke7eT6dqLewU+doH1RVkAI2K2aPlfXslMEGZ/FTSPkf3+LL8UipUcra8wp/uRcoLzt5WDlTbmemllLR/sc2E+u5hsw08Y1e2qcATI8G6Gwxar1Bt+iZxkYqF9+XWE61eeEtrGfcVa2rbSTXtbFdx/z3feCGBrzrXDuY8o8wG4IvP3ULZ5Yopc4+90NZR5/zp9g8WYKej4b6HdCZgWqMX5mz7+eYxg3SjU0Fd51ePpuCgEw/4F6wf/77i+JS3pQps3TTD91Pnl99f8TmAkW97aVwT1wPN8WUroBpFxvZLLjv9pFYfCdm3lKx+iKVLtNkC8ZcCDf/RzSSRvuU3SyS3GO2GwzeMgSQ+Kq47Hpb7BOcVLfpP2+5OgKg0PJillKL9iX3/g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38100700002)(54906003)(66556008)(66946007)(66476007)(36756003)(31696002)(38350700002)(508600001)(5660300002)(4326008)(8936002)(6666004)(31686004)(83380400001)(8676002)(6486002)(44832011)(186003)(86362001)(316002)(16576012)(2906002)(52116002)(53546011)(956004)(2616005)(26005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1779 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ada64eaa-1786-4d0d-f1f6-08d9b9c25d87 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IpotZh67xICh1AsbvJr9LS4jK3islmc/OIPiSQPt1qtdOYpJubxrj1g/iSj0fbz6gUCF6Ry7jGmxC/Lo/RHP8sKx+L1obBpQXAW5Gqz2cGRmUp5PY609K0UeWDLxFRkKi19U3AHB4z5P1oc+fw+H2cC9fXeH/wT8lo/vACgoW/1NjMbN17nlG+/E6nc3WYvnKcQwst9S+JGPREKcmi1yOzbpzL87w3oqxE0cX4C7QUstEmVb0O5MEc69iKP4HSvdZtZYESYL8WPyc9vMU5mkBdkP49YKb8hRb5iNHzedp37MmhrBfx6ZpICqMQEUKHzfr6tTLUnMaao2THI3z5UkhTF+dg6cf9WipLRdQRuh7YFFWUqaU3X+c05hLuN58R4tEvnstx9608Upq1oklOEVbYDkJIFFDMYWWdP/an+nVSfmU0L+eiVYpgneUE9s9XN9HsQAoIb6+rBw2xuAaPI4+J8nIeoH9F+JLyBzlJAGClAm7Slktzd2WPzBkCVdzdfOwNMG+oMQCOewhYtrDju4jekOOFkXk9OHCzgRcb/6kqu6Pu0eUCbIdkZU4LnYb53nwCE3x1WemQX4RUwSqTAM3s4ocAG0f8wyAb4jT6Z8C4jPyKrk5h50m/9Iz/89pBQVYuCKmcB/Bfuuv/fcLUJ+EhbuHi9pb+jbjCPxcWYPTAwwkJ5J/yXS5B7m8uigGuxaO+XJnIjCCdyQ/HT6/qjpVATu9hCrxljK5LCNL+bebZY= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(8676002)(36756003)(86362001)(31696002)(336012)(82310400004)(2906002)(8936002)(956004)(44832011)(6486002)(53546011)(81166007)(70586007)(5660300002)(70206006)(54906003)(31686004)(83380400001)(4326008)(6666004)(16576012)(356005)(316002)(26005)(508600001)(36860700001)(186003)(2616005)(47076005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2021 20:44:43.1742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f8d93b5-3730-49f1-0f56-08d9b9c265cd X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6894 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Chandni, Please find my feedback inline marked [SAMI]. With that fixed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 04/12/2021 12:30 PM, Chandni Cherukuri wrote: > This patch adds PlatformDxe support for Morello SoC platform. > It includes the registration of ramdisk device. > > Signed-off-by: Chandni Cherukuri > --- > Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.inf | 43 +++++++++++++ > Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.c | 67 ++++++++++++++++++++ > 2 files changed, 110 insertions(+) > > diff --git a/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.inf b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.inf > new file mode 100644 > index 000000000000..a5d8ac36a3f2 > --- /dev/null > +++ b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.inf > @@ -0,0 +1,43 @@ > +## @file > +# Platform DXE driver for Morello SoC Platform > +# > +# Copyright (c) 2021, ARM Limited. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION = 0x0001001B > + BASE_NAME = PlatformDxe > + FILE_GUID = D75DB98F-5750-47C8-A46F-3140965537FC > + MODULE_TYPE = DXE_DRIVER > + VERSION_STRING = 1.0 > + ENTRY_POINT = ArmMorelloEntryPoint > + > +[Sources.common] > + PlatformDxeSoc.c > + > +[Packages] > + MdePkg/MdePkg.dec > + OvmfPkg/OvmfPkg.dec > + Platform/ARM/Morello/MorelloPlatform.dec > + > +[LibraryClasses] > + UefiDriverEntryPoint > + > +[Protocols] > + gEfiRamDiskProtocolGuid > + > +[FeaturePcd] > + gArmMorelloTokenSpaceGuid.PcdRamDiskSupported > + > +[FixedPcd] > + gArmMorelloTokenSpaceGuid.PcdRamDiskBase > + gArmMorelloTokenSpaceGuid.PcdRamDiskSize > + > +[Depex] > + gEfiRamDiskProtocolGuid > + > +[Guids] > + gEfiVirtualCdGuid ## SOMETIMES_CONSUMES ## GUID > diff --git a/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.c b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.c > new file mode 100644 > index 000000000000..358c80acc7ee > --- /dev/null > +++ b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeSoc.c > @@ -0,0 +1,67 @@ > +/** @file > + > + Copyright (c) 2021, ARM Limited. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#include > +#include > +#include > + > +/** > + Entrypoint of Platform Dxe Driver > + > + @param ImageHandle[in] The firmware allocated handle for the EFI image. > + @param SystemTable[in] A pointer to the EFI System Table. > + > + @retval EFI_SUCCESS The entry point is executed successfully. > +**/ > +EFI_STATUS > +EFIAPI > +ArmMorelloEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + EFI_STATUS Status; > + EFI_RAM_DISK_PROTOCOL *RamDisk; > + EFI_DEVICE_PATH_PROTOCOL *DevicePath; > + > + Status = EFI_SUCCESS; > + > + if (FeaturePcdGet (PcdRamDiskSupported)) { > + Status = gBS->LocateProtocol ( > + &gEfiRamDiskProtocolGuid, > + NULL, > + (VOID **)&RamDisk > + ); > + if (EFI_ERROR (Status)) { > + DEBUG (( > + DEBUG_ERROR, > + "Couldn't find the RAM Disk protocol %r\n", [SAMI] One print format specifier appears to be missing in the above line. [/SAMI] > + __FUNCTION__, > + Status > + )); > + return Status; > + } > + > + Status = RamDisk->Register ( > + (UINTN)PcdGet32 (PcdRamDiskBase), > + (UINTN)PcdGet32 (PcdRamDiskSize), > + &gEfiVirtualCdGuid, > + NULL, > + &DevicePath > + ); > + if (EFI_ERROR (Status)) { > + DEBUG (( > + DEBUG_ERROR, > + "%a: Failed to register RAM Disk - %r\n", > + __FUNCTION__, > + Status > + )); > + } > + } > + > + return Status; > +}