[edk2] [PATCH v2 2/4] Platform/Hisilicon/HiKey: use Hisilicon common file

Haojian Zhuang posted 4 patches 6 years, 10 months ago
[edk2] [PATCH v2 2/4] Platform/Hisilicon/HiKey: use Hisilicon common file
Posted by Haojian Zhuang 6 years, 10 months ago
Use common file Hisilicon.dsc.inc/Hisilicon.fdf.inc to reduce
redundant contents in both HiKey.dsc and HiKey.fdf.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
---
 Platform/Hisilicon/HiKey/HiKey.dsc | 204 +++----------------------------------
 Platform/Hisilicon/HiKey/HiKey.fdf | 141 ++-----------------------
 2 files changed, 19 insertions(+), 326 deletions(-)

diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc
index c7d931e..b0f8a93 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dsc
+++ b/Platform/Hisilicon/HiKey/HiKey.dsc
@@ -20,152 +20,55 @@
   PLATFORM_GUID                  = 8edf1480-da5c-4857-bc02-7530bd8e7b7a
   PLATFORM_VERSION               = 0.2
   DSC_SPECIFICATION              = 0x00010019
-  OUTPUT_DIRECTORY               = Build/HiKey
+  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
-  FLASH_DEFINITION               = Platform/Hisilicon/HiKey/HiKey.fdf
+  FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
 
-[LibraryClasses.common]
-!if $(TARGET) == RELEASE
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-!else
-  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-!endif
-  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
-
-  ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
-  ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
-  ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
-  ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
-  ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
-  ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
+!include Silicon/Hisilicon/Hisilicon.dsc.inc
 
+[LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
-  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
-  ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
-
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
-  DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
-  CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
-  CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
-  DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
-
-  FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+
   PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
-  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
 
-  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-
   # UiApp dependencies
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
 
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
-  UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-
-  PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
   SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
   RealTimeClockLib|ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
   TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
 
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-
-  #
-  # Assume everything is fixed at build
-  #
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-
-  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-  PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
   # USB Requirements
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
 
   # Network Libraries
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
   NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
 
-  # It is not possible to prevent compilers from generating calls to generic
-  # intrinsic functions. This library provides the intrinsic functions
-  # generated by a given compiler.
-  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-  # Add support for GCC stack protector
-  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
-
 [LibraryClasses.common.SEC]
   PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
-  LzmaDecompressLib|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
-  MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
   HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
-  PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
-  PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
-  PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
+  MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
   MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf
-  ArmGicArchLib|ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf
-  DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf
-
-[LibraryClasses.common.DXE_CORE]
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
-  MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER]
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
-  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
+  PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
+  PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
 
 [BuildOptions]
   GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/Silicon/Hisilicon/Hi6220/Include -I$(WORKSPACE)/Platform/Hisilicon/HiKey/Include
 
