Platform/BroxtonPlatformPkg/BuildBios.bat | 2 +- .../PlatformDsc/Components.IA32.dsc | 3 +++ .../BroxtonPlatformPkg/PlatformDsc/Components.dsc | 4 ++++ Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc | 5 +++++ .../PlatformDsc/LibraryClasses.DxeCore.dsc | 6 ++++++ .../PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc | 6 ++++++ .../PlatformDsc/LibraryClasses.DxeSmmDriver.dsc | 2 ++ .../PlatformDsc/LibraryClasses.IA32.PEI.dsc | 6 +++++- .../PlatformDsc/LibraryClasses.SmmCore.dsc | 5 +++++ .../BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc | 19 ++++++------------- .../PlatformDsc/PcdsFixedAtBuild.dsc | 8 +++++++- Platform/BroxtonPlatformPkg/PlatformPkg.fdf | 8 ++++++++ Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc | 6 ++++++ Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc | 6 ++++++ Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc | 6 ++++++ .../BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c | 4 ++-- .../BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c | 4 ++-- 17 files changed, 80 insertions(+), 20 deletions(-)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: zwei4 <david.wei@intel.com>
---
Platform/BroxtonPlatformPkg/BuildBios.bat | 2 +-
.../PlatformDsc/Components.IA32.dsc | 3 +++
.../BroxtonPlatformPkg/PlatformDsc/Components.dsc | 4 ++++
Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc | 5 +++++
.../PlatformDsc/LibraryClasses.DxeCore.dsc | 6 ++++++
.../PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc | 6 ++++++
.../PlatformDsc/LibraryClasses.DxeSmmDriver.dsc | 2 ++
.../PlatformDsc/LibraryClasses.IA32.PEI.dsc | 6 +++++-
.../PlatformDsc/LibraryClasses.SmmCore.dsc | 5 +++++
.../BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc | 19 ++++++-------------
.../PlatformDsc/PcdsFixedAtBuild.dsc | 8 +++++++-
Platform/BroxtonPlatformPkg/PlatformPkg.fdf | 8 ++++++++
Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc | 6 ++++++
Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc | 6 ++++++
Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc | 6 ++++++
.../BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c | 4 ++--
.../BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c | 4 ++--
17 files changed, 80 insertions(+), 20 deletions(-)
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBios.bat
index 2ecc28d6b..7aca17650 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.bat
+++ b/Platform/BroxtonPlatformPkg/BuildBios.bat
@@ -204,7 +204,7 @@ copy /y nul %Build_Macros% >nul
::output platform specific build macros to DefineAtBuildMacros.dsc
echo DEFINE ENBDT_PF_BUILD = %ENBDT_PF_BUILD% >> %Build_Macros%
-echo DEFINE SOURCE_DEBUG_ENABLE = %SrcDebug% >> %Build_Macros%
+
echo DEFINE APLK_SETUP_ENABLE_BUILD = %APLK_SETUP_ENABLE_BUILD% >> %Build_Macros%
if "%Arch%"=="IA32" (
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
index bfc45ff2f..1341e082b 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
@@ -201,3 +201,6 @@
$(PLATFORM_PACKAGE_COMMON)/FpdtPei/FpdtPei.inf
!endif
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
+!endif
\ No newline at end of file
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
index 234c27708..04f616c36 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
@@ -32,6 +32,10 @@
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
}
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf
+!endif
+
UefiCpuPkg/CpuDxe/CpuDxe.inf {
<LibraryClasses>
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
index 842acf308..69641ced3 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
@@ -163,3 +163,8 @@
DEFINE FSP_RAM_CODE_SIZE = $(FSP_IBBM_SIZE)
DEFINE CAR_REGION_SIZE = 0x100000
+!if $(TARGET) == DEBUG
+ DEFINE SOURCE_DEBUG_ENABLE = TRUE
+!else
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
+!endif
\ No newline at end of file
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc
index 5ae62d3dc..d60c900e7 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc
@@ -30,4 +30,10 @@
TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
!endif
!endif
+
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+!else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+!endif
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc
index 75c07b151..9e13b6ff2 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc
@@ -19,3 +19,9 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
!endif
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+ !endif
+
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc
index 5a2feaaa3..643cbd0a5 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc
@@ -23,6 +23,8 @@
!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
!endif
!if $(SECURE_BOOT_ENABLE) == TRUE
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc
index 2b004019d..d4617aa42 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc
@@ -43,7 +43,11 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
SerialPortLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortLib/BaseSerialPortLib.inf
!if $(SOURCE_DEBUG_ENABLE) == TRUE
- SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
+
+!else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+
!endif
DebugLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiDebugLib/PeiDebugLib.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc
index f04345efd..e9edfff3d 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc
@@ -27,3 +27,8 @@
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
!endif
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+ !endif
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc
index b3fb10a81..a1023764e 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc
@@ -22,7 +22,7 @@
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
DxeSmmDriverEntryPoint|IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.inf
- PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
+
!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
@@ -30,6 +30,7 @@
!else
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
!endif
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
#
# Common
@@ -187,8 +188,6 @@
SerialPortLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortLib/BaseSerialPortLibNoInit.inf
!endif
- DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-
PchSerialIoUartLib|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/PeiDxeSmmPchSerialIoUartLib/PeiDxeSmmPchSerialIoUartLib.inf
PchSerialIoLib|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/PeiDxeSmmPchSerialIoLib/PeiDxeSmmPchSerialIoLib.inf
SerialPortParameterLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortParameterLibCmos/BaseSerialPortParameterLibCmos.inf
@@ -208,12 +207,10 @@
!endif
TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf
- !if ($(FTPM_ENABLE) == TRUE)
- Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
- Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf
- PttPtpLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/PeiDxePttPtpLib/PeiDxePttPtpLib.inf
- Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
- !endif
+ Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf
+ PttPtpLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/PeiDxePttPtpLib/PeiDxePttPtpLib.inf
+ Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -230,10 +227,6 @@
ScDxeRuntimePciLibPciExpress|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/DxeRuntimePciLibPciExpress/DxeRuntimePciLibPciExpress.inf
TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
- !if $(SOURCE_DEBUG_ENABLE) == TRUE
- SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
- !endif
-
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
EfiRegTableLib|$(PLATFORM_PACKAGE_COMMON)/Library/EfiRegTableLib/EfiRegTableLib.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
index de883285d..793e285ae 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
@@ -1,7 +1,7 @@
## @file
# Platform Fixed At Build Pcd Description.
#
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016 - 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
@@ -80,3 +80,9 @@
gClientCommonModuleTokenSpaceGuid.PcdStatusCodeFlagsCmosIndex|0x5C
gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress|0xFE043000
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
+ gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE
+ !endif
+
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
index eeb0985d9..d267d0eef 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
@@ -235,6 +235,10 @@
READ_LOCK_STATUS = TRUE
FvNameGuid = B73FE497-B92E-416e-8326-45AD0D270092
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ INF SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
+!endif
+
INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
INF $(PLATFORM_PACKAGE_COMMON)/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf
@@ -387,6 +391,10 @@ APRIORI DXE {
INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
!endif
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+# INF SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf
+!endif
+
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
INF $(PLATFORM_PACKAGE_COMMON)/Console/PlatformStatusCodeHandler/RuntimeDxe/PlatformStatusCodeHandlerRuntimeDxe.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
index 6109a76c7..3513e1bd5 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
@@ -119,6 +119,12 @@
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
!endif
+
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+ !endif
[LibraryClasses.Common.DXE_CORE]
!include $(PLATFORM_NAME)/PlatformDsc/LibraryClasses.DxeCore.dsc
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
index cdd91b354..103bce9a4 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
@@ -119,6 +119,12 @@
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
!endif
+
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+ !endif
[LibraryClasses.Common.DXE_CORE]
!include $(PLATFORM_NAME)/PlatformDsc/LibraryClasses.DxeCore.dsc
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
index 42f068a38..bab962bbf 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
@@ -119,6 +119,12 @@
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
!endif
+
+ !if $(SOURCE_DEBUG_ENABLE) == TRUE
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+ !else
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+ !endif
[LibraryClasses.Common.DXE_CORE]
!include PlatformDsc/LibraryClasses.DxeCore.dsc
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c
index 01ac0fa66..5ca7c0bf6 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/GpioLib/GpioLib.c
@@ -306,9 +306,9 @@ ConfigureDirectIrqWakeEvent (
// program Event Trigger Mapping
//
d64 = (LShiftU64 ((UINT64) GpioRead (Community, EVMAP_0 + 4), 32)) | GpioRead (Community, EVMAP_0);
- d64 |= LShiftU64 ((UINT64) Index / EVENT_MUX_SIZE, ((Index % EVENT_MUX_SIZE) << 2));
+ d64 |= LShiftU64 ((UINT64) (Index / EVENT_MUX_SIZE), ((Index % EVENT_MUX_SIZE) << 2));
GpioWrite (Community, EVMAP_0, (UINT32) (d64 & 0xFFFFFFFF));
- GpioWrite (Community, EVMAP_0 + 4, (UINT32) (d64 >> 32));
+ GpioWrite (Community, EVMAP_0 + 4, (UINT32) RShiftU64(d64, 32));
//
// program Event Trigger Output Enable
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c b/Silicon/BroxtonSoC/BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c
index 075c760cc..66c7115fe 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Txe/Library/HeciMsgLib/HeciMsgLib.c
@@ -291,7 +291,7 @@ HeciWriteNVMFile (
SendNVMWrite->Size = (UINT32) DataSize;
SendNVMWrite->Truncate = (Truncate) ? 1 : 0;
SendNVMWrite->SrcAddressLower = (UINT32) (UINTN) TempBuffer;
- SendNVMWrite->SrcAddressUpper = (UINT32) ((PHYSICAL_ADDRESS) (UINTN) TempBuffer >> 32);
+ SendNVMWrite->SrcAddressUpper = (UINT32) RShiftU64 ((PHYSICAL_ADDRESS) (UINTN) TempBuffer, 32);
DEBUG ((EFI_D_INFO, "TempBuffer: 0x%x \n", TempBuffer));
DEBUG ((EFI_D_INFO, "WRITE_TO_RPMB_STORAGE_CMD_REQ_DATA size if %x\n", sizeof(WRITE_TO_RPMB_STORAGE_CMD_REQ_DATA)));
@@ -383,7 +383,7 @@ HeciReadNVMFile(
SendNVMRead->Offset = Offset;
SendNVMRead->Size = (UINT16)*DataSize;
SendNVMRead->DstAddressLower = (UINT32) (UINTN) TempBuffer;
- SendNVMRead->DstAddressUpper = (UINT32) ((PHYSICAL_ADDRESS) (UINTN) TempBuffer >> 32);;
+ SendNVMRead->DstAddressUpper = (UINT32) RShiftU64 ((PHYSICAL_ADDRESS) (UINTN) TempBuffer, 32);
DEBUG((EFI_D_INFO, "TempBuffer: 0x%x \n", TempBuffer));
DEBUG ((EFI_D_INFO, "READ_FROM_RPMB_STORAGE_CMD_REQ_DATA size if %x\n", sizeof (READ_FROM_RPMB_STORAGE_CMD_REQ_DATA)));
--
2.11.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.