summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-08 03:40:50 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-08 03:40:50 +0000
commit5053cf7f4c800a71f9aa301072197e94390bcb37 (patch)
tree5ffeb6703c9b501b04da3bdbe2fd52adbc638bc6 /MdePkg
parent14e2aca20dd91858d1b31631abfd514e85934cfb (diff)
downloadedk2-platforms-5053cf7f4c800a71f9aa301072197e94390bcb37.tar.xz
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
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S10
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S14
-rw-r--r--MdePkg/Library/CpuLib/Ebc/CpuSleepFlushTlb.c3
-rw-r--r--MdePkg/MdePkg.dsc4
5 files changed, 19 insertions, 14 deletions
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 <Base.h>
+#include <Library/DebugLib.h>
/**
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