[edk2-devel] [edk2-platforms][PATCH v1 2/4] Platform/ARM/N1SDP: Add EDK2 build system files

Pranav Madhu pranav.madhu at arm.com
Fri Jun 26 17:17:06 UTC 2020


Hi Ard,

> -----Original Message-----
> From: Ard Biesheuvel <ard.biesheuvel at arm.com>
> Sent: Wednesday, June 10, 2020 11:47 PM
> To: devel at edk2.groups.io; Pranav Madhu <Pranav.Madhu at arm.com>
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 2/4]
> Platform/ARM/N1SDP: Add EDK2 build system files
>
> On 4/24/20 1:58 PM, Pranav Madhu via groups.io wrote:
> > From: Deepak Pandey <deepak.dandey at arm.com>
> >
> > Add EDK Build system files for Neoverse N1 System Development Platform.
> >
> > Signed-off-by: Pranav Madhu <pranav.madhu at arm.com>
> > ---
> >   Platform/ARM/N1SdpPkg/N1SdpPlatform.dec |  31 +++
> >   Platform/ARM/N1SdpPkg/N1SdpPlatform.dsc | 222 ++++++++++++++++
> >   Platform/ARM/N1SdpPkg/N1SdpPlatform.fdf | 272
> ++++++++++++++++++++
> >   3 files changed, 525 insertions(+)
> >
> > diff --git a/Platform/ARM/N1SdpPkg/N1SdpPlatform.dec
> > b/Platform/ARM/N1SdpPkg/N1SdpPlatform.dec
> > new file mode 100644
> > index 000000000000..c8efe7b31d51
> > --- /dev/null
> > +++ b/Platform/ARM/N1SdpPkg/N1SdpPlatform.dec
> > @@ -0,0 +1,31 @@
> > +#
> > +#  Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
> > +#
> > +#  SPDX-License-Identifier: BSD-2-Clause-Patent #
> > +
> > +[Defines]
> > +  DEC_SPECIFICATION              = 0x0001001A
> > +  PACKAGE_NAME                   = N1SdpPkg
> > +  PACKAGE_GUID                   = b6d2d197-76d0-401f-a3e0-826a26f350c9
> > +  PACKAGE_VERSION                = 0.1
> > +
> >
> +#########################################################
> ############
> > +###########
> > +#
> > +# Include Section - list of Include Paths that are provided by this package.
> > +#                   Comments are used for Keywords and Module Types.
> > +#
> >
> +#########################################################
> ############
> > +###########
> > +[Includes.common]
> > +  Include                        # Root include for the package
> > +
> > +[Guids.common]
> > +  gArmN1SdpTokenSpaceGuid =  { 0xab93eb78, 0x60d7, 0x4099, { 0xac,
> > +0xeb, 0x6d, 0xb5, 0x02, 0x58, 0x7c, 0x24 } }
> > +
> > +[PcdsFixedAtBuild]
> > +
> > +  # Secondary DDR memory
> > +
> gArmN1SdpTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x00000001
> > +
> > +  # External memory
> > +
> gArmN1SdpTokenSpaceGuid.PcdExtMemorySpace|0|UINT64|0x00000002
> > diff --git a/Platform/ARM/N1SdpPkg/N1SdpPlatform.dsc
> > b/Platform/ARM/N1SdpPkg/N1SdpPlatform.dsc
> > new file mode 100644
> > index 000000000000..95552328065a
> > --- /dev/null
> > +++ b/Platform/ARM/N1SdpPkg/N1SdpPlatform.dsc
> > @@ -0,0 +1,222 @@
> > +#
> > +#  Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
> > +#
> > +#  SPDX-License-Identifier: BSD-2-Clause-Patent #
> > +
> >
> +#########################################################
> ############
> > +###########
> > +#
> > +# Defines Section - statements that will be processed to create a Makefile.
> > +#
> >
> +#########################################################
> ############
> > +###########
> > +[Defines]
> > +  PLATFORM_NAME                  = n1sdp
> > +  PLATFORM_GUID                  = 9af67d31-7de8-4a71-a9a8-a597a27659ce
> > +  PLATFORM_VERSION               = 0.1
> > +  DSC_SPECIFICATION              = 0x0001001B
> > +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> > +  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> > +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> > +  SKUID_IDENTIFIER               = DEFAULT
> > +  FLASH_DEFINITION               =
> Platform/ARM/N1SdpPkg/N1SdpPlatform.fdf
> > +  BUILD_NUMBER                   = 1
> > +
> > +!include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > +
> > +[LibraryClasses.common]
> > +  ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
> > +  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
> > +  ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
> > +
> >
> +ArmPlatformSysConfigLib|Platform/ARM/VExpressPkg/Library/ArmVExpre
> ssS
> > +ysConfigLib/ArmVExpressSysConfigLib.inf
> > +
> >
> +ArmPlatformLib|Platform/ARM/N1SdpPkg/Library/PlatformLib/PlatformLib.
> > +inf
> > +  BasePathLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> > +
> >
> +EfiResetSystemLib|ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciReset
> Sy
> > +stemLib.inf
> > +
> >
> +NorFlashPlatformLib|Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashL
> > +ib.inf
> > +  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> > +  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
> > +
> > +[LibraryClasses.common.SEC]
> > +  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> > +
> >
> +MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemor
> yAl
> > +locationLib.inf
> > +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > +  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> > +
> > +PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/
> > +PeiServicesTablePointerLib.inf
> > +
> > +[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
> > +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> > +  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> > +
> >
> +MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemor
> yAl
> > +locationLib.inf
> > +  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> > +  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> > +
> > +PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/
> > +PeiServicesTablePointerLib.inf
> > +
> >
> +ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/Base
> Re
> > +portStatusCodeLibNull.inf
> > +
> > +[LibraryClasses.common.PEI_CORE]
> > +
> >
> +PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.
> > +inf
> > +
> > +[LibraryClasses.common.PEIM]
> > +  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> > +
> > +[LibraryClasses.common.DXE_CORE]
> > +
> >
> +DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoi
> nt.
> > +inf
> > +  HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
> > +
> >
> +MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationL
> ib/D
> > +xeCoreMemoryAllocationLib.inf
> > +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > +
> > +[LibraryClasses.common.DXE_DRIVER]
> > +  FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
> > +
> > +[LibraryClasses.common.DXE_RUNTIME_DRIVER]
> > +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> > +  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> > +!if $(TARGET) != RELEASE
> > +
> >
> +DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDe
> bugL
> > +ibSerialPort.inf
> > +!endif
> > +
> > +[LibraryClasses.common.UEFI_DRIVER,
> > +LibraryClasses.common.UEFI_APPLICATION,
> > +LibraryClasses.common.DXE_RUNTIME_DRIVER,
> > +LibraryClasses.common.DXE_DRIVER]
> > +  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> > +
> >
> +#########################################################
> ############
> > +###########
> > +#
> > +# Pcd Section - list of all EDK II PCD Entries defined by this
> > +Platform #
> >
> +#########################################################
> ############
> > +###########
> > +
> > +[PcdsFixedAtBuild.common]
> > +  gArmTokenSpaceGuid.PcdVFPEnabled|1
> > +
> > +  # Stacks for MPCores in Normal World
> > +  gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x80000000
> > +  gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x40000
> > +  gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x0
> > +
> > +  # System Memory (2GB) - Reserved Secure Memory (16MB)
> > +  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
> > +  gArmTokenSpaceGuid.PcdSystemMemorySize|(0x80000000 -
> 0x01000000)
> > +
> > +  # Secondary DDR memory (14 GB)
> > +  gArmN1SdpTokenSpaceGuid.PcdDramBlock2Base|0x8080000000
> > +
> > +  # External memory
> > +  gArmN1SdpTokenSpaceGuid.PcdExtMemorySpace|0x40000000000
> > +
> > +  # GIC Base Addresses
> > +  gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C000000
> > +  gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
> > +  gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
> > +
> > +  # PL011 - Serial Terminal
> > +  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x2A400000
> > +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
> > +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
> > +  gArmPlatformTokenSpaceGuid.PL011UartClkInHz|50000000
> > +  gArmPlatformTokenSpaceGuid.PL011UartInterrupt|95
> > +
> > +  # PL011 Serial Debug UART (DBG2)
> > +
> > +
> gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase|gEfiMdeModuleP
> kg
> > + TokenSpaceGuid.PcdSerialRegisterBase
> > +
> > +
> gArmPlatformTokenSpaceGuid.PcdSerialDbgUartBaudRate|gEfiMdePkgToke
> nS
> > + paceGuid.PcdUartDefaultBaudRate
> > +  gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz|50000000
> > +
> > +  # SBSA Watchdog
> > +  gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93
> > +
> > +  # PL031 RealTimeClock
> > +  gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C100000
> > +
> > +  # List of Device Paths that support BootMonFs
> > +
> gArmBootMonFsTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"
> VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
> > +
>
> Does N1SDP actually use this?

No, this was not used. This will be removed.

>
> > +  # ARM OS Loader
> > +  gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
> > +
> > +  # ARM Architectural Timer Frequency
> > +  gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
> > +  gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
> > +  gEmbeddedTokenSpaceGuid.PcdTimerPeriod|1000
> > +
> > +  # ARM Cores and Clusters
> > +  gArmPlatformTokenSpaceGuid.PcdCoreCount|2
> > +  gArmPlatformTokenSpaceGuid.PcdClusterCount|2
> > +
> > +  # Runtime Variable storage
> > +
> gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
> > +
> gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
> > +  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
> > +  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
> > +
>
> Does this mean you don't have NOR flash?

The NOR flash is not accessible by the application cores. So for this initial version of the patches, the emu variables are used.

>
> >
> +#########################################################
> ############
> > +###########
> > +#
> > +# Components Section - list of all EDK II Modules needed by this
> > +Platform #
> >
> +#########################################################
> ############
> > +###########
> > +[Components.common]
> > +
> > +  # PEI Phase modules
> > +  ArmPkg/Drivers/CpuPei/CpuPei.inf
> > +  ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
> > +  ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
> > +  ArmPlatformPkg/PlatformPei/PlatformPeim.inf
> > +  MdeModulePkg/Core/Pei/PeiMain.inf
> > +  MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
> > +    <LibraryClasses>
> > +      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > +  }
> > +  MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> > +  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
> > +    <LibraryClasses>
> > +
> > +
> NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDec
> ompre
> > + ssLib.inf
> > +  }
> > +
> > +  # DXE
> > +  MdeModulePkg/Core/Dxe/DxeMain.inf {
> > +    <LibraryClasses>
> > +
> NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32G
> uidedSectionExtractLib.inf
> > +    <PcdsFixedAtBuild>
> > +      gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
> > +  }
> > +
> > +  # Architectural Protocols
> > +  ArmPkg/Drivers/CpuDxe/CpuDxe.inf
> > +  ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
> > +  ArmPkg/Drivers/TimerDxe/TimerDxe.inf
> > +  ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
> > +
> EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
> > +  EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
> > +  EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
>
> Please use the MdeModulePkg version of this driver

Okay,

>
> > +  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> > +  MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> > +
> > +
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCoun
> terRu
> > + ntimeDxe.inf
> > + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> > +
> MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
> > +  MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
> > +
> > +
> MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleD
> xe
> > + .inf  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> > +  MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> > +
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
> > +    <LibraryClasses>
> > +      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
> > +
> BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> > +  }
> > +
> > +  # FAT filesystem + GPT/MBR partitioning
> > + MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
> > +  MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> > +
> > +
> MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.i
> > + nf
> > +  FatPkg/EnhancedFatDxe/Fat.inf
> > +
> > +  # Bds
> > +  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> > +  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
> > +  MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
> > +  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
> > +  MdeModulePkg/Application/UiApp/UiApp.inf {
> > +    <LibraryClasses>
> > +
> NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
> > +
> NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
> > +
> NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMainte
> nanceManagerUiLib.inf
> > +      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>
> WHy do you need to override this?

Yes, it is not required, it will be removed.

Thanks,
Pranav

<...>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61753): https://edk2.groups.io/g/devel/message/61753
Mute This Topic: https://groups.io/mt/73241665/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list