From 5053cf7f4c800a71f9aa301072197e94390bcb37 Mon Sep 17 00:00:00 2001 From: yshang1 Date: Thu, 8 Nov 2007 03:40:50 +0000 Subject: [PATCH] 1) Fix bugs in BaseMemoryLibOptXXX instances in MdePkg. 2) Add BaseMemoryLibOptXXX in MdePkg.dsc. 3) Clean up the MdeModulePkg.dsc. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4286 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/MdeModulePkg.dsc | 176 +++--------------- .../Library/BaseMemoryLibOptDxe/Ia32/SetMem.S | 10 +- .../BaseMemoryLibOptPei/Ia32/CopyMem.S | 2 +- .../Library/BaseMemoryLibOptPei/Ia32/SetMem.S | 14 +- MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c | 3 +- MdePkg/MdePkg.dsc | 4 + 6 files changed, 45 insertions(+), 164 deletions(-) diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 6e62654fee..fa2fa94ab9 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -34,7 +34,8 @@ PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf - PeCoffGetEntryPoint|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf @@ -45,18 +46,38 @@ S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf + PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf + PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf + PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf + PalCallLib|MdePkg/Library/BasePalCallLibNull/BasePalCallLibNull.inf + PeiPiLib|MdePkg/Library/PeiPiLib/PeiPiLib.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf + DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf + UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf + FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf + ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf + FrameworkHiiLib|IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf + UsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf + NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf + IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf + UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + [LibraryClasses.IA32] IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf [LibraryClasses.X64] IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf [LibraryClasses.IPF] IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - PalCallLib|MdePkg/Library/BasePalCallLibNull/BasePalCallLibNull.inf [LibraryClasses.EBC.DXE_DRIVER] IoLib|IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf @@ -65,200 +86,55 @@ IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf [LibraryClasses.common.PEI_CORE] - PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf - PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf [LibraryClasses.common.PEIM] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf SmBusLib|MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf - PeiPiLib|MdePkg/Library/PeiPiLib/PeiPiLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf [LibraryClasses.common.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf - DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [LibraryClasses.common.DXE_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf - FrameworkHiiLib|IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf - UsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf [LibraryClasses.common.DXE_RUNTIME_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf [LibraryClasses.common.DXE_SAL_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf [LibraryClasses.common.DXE_SMM_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf [LibraryClasses.common.UEFI_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf [LibraryClasses.common.UEFI_APPLICATION] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - DxeServiceTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf - FvbServiceLib|MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf - ScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf - -[LibraryClasses.IA32.BASE] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.SEC] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.PEI_CORE] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.PEIM] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.DXE_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.DXE_SAL_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.UEFI_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.UEFI_APPLICATION] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.BASE] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.SEC] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.PEI_CORE] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.PEIM] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.DXE_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.DXE_SAL_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.UEFI_DRIVER] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.X64.UEFI_APPLICATION] - TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf - -[LibraryClasses.IA32.DXE_RUNTIME_DRIVER] - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf - -[LibraryClasses.X64.DXE_RUNTIME_DRIVER] - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf - -[LibraryClasses.EBC.DXE_RUNTIME_DRIVER] - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf - -[LibraryClasses.IPF.DXE_RUNTIME_DRIVER] - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf - -[LibraryClasses.EBC.PEI_CORE] - TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf [PcdsFeatureFlag.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleRest|FALSE diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S index 406a8f8d1a..c46fde6439 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S +++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S @@ -37,15 +37,15 @@ _InternalMemSetMem: push %edi movl 12(%esp),%ecx - movl 16(%esp),%al + movb 16(%esp),%al movb %ah, %al - shrd %edx, %eax, $16 - shld %eax, %edx, $16 + shrd $16, %eax, %edx + shld $16, %edx, %eax movl %edx, %ecx movl 8(%esp),%edi - shr $2, %ecx + shrd $2, %ecx, %ecx rep - stosd + stosl movl %ecx, %edx andl $3, %ecx rep diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S index 4b59dbc200..6f19826956 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S +++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S @@ -40,7 +40,7 @@ _InternalMemCopyMem: movl 20(%esp), %edx # edx <- Count cmpl %esi, %edi je L_CopyDone - cmpl %edx, $0 + cmpl $0, %edx je L_CopyDone leal -1(%esi, %edx), %eax # eax <- End of Source cmpl %esi, %edi diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S index 406a8f8d1a..aa803ca580 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S +++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S @@ -37,18 +37,18 @@ _InternalMemSetMem: push %edi movl 12(%esp),%ecx - movl 16(%esp),%al + movb 16(%esp),%al movb %ah, %al - shrd %edx, %eax, $16 - shld %eax, %edx, $16 + shrd $16, %eax, %edx + shld $16, %edx, %eax movl %edx, %ecx movl 8(%esp),%edi - shr $2, %ecx - rep - stosd + shrd $2, %ecx, %ecx + rep + stosl movl %ecx, %edx andl $3, %ecx - rep + rep stosb movl 8(%esp),%eax pop %edi diff --git a/MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c b/MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c index f249d1a692..5f9cdc5744 100644 --- a/MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c +++ b/MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c @@ -11,7 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ - +#include +#include /** Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index 278fc3750f..696950b389 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -108,6 +108,8 @@ MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf [Components.IA32] + MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf + MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf @@ -116,6 +118,8 @@ MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf [Components.X64] + MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf + MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf -- 2.39.2