-[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
-  GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
-
 ################################################################################
 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
@@ -173,95 +76,15 @@
 ################################################################################
 
 [PcdsFeatureFlag.common]
-  # Use the Vector Table location in CpuDxe. We will not copy the Vector Table at PcdCpuVectorBaseAddress
-  gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE
-
-  gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
-
-  ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
+  #  If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
   #  It could be set FALSE to save size.
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE
 
-  gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
-
 [PcdsFixedAtBuild.common]
-  gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
-  gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
-  gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000
-  gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
-  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
-  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|1
-  gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0
-  gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
-
-  # DEBUG_ASSERT_ENABLED       0x01
-  # DEBUG_PRINT_ENABLED        0x02
-  # DEBUG_CODE_ENABLED         0x04
-  # CLEAR_MEMORY_ENABLED       0x08
-  # ASSERT_BREAKPOINT_ENABLED  0x10
-  # ASSERT_DEADLOOP_ENABLED    0x20
-!if $(TARGET) == RELEASE
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
-!else
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
-!endif
-
-  #  DEBUG_INIT      0x00000001  // Initialization
-  #  DEBUG_WARN      0x00000002  // Warnings
-  #  DEBUG_LOAD      0x00000004  // Load events
-  #  DEBUG_FS        0x00000008  // EFI File system
-  #  DEBUG_POOL      0x00000010  // Alloc & Free's
-  #  DEBUG_PAGE      0x00000020  // Alloc & Free's
-  #  DEBUG_INFO      0x00000040  // Verbose
-  #  DEBUG_DISPATCH  0x00000080  // PEI/DXE Dispatchers
-  #  DEBUG_VARIABLE  0x00000100  // Variable
-  #  DEBUG_BM        0x00000400  // Boot Manager
-  #  DEBUG_BLKIO     0x00001000  // BlkIo Driver
-  #  DEBUG_NET       0x00004000  // SNI Driver
-  #  DEBUG_UNDI      0x00010000  // UNDI Driver
-  #  DEBUG_LOADFILE  0x00020000  // Load File
-  #  DEBUG_EVENT     0x00080000  // Event messages
-  #  DEBUG_GCD       0x00100000  // Global Coherency Database changes
-  #  DEBUG_CACHE     0x00200000  // Memory range cachability changes
-  #  DEBUG_ERROR     0x80000000  // Error
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
-
-  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
-
-  #
-  # Optional feature to help prevent EFI memory map fragments
-  # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob
-  # Values are in EFI Pages (4K). DXE Core will make sure that
-  # at least this much of each type of memory can be allocated
-  # from a single memory range. This way you only end up with
-  # maximum of two fragements for each type in the memory map
-  # (the memory used, and the free memory that was prereserved
-  # but not used).
-  #
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|80
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|65
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|400
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|20000
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
-  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
-
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha"
 
-  #
-  # NV Storage PCDs.
-  #
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x30000000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x30010000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x30020000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000
-
   # System Memory (1GB)
   gArmTokenSpaceGuid.PcdSystemMemoryBase|0x00000000
   gArmTokenSpaceGuid.PcdSystemMemorySize|0x3E000000
@@ -270,8 +93,6 @@
   gArmPlatformTokenSpaceGuid.PcdCoreCount|8
   gArmPlatformTokenSpaceGuid.PcdClusterCount|2
 
-  gArmTokenSpaceGuid.PcdVFPEnabled|1
-
   #
   # ARM PrimeCell
   #
@@ -324,13 +145,14 @@
   # PEI Phase modules
   #
   ArmPlatformPkg/PrePi/PeiUniCore.inf
+  MdeModulePkg/Core/Pei/PeiMain.inf
+  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
 
   #
   # DXE
   #
   MdeModulePkg/Core/Dxe/DxeMain.inf {
     <LibraryClasses>
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
   }
 
diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf b/Platform/Hisilicon/HiKey/HiKey.fdf
index f74d868..2a5c5a4 100644
--- a/Platform/Hisilicon/HiKey/HiKey.fdf
+++ b/Platform/Hisilicon/HiKey/HiKey.fdf
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2014-2017, Linaro Limited. All rights reserved.
+#  Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -66,7 +66,6 @@ FV = FVMAIN_COMPACT
 ################################################################################
 
 [FV.FvMain]
-FvNameGuid         = 69b7d469-55a2-49d8-a426-42bfb22f5b9d
 BlockSize          = 0x40
 NumBlocks          = 0         # This FV gets compressed so make it just big enough
 FvAlignment        = 8         # FV alignment and FV attributes setting.
@@ -86,6 +85,10 @@ READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
+  APRIORI DXE {
+    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  }
+
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
 
   #
@@ -219,136 +222,4 @@ READ_LOCK_STATUS   = TRUE
     }
   }
 
-
-################################################################################
-#
-# Rules are use with the [FV] section's module INF type to define
-# how an FFS file is created for a given INF file. The following Rule are the default
-# rules for the different module type. User can add the customized rules to define the
-# content of the FFS file.
-#
-################################################################################
-
-
-############################################################################
-# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section   #
-############################################################################
-#
-#[Rule.Common.DXE_DRIVER]
-#  FILE DRIVER = $(NAMED_GUID) {
-#    DXE_DEPEX    DXE_DEPEX               Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
-#    COMPRESS PI_STD {
-#      GUIDED {
-#        PE32     PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
-#        UI       STRING="$(MODULE_NAME)" Optional
-#        VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-#      }
-#    }
-#  }
-#
-############################################################################
-
-#
-# These SEC rules are used for ArmPlatformPkg/PrePi module.
-# ArmPlatformPkg/PrePi is declared as a SEC module to make GenFv patch the
-# UEFI Firmware to jump to ArmPlatformPkg/PrePi entrypoint
-#
-[Rule.ARM.SEC]
-  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
-    TE  TE    Align = 32                $(INF_OUTPUT)/$(MODULE_NAME).efi
-  }
-
-[Rule.AARCH64.SEC]
-  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
-    TE  TE    Align = 4K                $(INF_OUTPUT)/$(MODULE_NAME).efi
-  }
-
-# A shim specific rule is required to ensure the alignment is 4K.
-# Otherwise BaseTools pick up the AArch32 alignment (ie: 32)
-[Rule.ARM.SEC.SHIM]
-  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
-    TE  TE    Align = 4K                $(INF_OUTPUT)/$(MODULE_NAME).efi
-  }
-
-[Rule.Common.PEI_CORE]
-  FILE PEI_CORE = $(NAMED_GUID) {
-    TE     TE                           $(INF_OUTPUT)/$(MODULE_NAME).efi
-    UI     STRING ="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.PEIM]
-  FILE PEIM = $(NAMED_GUID) {
-     PEI_DEPEX PEI_DEPEX Optional       $(INF_OUTPUT)/$(MODULE_NAME).depex
-     TE       TE                        $(INF_OUTPUT)/$(MODULE_NAME).efi
-     UI       STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-    PEI_DEPEX PEI_DEPEX Optional        $(INF_OUTPUT)/$(MODULE_NAME).depex
-    GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-      PE32      PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
-      UI        STRING="$(MODULE_NAME)" Optional
-    }
-  }
-
-[Rule.Common.DXE_CORE]
-  FILE DXE_CORE = $(NAMED_GUID) {
-    PE32     PE32                       $(INF_OUTPUT)/$(MODULE_NAME).efi
-    UI       STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.UEFI_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
-    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
-    UI           STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.DXE_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
-    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
-    UI           STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.DXE_DRIVER.BINARY]
-  FILE DRIVER = $(NAMED_GUID) {
-  DXE_DEPEX    DXE_DEPEX              Optional |.depex
-  PE32         PE32                   |.efi
-  UI           STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.DXE_RUNTIME_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
-    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
-    UI           STRING="$(MODULE_NAME)" Optional
-  }
-
-[Rule.Common.UEFI_APPLICATION]
-  FILE APPLICATION = $(NAMED_GUID) {
-    UI     STRING ="$(MODULE_NAME)" Optional
-    PE32   PE32                         $(INF_OUTPUT)/$(MODULE_NAME).efi
-  }
-
-[Rule.Common.UEFI_DRIVER.BINARY]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX DXE_DEPEX Optional      |.depex
-    PE32      PE32                    |.efi
-    UI        STRING="$(MODULE_NAME)" Optional
-    VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.UEFI_APPLICATION.BINARY]
-  FILE APPLICATION = $(NAMED_GUID) {
-    PE32      PE32                    |.efi
-    UI        STRING="$(MODULE_NAME)" Optional
-    VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.USER_DEFINED.ACPITABLE]
-  FILE FREEFORM = $(NAMED_GUID) {
-    RAW ACPI               |.acpi
-    RAW ASL                |.aml
-  }
+!include Silicon/Hisilicon/Hisilicon.fdf.inc
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 2/4] Platform/Hisilicon/HiKey: use Hisilicon common file
Posted by Leif Lindholm 6 years, 10 months ago
On Sat, Feb 10, 2018 at 01:31:05AM +0800, Haojian Zhuang wrote:
> Use common file Hisilicon.dsc.inc/Hisilicon.fdf.inc to reduce
> redundant contents in both HiKey.dsc and HiKey.fdf.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Platform/Hisilicon/HiKey/HiKey.dsc | 204 +++----------------------------------
>  Platform/Hisilicon/HiKey/HiKey.fdf | 141 ++-----------------------
>  2 files changed, 19 insertions(+), 326 deletions(-)
> 
> diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc
> index c7d931e..b0f8a93 100644
> --- a/Platform/Hisilicon/HiKey/HiKey.dsc
> +++ b/Platform/Hisilicon/HiKey/HiKey.dsc
> @@ -20,152 +20,55 @@
>    PLATFORM_GUID                  = 8edf1480-da5c-4857-bc02-7530bd8e7b7a
>    PLATFORM_VERSION               = 0.2
>    DSC_SPECIFICATION              = 0x00010019
> -  OUTPUT_DIRECTORY               = Build/HiKey
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
>    SUPPORTED_ARCHITECTURES        = AARCH64
>    BUILD_TARGETS                  = DEBUG|RELEASE
>    SKUID_IDENTIFIER               = DEFAULT
> -  FLASH_DEFINITION               = Platform/Hisilicon/HiKey/HiKey.fdf
> +  FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
>  
> -[LibraryClasses.common]
> -!if $(TARGET) == RELEASE
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -!else
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!endif
> -  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
> -
> -  ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
> -  ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
> -  ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
> -  ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
> -  ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
> -  ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
> +!include Silicon/Hisilicon/Hisilicon.dsc.inc
>  
> +[LibraryClasses.common]
>    ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
> -  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
>    ArmPlatformLib|Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
> -  ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
> -
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
> -  DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
> -  CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
> -  CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> -  DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
> -  ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf
> -  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
> -
> -  FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
> +
>    CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
>    UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> +
>    PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> -  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>  
> -  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> -  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> -  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> -
>    # UiApp dependencies
>    ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
>    DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> +  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
>  
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> -  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
> -  UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
> -  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> -  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> -
> -  PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
>    SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
>    RealTimeClockLib|ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
>    TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
>  
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -
> -  #
> -  # Assume everything is fixed at build
> -  #
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -
> -  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> -  PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
> -  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> -  PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> -  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> -
>    # USB Requirements
>    UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
>  
>    # Network Libraries
> -  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
>    NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
>    DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
>    IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
>    UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
>  
> -  # It is not possible to prevent compilers from generating calls to generic
> -  # intrinsic functions. This library provides the intrinsic functions
> -  # generated by a given compiler.
> -  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -  # Add support for GCC stack protector
> -  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> -
>  [LibraryClasses.common.SEC]
>    PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
>    ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
> -  LzmaDecompressLib|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
> -  MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
>    HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
> -  PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
> -  PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> -  PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
> +  MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
>    MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf
> -  ArmGicArchLib|ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf
> -  DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf
> -
> -[LibraryClasses.common.DXE_CORE]
> -  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -  HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
> -  MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
> -  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
> -
> -[LibraryClasses.common.UEFI_DRIVER]
> -  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
> -
> -[LibraryClasses.common.DXE_DRIVER]
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
> -  SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
> -
> -[LibraryClasses.common.DXE_RUNTIME_DRIVER]
> -  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
> +  PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
> +  PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
>  
>  [BuildOptions]
>    GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/Silicon/Hisilicon/Hi6220/Include -I$(WORKSPACE)/Platform/Hisilicon/HiKey/Include
>  
> -[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
> -  GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
> -
>  ################################################################################
>  #
>  # Pcd Section - list of all EDK II PCD Entries defined by this Platform
> @@ -173,95 +76,15 @@
>  ################################################################################
>  
>  [PcdsFeatureFlag.common]
> -  # Use the Vector Table location in CpuDxe. We will not copy the Vector Table at PcdCpuVectorBaseAddress
> -  gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE
> -
> -  gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
> -
> -  ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
> +  #  If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
>    #  It could be set FALSE to save size.
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE
>  
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
> -
>  [PcdsFixedAtBuild.common]
> -  gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
> -  gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
> -  gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000
> -  gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
> -  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
> -  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|1
> -  gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0
> -  gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
> -
> -  # DEBUG_ASSERT_ENABLED       0x01
> -  # DEBUG_PRINT_ENABLED        0x02
> -  # DEBUG_CODE_ENABLED         0x04
> -  # CLEAR_MEMORY_ENABLED       0x08
> -  # ASSERT_BREAKPOINT_ENABLED  0x10
> -  # ASSERT_DEADLOOP_ENABLED    0x20
> -!if $(TARGET) == RELEASE
> -  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
> -!else
> -  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
> -!endif
> -
> -  #  DEBUG_INIT      0x00000001  // Initialization
> -  #  DEBUG_WARN      0x00000002  // Warnings
> -  #  DEBUG_LOAD      0x00000004  // Load events
> -  #  DEBUG_FS        0x00000008  // EFI File system
> -  #  DEBUG_POOL      0x00000010  // Alloc & Free's
> -  #  DEBUG_PAGE      0x00000020  // Alloc & Free's
> -  #  DEBUG_INFO      0x00000040  // Verbose
> -  #  DEBUG_DISPATCH  0x00000080  // PEI/DXE Dispatchers
> -  #  DEBUG_VARIABLE  0x00000100  // Variable
> -  #  DEBUG_BM        0x00000400  // Boot Manager
> -  #  DEBUG_BLKIO     0x00001000  // BlkIo Driver
> -  #  DEBUG_NET       0x00004000  // SNI Driver
> -  #  DEBUG_UNDI      0x00010000  // UNDI Driver
> -  #  DEBUG_LOADFILE  0x00020000  // Load File
> -  #  DEBUG_EVENT     0x00080000  // Event messages
> -  #  DEBUG_GCD       0x00100000  // Global Coherency Database changes
> -  #  DEBUG_CACHE     0x00200000  // Memory range cachability changes
> -  #  DEBUG_ERROR     0x80000000  // Error
> -  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
> -
> -  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
> -
> -  #
> -  # Optional feature to help prevent EFI memory map fragments
> -  # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob
> -  # Values are in EFI Pages (4K). DXE Core will make sure that
> -  # at least this much of each type of memory can be allocated
> -  # from a single memory range. This way you only end up with
> -  # maximum of two fragements for each type in the memory map
> -  # (the memory used, and the free memory that was prereserved
> -  # but not used).
> -  #
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|80
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|65
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|400
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|20000
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
> -  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
> -
>    gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
>  
>    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha"
>  
> -  #
> -  # NV Storage PCDs.
> -  #
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x30000000
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x30010000
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x30020000
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000
> -
>    # System Memory (1GB)
>    gArmTokenSpaceGuid.PcdSystemMemoryBase|0x00000000
>    gArmTokenSpaceGuid.PcdSystemMemorySize|0x3E000000
> @@ -270,8 +93,6 @@
>    gArmPlatformTokenSpaceGuid.PcdCoreCount|8
>    gArmPlatformTokenSpaceGuid.PcdClusterCount|2
>  
> -  gArmTokenSpaceGuid.PcdVFPEnabled|1
> -
>    #
>    # ARM PrimeCell
>    #
> @@ -324,13 +145,14 @@
>    # PEI Phase modules
>    #
>    ArmPlatformPkg/PrePi/PeiUniCore.inf
> +  MdeModulePkg/Core/Pei/PeiMain.inf
> +  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
>  
>    #
>    # DXE
>    #
>    MdeModulePkg/Core/Dxe/DxeMain.inf {
>      <LibraryClasses>
> -      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
>        NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
>    }
>  
> diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf b/Platform/Hisilicon/HiKey/HiKey.fdf
> index f74d868..2a5c5a4 100644
> --- a/Platform/Hisilicon/HiKey/HiKey.fdf
> +++ b/Platform/Hisilicon/HiKey/HiKey.fdf
> @@ -1,5 +1,5 @@
>  #
> -#  Copyright (c) 2014-2017, Linaro Limited. All rights reserved.
> +#  Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
>  #
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the BSD License
> @@ -66,7 +66,6 @@ FV = FVMAIN_COMPACT
>  ################################################################################
>  
>  [FV.FvMain]
> -FvNameGuid         = 69b7d469-55a2-49d8-a426-42bfb22f5b9d
>  BlockSize          = 0x40
>  NumBlocks          = 0         # This FV gets compressed so make it just big enough
>  FvAlignment        = 8         # FV alignment and FV attributes setting.
> @@ -86,6 +85,10 @@ READ_STATUS        = TRUE
>  READ_LOCK_CAP      = TRUE
>  READ_LOCK_STATUS   = TRUE
>  
> +  APRIORI DXE {
> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> +  }
> +
>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>  
>    #
> @@ -219,136 +222,4 @@ READ_LOCK_STATUS   = TRUE
>      }
>    }
>  
> -
> -################################################################################
> -#
> -# Rules are use with the [FV] section's module INF type to define
> -# how an FFS file is created for a given INF file. The following Rule are the default
> -# rules for the different module type. User can add the customized rules to define the
> -# content of the FFS file.
> -#
> -################################################################################
> -
> -
> -############################################################################
> -# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section   #
> -############################################################################
> -#
> -#[Rule.Common.DXE_DRIVER]
> -#  FILE DRIVER = $(NAMED_GUID) {
> -#    DXE_DEPEX    DXE_DEPEX               Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
> -#    COMPRESS PI_STD {
> -#      GUIDED {
> -#        PE32     PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
> -#        UI       STRING="$(MODULE_NAME)" Optional
> -#        VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
> -#      }
> -#    }
> -#  }
> -#
> -############################################################################
> -
> -#
> -# These SEC rules are used for ArmPlatformPkg/PrePi module.
> -# ArmPlatformPkg/PrePi is declared as a SEC module to make GenFv patch the
> -# UEFI Firmware to jump to ArmPlatformPkg/PrePi entrypoint
> -#
> -[Rule.ARM.SEC]
> -  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
> -    TE  TE    Align = 32                $(INF_OUTPUT)/$(MODULE_NAME).efi
> -  }
> -
> -[Rule.AARCH64.SEC]
> -  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
> -    TE  TE    Align = 4K                $(INF_OUTPUT)/$(MODULE_NAME).efi
> -  }
> -
> -# A shim specific rule is required to ensure the alignment is 4K.
> -# Otherwise BaseTools pick up the AArch32 alignment (ie: 32)
> -[Rule.ARM.SEC.SHIM]
> -  FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
> -    TE  TE    Align = 4K                $(INF_OUTPUT)/$(MODULE_NAME).efi
> -  }
> -
> -[Rule.Common.PEI_CORE]
> -  FILE PEI_CORE = $(NAMED_GUID) {
> -    TE     TE                           $(INF_OUTPUT)/$(MODULE_NAME).efi
> -    UI     STRING ="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.PEIM]
> -  FILE PEIM = $(NAMED_GUID) {
> -     PEI_DEPEX PEI_DEPEX Optional       $(INF_OUTPUT)/$(MODULE_NAME).depex
> -     TE       TE                        $(INF_OUTPUT)/$(MODULE_NAME).efi
> -     UI       STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.PEIM.TIANOCOMPRESSED]
> -  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
> -    PEI_DEPEX PEI_DEPEX Optional        $(INF_OUTPUT)/$(MODULE_NAME).depex
> -    GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
> -      PE32      PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
> -      UI        STRING="$(MODULE_NAME)" Optional
> -    }
> -  }
> -
> -[Rule.Common.DXE_CORE]
> -  FILE DXE_CORE = $(NAMED_GUID) {
> -    PE32     PE32                       $(INF_OUTPUT)/$(MODULE_NAME).efi
> -    UI       STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.UEFI_DRIVER]
> -  FILE DRIVER = $(NAMED_GUID) {
> -    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
> -    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
> -    UI           STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.DXE_DRIVER]
> -  FILE DRIVER = $(NAMED_GUID) {
> -    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
> -    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
> -    UI           STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.DXE_DRIVER.BINARY]
> -  FILE DRIVER = $(NAMED_GUID) {
> -  DXE_DEPEX    DXE_DEPEX              Optional |.depex
> -  PE32         PE32                   |.efi
> -  UI           STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.DXE_RUNTIME_DRIVER]
> -  FILE DRIVER = $(NAMED_GUID) {
> -    DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
> -    PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
> -    UI           STRING="$(MODULE_NAME)" Optional
> -  }
> -
> -[Rule.Common.UEFI_APPLICATION]
> -  FILE APPLICATION = $(NAMED_GUID) {
> -    UI     STRING ="$(MODULE_NAME)" Optional
> -    PE32   PE32                         $(INF_OUTPUT)/$(MODULE_NAME).efi
> -  }
> -
> -[Rule.Common.UEFI_DRIVER.BINARY]
> -  FILE DRIVER = $(NAMED_GUID) {
> -    DXE_DEPEX DXE_DEPEX Optional      |.depex
> -    PE32      PE32                    |.efi
> -    UI        STRING="$(MODULE_NAME)" Optional
> -    VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
> -  }
> -
> -[Rule.Common.UEFI_APPLICATION.BINARY]
> -  FILE APPLICATION = $(NAMED_GUID) {
> -    PE32      PE32                    |.efi
> -    UI        STRING="$(MODULE_NAME)" Optional
> -    VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
> -  }
> -
> -[Rule.Common.USER_DEFINED.ACPITABLE]
> -  FILE FREEFORM = $(NAMED_GUID) {
> -    RAW ACPI               |.acpi
> -    RAW ASL                |.aml
> -  }
> +!include Silicon/Hisilicon/Hisilicon.fdf.inc
> -- 
> 2.7.4
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel