From nobody Sun Feb 8 23:37:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75977+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75977+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622647871; cv=none; d=zohomail.com; s=zohoarc; b=NmlE4T6fN6pDbkZ2bns/bDip0UNEke8FwhQzL12EPmzZj0SLj7coPktrVfToE9Y265m4kwJIT46BSjTV5/3+ZSCWHKfC5IZFGs5KLk6JCSbbMSjOjYIHx7t/dSitc5gqjBbG69Dho1Ppbwe9MZvqZF4HeqUFywO2kzjKB34RE7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622647871; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=QoA5RucjHeh9bSyuCWNBPyAvJZt9dRWa9zCYf5ZBF/A=; b=hYZE1IKvppVSbUrYm9AJssY+BuCU4Qvob4s7IZDdcwvU8KhDx6rQ3RNQMtTxO86no4LdHQzGJBsFcAaUMDp3isPqsc2CgLTFM7s2TGCeoCGJhO81x8/s344DeonmWpmKflZTBoANkBX98LcDc9uR37g3XOxdn519oqqFxfVjLVo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75977+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622647871627103.72369429677565; Wed, 2 Jun 2021 08:31:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wD4HYY1788612xwvDaMyXJc7; Wed, 02 Jun 2021 08:31:11 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.9783.1622618168922624190 for ; Wed, 02 Jun 2021 00:16:09 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 829B16D; Wed, 2 Jun 2021 00:16:08 -0700 (PDT) X-Received: from usa.arm.com (unknown [10.163.35.111]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3D0633F73D; Wed, 2 Jun 2021 00:16:05 -0700 (PDT) From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Khasim Syed Mohammed Subject: [edk2-devel] [edk2-platforms][PATCH V1 2/4] Platform/ARM/N1Sdp: Introduce platform DXE driver Date: Wed, 2 Jun 2021 12:45:50 +0530 Message-Id: <20210602071552.1207-3-khasim.mohammed@arm.com> In-Reply-To: <20210602071552.1207-1-khasim.mohammed@arm.com> References: <20210602071552.1207-1-khasim.mohammed@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,khasim.mohammed@arm.com X-Gm-Message-State: C191SJzhZjWbFEkGeeaiv6hox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622647871; bh=rHumOK90ooXzRRwKGKeqE4a2en4kSZifF+dVKAO6DyU=; h=Cc:Date:From:Reply-To:Subject:To; b=J8r+dMBOACa+k+pwEBQxBaNVTIu0qoCTzSyEaEkZvjvuAwgvH5pPorGoThS86Bm3Sps co4HvEyysb5FJRW70m8W0mbwEMvKd8Pf9t5wHwI+4ZmmLdrrzHqmL+yZZZmwbNGB7i2Wv 4o+xfOSBVMfqWdZ2p+gO/EDrRZVu960QPws= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add an initial platform DXE driver and support for ramdisk devices. Signed-off-by: Deepak Pandey Signed-off-by: Khasim Syed Mohammed --- Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf | 44 ++++++++++++++= +++ Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c | 51 ++++++++++++++= ++++++ 2 files changed, 95 insertions(+) diff --git a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf b/Platf= orm/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf new file mode 100644 index 000000000000..925bde4063cc --- /dev/null +++ b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf @@ -0,0 +1,44 @@ +## @file +# Platform DXE driver for N1Sdp +# +# Copyright (c) 2021, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D PlatformDxe + FILE_GUID =3D 11fc8b5a-377d-47a8-aee9-0093d3d3407f + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D ArmN1SdpEntryPoint + +[Sources.common] + PlatformDxe.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Platform/ARM/N1Sdp/N1SdpPlatform.dec + +[LibraryClasses] + HobLib + UefiDriverEntryPoint + +[Protocols] + gEfiRamDiskProtocolGuid + +[FeaturePcd] + gArmN1SdpTokenSpaceGuid.PcdRamDiskSupported + +[FixedPcd] + gArmN1SdpTokenSpaceGuid.PcdRamDiskBase + gArmN1SdpTokenSpaceGuid.PcdRamDiskSize + +[Depex] + gEfiRamDiskProtocolGuid diff --git a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c b/Platfor= m/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c new file mode 100644 index 000000000000..e0b89556d40d --- /dev/null +++ b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c @@ -0,0 +1,51 @@ +/** @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 +ArmN1SdpEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_RAM_DISK_PROTOCOL *RamDisk; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + + Status =3D EFI_UNSUPPORTED; + if (FeaturePcdGet (PcdRamDiskSupported)) { + Status =3D gBS->LocateProtocol (&gEfiRamDiskProtocolGuid, NULL, (VOID*= *) &RamDisk); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Couldn't find the RAM Disk protocol - %r\n= ", __FUNCTION__, Status)); + return Status; + } + + Status =3D 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", __FUN= CTION__, Status)); + } + } + return Status; +} --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75977): https://edk2.groups.io/g/devel/message/75977 Mute This Topic: https://groups.io/mt/83261389/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-