diff options
author | zwei4 <david.wei@intel.com> | 2017-05-26 11:13:42 +0800 |
---|---|---|
committer | zwei4 <david.wei@intel.com> | 2017-05-26 11:13:42 +0800 |
commit | 673afaa1174832eeab98ccfd89e7d1504aecc1f5 (patch) | |
tree | 2bdb88319c033b7427600d5336fa11fc9504dd9e /Platform | |
parent | 22c9d0932dca0d0d959faf8399c8f220ba5ff7d2 (diff) | |
download | edk2-platforms-673afaa1174832eeab98ccfd89e7d1504aecc1f5.tar.xz |
GCC build support.
Change code which is not compatible with GCC.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: zwei4 <david.wei@intel.com>
Diffstat (limited to 'Platform')
14 files changed, 77 insertions, 21 deletions
diff --git a/Platform/BroxtonPlatformPkg/BiosId.env b/Platform/BroxtonPlatformPkg/BiosId.env index 2bf5bada98..18b4e01905 100644 --- a/Platform/BroxtonPlatformPkg/BiosId.env +++ b/Platform/BroxtonPlatformPkg/BiosId.env @@ -33,3 +33,4 @@ OEM_ID = X64 BUILD_TYPE = D
VERSION_MAJOR = 0064
VERSION_MINOR = 01
+BOARD_EXT = X64
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBios.sh index cadffc70da..fb6ac670d5 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -317,7 +317,7 @@ cat SpiChunk1.bin IBBL.Fv IBB.Fv SpiChunk2.bin OBB.Fv NvStorage.Fv SpiChunk3.bin popd echo -echo SPI IFWI location: $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/$BIOS_Name"_GCC".bin +echo Check if SPI IFWI image is generated at below location: +echo $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/$BIOS_Name"_GCC".bin echo -echo -------------------- The EDKII BIOS build has successfully completed. -------------------- echo diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh index bf91b5c182..a319bd3eed 100755 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -163,6 +163,7 @@ echo "Build_IFWI: Calling BIOS build Script..." sh Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flags $Platform_Type $Build_Target echo -echo Finished Building BIOS. +echo Finished Building Process. +echo diff --git a/Platform/BroxtonPlatformPkg/Common/Features/S3/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c b/Platform/BroxtonPlatformPkg/Common/Features/S3/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c index ef45fdb6bf..40655c2f65 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/S3/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/S3/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c @@ -45,6 +45,7 @@ CPU_INFO_PROTOCOL *mCpuInfoProtocol; **/
EFI_STATUS
+EFIAPI
SmramSaveInfoHandler (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_SW_REGISTER_CONTEXT *DispatchContext
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c index 68d68d3272..41c59f1930 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c @@ -756,6 +756,7 @@ UpdatePlatformInformation ( **/
VOID
+EFIAPI
AddSmbiosT0x94Callback (
IN EFI_EVENT Event,
IN VOID *Context
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PlatformSecLib/Ia32/SecEntry.S b/Platform/BroxtonPlatformPkg/Common/Library/PlatformSecLib/Ia32/SecEntry.S index 03467674ba..8b0036751f 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PlatformSecLib/Ia32/SecEntry.S +++ b/Platform/BroxtonPlatformPkg/Common/Library/PlatformSecLib/Ia32/SecEntry.S @@ -207,6 +207,7 @@ ASM_PFX (PlatformInitialization): #
movl $0x121, %ecx
movl $(BIT16 + ACPI_BASE_ADDRESS + R_ACPI_PM1_TMR), %eax # Bit 16 is enable and 15:0 address
+ movl $0x2FBA2E25, %edx
wrmsr
#
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c index 91334f9e71..7d84e26b76 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c @@ -31,6 +31,7 @@ #endif
EFI_STATUS
+EFIAPI
CpuS3SmmAccessNotifyCallback (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
@@ -545,6 +546,7 @@ PeiGetSectionFromFv ( EFI_STATUS
+EFIAPI
CpuS3SmmAccessNotifyCallback (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
@@ -571,6 +573,7 @@ CpuS3SmmAccessNotifyCallback ( **/
EFI_STATUS
+EFIAPI
EndOfPeiPpiNotifyCallback (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.h b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.h index c931b07ff3..5bde26321d 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.h +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.h @@ -153,6 +153,7 @@ GetSleepTypeAfterWakeup ( );
EFI_STATUS
+EFIAPI
EndOfPeiPpiNotifyCallback (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInit.h b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInit.h index c931b07ff3..5bde26321d 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInit.h +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInit.h @@ -153,6 +153,7 @@ GetSleepTypeAfterWakeup ( );
EFI_STATUS
+EFIAPI
EndOfPeiPpiNotifyCallback (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c index b0c96267d0..024384fe85 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c @@ -78,6 +78,7 @@ DevicePathSize ( );
EFI_STATUS
+EFIAPI
S5SleepWakeOnRtcCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -441,6 +442,7 @@ Stall ( EFI_STATUS
+EFIAPI
SmmReadyToBootCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -484,6 +486,7 @@ SmmReadyToBootCallback ( **/
EFI_STATUS
+EFIAPI
SxSleepEntryCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -623,6 +626,7 @@ SetAfterG3On ( **/
EFI_STATUS
+EFIAPI
PowerButtonCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -681,6 +685,7 @@ PowerButtonCallback ( VOID
+EFIAPI
PmeCallback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
@@ -691,6 +696,7 @@ PmeCallback ( EFI_STATUS
+EFIAPI
S5SleepAcLossCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -711,6 +717,7 @@ S5SleepAcLossCallBack ( EFI_STATUS
+EFIAPI
S4S5CallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -754,6 +761,7 @@ S4S5CallBack ( **/
EFI_STATUS
+EFIAPI
EnableAcpiCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -822,6 +830,7 @@ EnableAcpiCallback ( **/
EFI_STATUS
+EFIAPI
DisableAcpiCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -843,6 +852,7 @@ DisableAcpiCallback ( VOID
+EFIAPI
DummyTco1Callback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
@@ -877,6 +887,7 @@ DevicePathSize ( EFI_STATUS
+EFIAPI
S5SleepWakeOnRtcCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -1064,6 +1075,7 @@ BcdToHex( **/
EFI_STATUS
+EFIAPI
TpmPtsSmbsCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/SmmPlatform.h b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/SmmPlatform.h index 0689f31647..44c1cc4b82 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/SmmPlatform.h +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/SmmPlatform.h @@ -1,7 +1,7 @@ /** @file
Header file for Platform Smm driver.
- Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -108,6 +108,7 @@ typedef struct { // Callback function prototypes
//
EFI_STATUS
+EFIAPI
PowerButtonCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -116,6 +117,7 @@ PowerButtonCallback ( );
EFI_STATUS
+EFIAPI
S5SleepWakeOnLanCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -124,6 +126,7 @@ S5SleepWakeOnLanCallBack ( );
EFI_STATUS
+EFIAPI
S5SleepAcLossCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -133,6 +136,7 @@ S5SleepAcLossCallBack ( EFI_STATUS
+EFIAPI
S4S5CallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -141,6 +145,7 @@ S4S5CallBack ( );
EFI_STATUS
+EFIAPI
EnableAcpiCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -149,6 +154,7 @@ EnableAcpiCallback ( );
EFI_STATUS
+EFIAPI
DisableAcpiCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -157,6 +163,7 @@ DisableAcpiCallback ( );
EFI_STATUS
+EFIAPI
SmmReadyToBootCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -165,18 +172,21 @@ SmmReadyToBootCallback ( );
VOID
+EFIAPI
DummyTco1Callback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
);
VOID
+EFIAPI
PmeCallback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
);
VOID
+EFIAPI
PerrSerrCallback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
@@ -184,6 +194,7 @@ PerrSerrCallback ( VOID
+EFIAPI
EnableWatchdogCallback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
@@ -199,6 +210,7 @@ TurnOffVregUsb ( );
EFI_STATUS
+EFIAPI
SxSleepEntryCallBack (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
@@ -212,6 +224,7 @@ SaveRuntimeScriptTable ( );
EFI_STATUS
+EFIAPI
TpmPtsSmbsCallback (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *DispatchContext,
diff --git a/Platform/BroxtonPlatformPkg/DefineAtBuildMacros.dsc b/Platform/BroxtonPlatformPkg/DefineAtBuildMacros.dsc index d9290217cc..e5ee4c1b4c 100644 --- a/Platform/BroxtonPlatformPkg/DefineAtBuildMacros.dsc +++ b/Platform/BroxtonPlatformPkg/DefineAtBuildMacros.dsc @@ -1,4 +1,11 @@ -DEFINE ENBDT_PF_BUILD = TRUE
-DEFINE SOURCE_DEBUG_ENABLE = FALSE
-DEFINE APLK_SETUP_ENABLE_BUILD = TRUE
-DEFINE X64_CONFIG = TRUE
+DEFINE ENBDT_PF_BUILD = TRUE +DEFINE TABLET_PF_BUILD = FALSE +DEFINE BYTI_PF_BUILD = FALSE +DEFINE CSLE_ENABLE = FALSE +DEFINE VP_BIOS_ENABLE = FALSE +DEFINE SV_BIOS_ENABLE = FALSE +DEFINE PPV_BIOS_ENABLE = FALSE +DEFINE RVVP_BIOS_ENABLE = FALSE +DEFINE RVV_BIOS_ENABLE = FALSE +DEFINE SOURCE_DEBUG_ENABLE = FALSE +DEFINE X64_CONFIG = TRUE diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc index a58086138a..13225761c1 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc @@ -31,6 +31,18 @@ <LibraryClasses>
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
}
+
+ UefiCpuPkg/CpuDxe/CpuDxe.inf {
+ <LibraryClasses>
+ CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+ MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
+ LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
+ UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+ SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+ }
+
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf index 7522153a3e..ac09ac3291 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf @@ -170,14 +170,7 @@ !if $(SECURE_BOOT_ENABLE)
FILE = $(WORKSPACE)/Platform/$(PLATFORM_PACKAGE_COMMON)/Binaries/Prebuild/X64/VpdBlockSecBoot.bin
!else
- !if $(TOOL_CHAIN_TAG) != GCC47
FILE = $(WORKSPACE)/Platform/$(PLATFORM_PACKAGE_COMMON)/Binaries/Prebuild/X64/VpdBlock.bin
- !else
- #
- # Temporary solution for not having FCE linux version
- #
- FILE = $(WORKSPACE)/Platform/$(PLATFORM_PACKAGE_COMMON)/Binaries/Prebuild/X64/VpdBlockVar.bin
- !endif
!endif
$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE)
@@ -501,16 +494,23 @@ APRIORI DXE { INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
!endif
+!if $(TOOL_CHAIN_TAG) == GCC5
+ INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+!else
INF $(PLATFORM_SI_PACKAGE)/Cpu/CpuInit/Dxe/CpuInitDxe.inf
+!endif
+
INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
- INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspNotifyDxe/FspNotifyDxe.inf
+!if $(TOOL_CHAIN_TAG) != GCC5
+ INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspNotifyDxe/FspNotifyDxe.inf
+!endif
- !if $(SMM_VARIABLE_ENABLE)
- INF $(PLATFORM_SI_PACKAGE)/VariableStorage/Dxe/CseVariableStorageSmmRuntimeDxe/CseVariableStorageSmmRuntimeDxe.inf
- !else
- INF $(PLATFORM_SI_PACKAGE)/VariableStorage/Dxe/CseVariableStorageSmmRuntimeDxe/CseVariableStorageRuntimeDxe.inf
- !endif
+!if $(SMM_VARIABLE_ENABLE)
+ INF $(PLATFORM_SI_PACKAGE)/VariableStorage/Dxe/CseVariableStorageSmmRuntimeDxe/CseVariableStorageSmmRuntimeDxe.inf
+!else
+ INF $(PLATFORM_SI_PACKAGE)/VariableStorage/Dxe/CseVariableStorageSmmRuntimeDxe/CseVariableStorageRuntimeDxe.inf
+!endif
!if $(SMM_VARIABLE_ENABLE)
@@ -557,7 +557,9 @@ APRIORI DXE { INF $(PLATFORM_PACKAGE_COMMON)/PlatformSettings/PlatformInfoDxe/PlatformInfoDxe.inf
#INF $(TABLET_PLATFORM_PACKAGE)/PlatformCpuInfo/PlatformCpuInfoDxe.inf
INF $(PLATFORM_PACKAGE_COMMON)/SaveMemoryConfigDxe/SaveMemoryConfigDxe.inf
+!if $(TOOL_CHAIN_TAG) != GCC5
INF $(PLATFORM_PACKAGE_COMMON)/Features/S3/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf
+!endif
!if $(GOP_DRIVER_ENABLE) == TRUE
INF $(PLATFORM_PACKAGE_COMMON)/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf
|