[edk2] [PATCH edk2-platforms v4 3/9] Platform/ARM/Sgi: add initial platform dxe driver implementation

Thomas Abraham posted 9 patches 7 years, 8 months ago
There is a newer version of this series
[edk2] [PATCH edk2-platforms v4 3/9] Platform/ARM/Sgi: add initial platform dxe driver implementation
Posted by Thomas Abraham 7 years, 8 months ago
From: Daniil Egranov <daniil.egranov@arm.com>

Add a initial platform dxe driver which starts of being almost
an empty implementation.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
---
 .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   | 25 ++++++++
 .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 73 ++++++++++++++++++++++
 2 files changed, 98 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..eb26fde
--- /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 <Library/DebugLib.h>
+
+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..dbe04c5
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
@@ -0,0 +1,73 @@
+#
+#  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                    = 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
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[LibraryClasses]
+  AcpiLib
+  BaseMemoryLib
+  DebugLib
+  DxeServicesTableLib
+  FdtLib
+  HobLib
+  IoLib
+  PcdLib
+  PrintLib
+  SerialPortLib
+  UefiBootServicesTableLib
+  UefiRuntimeServicesTableLib
+  UefiLib
+  UefiDriverEntryPoint
+  VirtioMmioDeviceLib
+
+[Guids]
+  gEfiEndOfDxeEventGroupGuid
+  gEfiFileInfoGuid
+  gEfiHobListGuid
+  gFdtTableGuid
+  gEfiAcpi10TableGuid
+  gEfiAcpiTableGuid
+  gSgi575AcpiTablesiFileGuid
+
+[Protocols]
+  gEfiBlockIoProtocolGuid
+  gEfiDevicePathFromTextProtocolGuid
+  gEfiSimpleFileSystemProtocolGuid
+
+[FeaturePcd]
+  gArmSgiTokenSpaceGuid.PcdVirtioSupported
+
+[FixedPcd]
+  gArmTokenSpaceGuid.PcdSystemMemoryBase
+  gArmTokenSpaceGuid.PcdSystemMemorySize
+  gArmTokenSpaceGuid.PcdHypFvBaseAddress
+  gArmTokenSpaceGuid.PcdHypFvSize
+
+[Depex]
+  TRUE
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms v4 3/9] Platform/ARM/Sgi: add initial platform dxe driver implementation
Posted by Ard Biesheuvel 7 years, 8 months ago
On 21 May 2018 at 10:25, Thomas Abraham <thomas.abraham@arm.com> wrote:
> From: Daniil Egranov <daniil.egranov@arm.com>
>
> Add a initial platform dxe driver which starts of being almost
> an empty implementation.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
> ---
>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   | 25 ++++++++
>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 73 ++++++++++++++++++++++
>  2 files changed, 98 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..eb26fde
> --- /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 <Library/DebugLib.h>
> +
> +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..dbe04c5
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> @@ -0,0 +1,73 @@
> +#
> +#  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                    = 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
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdePkg/MdePkg.dec
> +  OvmfPkg/OvmfPkg.dec
> +  Platform/ARM/SgiPkg/SgiPlatform.dec
> +
> +[LibraryClasses]
> +  AcpiLib
> +  BaseMemoryLib
> +  DebugLib
> +  DxeServicesTableLib
> +  FdtLib
> +  HobLib
> +  IoLib
> +  PcdLib
> +  PrintLib
> +  SerialPortLib
> +  UefiBootServicesTableLib
> +  UefiRuntimeServicesTableLib
> +  UefiLib
> +  UefiDriverEntryPoint
> +  VirtioMmioDeviceLib
> +
> +[Guids]
> +  gEfiEndOfDxeEventGroupGuid
> +  gEfiFileInfoGuid
> +  gEfiHobListGuid
> +  gFdtTableGuid
> +  gEfiAcpi10TableGuid
> +  gEfiAcpiTableGuid
> +  gSgi575AcpiTablesiFileGuid
> +
> +[Protocols]
> +  gEfiBlockIoProtocolGuid
> +  gEfiDevicePathFromTextProtocolGuid
> +  gEfiSimpleFileSystemProtocolGuid
> +
> +[FeaturePcd]
> +  gArmSgiTokenSpaceGuid.PcdVirtioSupported
> +
> +[FixedPcd]
> +  gArmTokenSpaceGuid.PcdSystemMemoryBase
> +  gArmTokenSpaceGuid.PcdSystemMemorySize
> +  gArmTokenSpaceGuid.PcdHypFvBaseAddress
> +  gArmTokenSpaceGuid.PcdHypFvSize
> +

As I mentioned in my review of v1: I think it is fine to start with an
empty stub for a driver, but please don't limit that to the C file.

None of these library classes, guids, protocols or PCDs are being used
in this patch. References to them should be added along with the code
that actually uses those references.

> +[Depex]
> +  TRUE
> --
> 2.7.4
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms v4 3/9] Platform/ARM/Sgi: add initial platform dxe driver implementation
Posted by Thomas Abraham 7 years, 8 months ago
On Mon, May 21, 2018 at 2:25 PM, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> On 21 May 2018 at 10:25, Thomas Abraham <thomas.abraham@arm.com> wrote:
>> From: Daniil Egranov <daniil.egranov@arm.com>
>>
>> Add a initial platform dxe driver which starts of being almost
>> an empty implementation.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
>> ---
>>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   | 25 ++++++++
>>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 73 ++++++++++++++++++++++
>>  2 files changed, 98 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..eb26fde
>> --- /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 <Library/DebugLib.h>
>> +
>> +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..dbe04c5
>> --- /dev/null
>> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> @@ -0,0 +1,73 @@
>> +#
>> +#  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                    = 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
>> +  EmbeddedPkg/EmbeddedPkg.dec
>> +  MdePkg/MdePkg.dec
>> +  OvmfPkg/OvmfPkg.dec
>> +  Platform/ARM/SgiPkg/SgiPlatform.dec
>> +
>> +[LibraryClasses]
>> +  AcpiLib
>> +  BaseMemoryLib
>> +  DebugLib
>> +  DxeServicesTableLib
>> +  FdtLib
>> +  HobLib
>> +  IoLib
>> +  PcdLib
>> +  PrintLib
>> +  SerialPortLib
>> +  UefiBootServicesTableLib
>> +  UefiRuntimeServicesTableLib
>> +  UefiLib
>> +  UefiDriverEntryPoint
>> +  VirtioMmioDeviceLib
>> +
>> +[Guids]
>> +  gEfiEndOfDxeEventGroupGuid
>> +  gEfiFileInfoGuid
>> +  gEfiHobListGuid
>> +  gFdtTableGuid
>> +  gEfiAcpi10TableGuid
>> +  gEfiAcpiTableGuid
>> +  gSgi575AcpiTablesiFileGuid
>> +
>> +[Protocols]
>> +  gEfiBlockIoProtocolGuid
>> +  gEfiDevicePathFromTextProtocolGuid
>> +  gEfiSimpleFileSystemProtocolGuid
>> +
>> +[FeaturePcd]
>> +  gArmSgiTokenSpaceGuid.PcdVirtioSupported
>> +
>> +[FixedPcd]
>> +  gArmTokenSpaceGuid.PcdSystemMemoryBase
>> +  gArmTokenSpaceGuid.PcdSystemMemorySize
>> +  gArmTokenSpaceGuid.PcdHypFvBaseAddress
>> +  gArmTokenSpaceGuid.PcdHypFvSize
>> +
>
> As I mentioned in my review of v1: I think it is fine to start with an
> empty stub for a driver, but please don't limit that to the C file.
>
> None of these library classes, guids, protocols or PCDs are being used
> in this patch. References to them should be added along with the code
> that actually uses those references.

Yes, I missed this part. This will be fixed in the next version.

Thanks,
Thomas.

>
>> +[Depex]
>> +  TRUE
>> --
>> 2.7.4
>>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel