From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 017332244E41D for ; Sun, 15 Apr 2018 23:23:47 -0700 (PDT) Received: by mail-io0-x243.google.com with SMTP id c26so4143980iob.3 for ; Sun, 15 Apr 2018 23:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uM2XKTRYMSvmaLMXti3mNNMv260sZhdcqqiinaZ7YEQ=; b=Ue352rhTx8529l5aF4HcPucBUyMgvpeQaNsW/sVutHGro2DappvTCT27NWT5tve4Ij xuPPMtNbPoiJEfYJA2HDIaKr2GRqwfsJkowO4qMgNT2eZqgk++IQ2kJgHP7MtKLmo/zf TwtS1AIxD77LUmcptnXrHW6i3tACw0ndG1M5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uM2XKTRYMSvmaLMXti3mNNMv260sZhdcqqiinaZ7YEQ=; b=ckSAsurHWPV92MTBlXvlUuvk94/iijQyNph3fhrZaoxMh5refBMExcQnEI52je17G6 YQ2NorGYAx/jPZ1G+id8Xboa4bS8PoDNHIkpmDhSzQZRehX331ec1OMECaFs3PEVA7iF 14cubHnxVB6Gil30x2c9RmalMD4VhVQ/YQsv7iWMhKhyw9QBDU6QM5bJjlJMH3lBWCpy 1tOM+Z08tOwgaL7784m7J/v8x04+o99JA1WqYGOiOlDApFA/MZVYPxSfKRpfqUzLj81F 5FHVAhjTjujVD6OmGmHhMCYtCIbMTJZew+x+OcO7wb+JPJ9C/KWWjELWCWUM7UG++lGY 8ZoQ== X-Gm-Message-State: ALQs6tDO9DmROsJKJxWqBk6PL3ZUyjbD/pkNbyOqghrS5/ANRuC0Z3jt ZieyU5JvYS6FsAsfspH0hzpBfyfHD6w6WeeccV6RFwpz1r0= X-Google-Smtp-Source: AIpwx4/UcVbS5KwVZzsjijkj7IpHtjNa6YgaGWeANQNVaFMhAiqO7GUDkOa2W/CWtGMBwJcub3MQHhVFqxPHb1Q3PZ0= X-Received: by 10.107.69.23 with SMTP id s23mr17458312ioa.173.1523859827173; Sun, 15 Apr 2018 23:23:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Sun, 15 Apr 2018 23:23:46 -0700 (PDT) In-Reply-To: <1523558863-5427-4-git-send-email-thomas.abraham@arm.com> References: <1523558863-5427-1-git-send-email-thomas.abraham@arm.com> <1523558863-5427-4-git-send-email-thomas.abraham@arm.com> From: Ard Biesheuvel Date: Mon, 16 Apr 2018 08:23:46 +0200 Message-ID: To: Thomas Abraham Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Daniil Egranov Subject: Re: [PATCH edk2-platforms v2 3/6] Platform/ARM/Sgi: add initial platform dxe driver implementation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 06:23:48 -0000 Content-Type: text/plain; charset="UTF-8" On 12 April 2018 at 20:47, Thomas Abraham wrote: > From: Daniil Egranov > > Add a initial platform dxe driver which starts of being almost > an empty implemenation. implemenTation > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Daniil Egranov > Signed-off-by: Thomas Abraham > --- > .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 25 ++++++++ > .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 74 ++++++++++++++++++++++ > 2 files changed, 99 insertions(+) > create mode 100644 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > create mode 100644 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf > > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > new file mode 100644 > index 0000000..2da768a > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > @@ -0,0 +1,25 @@ > +/** @file > +* > +* Copyright (c) 2018, ARM Limited. All rights reserved. > +* > +* This program and the accompanying materials are licensed and made available > +* under the terms and conditions of the BSD License which accompanies this > +* distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > +#include > + > +EFI_STATUS > +EFIAPI > +ArmSgiPkgEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + return EFI_SUCCESS; > +} > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf > new file mode 100644 > index 0000000..379d7f4 > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf > @@ -0,0 +1,74 @@ > +# > +# Copyright (c) 2018, ARM Limited. All rights reserved. > +# > +# This program and the accompanying materials are licensed and made available > +# under the terms and conditions of the BSD License which accompanies this > +# distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +# > + > +[Defines] > + INF_VERSION = 0x00010005 0x0001001A > + BASE_NAME = PlatformDxe > + FILE_GUID = 54cee352-c4cd-4d80-8524-54325c3a528e > + MODULE_TYPE = DXE_DRIVER > + VERSION_STRING = 1.0 > + ENTRY_POINT = ArmSgiPkgEntryPoint > + > +[Sources.common] > + PlatformDxe.c > + > +[Packages] > + ArmPkg/ArmPkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + edk2-platforms/Platform/ARM/SgiPkg/SgiPlatform.dec Drop the edk2-platforms prefix here > + EmbeddedPkg/EmbeddedPkg.dec > + MdePkg/MdePkg.dec > + OvmfPkg/OvmfPkg.dec > + > +[LibraryClasses] > + AcpiLib > + BaseMemoryLib > + DebugLib > + DxeServicesTableLib > + FdtLib > + HobLib > + IoLib > + PcdLib > + PrintLib > + SerialPortLib > + UefiBootServicesTableLib > + UefiRuntimeServicesTableLib > + UefiLib > + UefiDriverEntryPoint > + VirtioMmioDeviceLib > + Do you really need all these packages and library classes for an empty implementation? > +[Guids] > + #gArmGlobalVariableGuid > + gEfiEndOfDxeEventGroupGuid > + gEfiFileInfoGuid > + gEfiHobListGuid > + gFdtTableGuid > + gEfiAcpi10TableGuid > + gEfiAcpiTableGuid > + Same here > +[Protocols] > + gEfiBlockIoProtocolGuid > + gEfiDevicePathFromTextProtocolGuid > + gEfiSimpleFileSystemProtocolGuid > + and here > +[FeaturePcd] > + gArmSgiTokenSpaceGuid.PcdVirtioSupported > + > +[FixedPcd] > + gArmTokenSpaceGuid.PcdSystemMemoryBase > + gArmTokenSpaceGuid.PcdSystemMemorySize > + > + gArmTokenSpaceGuid.PcdHypFvBaseAddress > + gArmTokenSpaceGuid.PcdHypFvSize > + > +[Depex] > + TRUE I think it is fine to start out with an empty file and add things as you go, but this should also cover the dependencies declared in this file. I.e., add package, library class, guid and protocol dependencies as needed when you add the functionality to the driver.