summaryrefslogtreecommitdiff
path: root/InOsEmuPkg/Unix
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-19 02:58:32 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-19 02:58:32 +0000
commitf2f008b43594a438204ce00ce2e9efe8c9428f60 (patch)
tree6bbbf382520c59c352d95040e51d21262e5eae46 /InOsEmuPkg/Unix
parent102d35ba76a385376512bb0e2f65c7a073f9342d (diff)
downloadedk2-platforms-f2f008b43594a438204ce00ce2e9efe8c9428f60.tar.xz
InOsEmuPkg: Fix UINT64 bugs in IA-32 gasket.
At this point IA-32 emulator boots the shell with an X11 GOP window. Block IO seems to have an issue that needs to be debugged. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11854 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'InOsEmuPkg/Unix')
-rw-r--r--InOsEmuPkg/Unix/Sec/Gasket.h2
-rw-r--r--InOsEmuPkg/Unix/Sec/Ia32/Gasket.S40
2 files changed, 26 insertions, 16 deletions
diff --git a/InOsEmuPkg/Unix/Sec/Gasket.h b/InOsEmuPkg/Unix/Sec/Gasket.h
index 0862b2c9ac..a9ecf8dfc8 100644
--- a/InOsEmuPkg/Unix/Sec/Gasket.h
+++ b/InOsEmuPkg/Unix/Sec/Gasket.h
@@ -108,8 +108,8 @@ VOID
EFIAPI
GasketSecSleep (
IN UINT64 Milliseconds
-
);
+
VOID
EFIAPI
GasketSecCpuSleep (
diff --git a/InOsEmuPkg/Unix/Sec/Ia32/Gasket.S b/InOsEmuPkg/Unix/Sec/Ia32/Gasket.S
index eb5142b0ae..d9ac12d7f0 100644
--- a/InOsEmuPkg/Unix/Sec/Ia32/Gasket.S
+++ b/InOsEmuPkg/Unix/Sec/Ia32/Gasket.S
@@ -112,12 +112,14 @@ ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
ASM_PFX(GasketSecSetTimer):
pushl %ebp
movl %esp, %ebp
- subl $24, %esp // sub extra 16 from the stack for alignment
+ subl $40, %esp // sub extra 16 from the stack for alignment
and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
- movl 12(%ebp), %eax
- movl %eax, 4(%esp)
- movl 8(%ebp), %eax
- movl %eax, (%esp)
+ movl 16(%ebp), %eax
+ movl %eax, 8(%esp)
+ movl 8(%ebp), %eax
+ movl 12(%ebp), %edx
+ movl %edx, 4(%esp)
+ movl %eax, (%esp)
call ASM_PFX(SecSetTimer)
@@ -182,8 +184,10 @@ ASM_PFX(GasketSecSleep):
movl %esp, %ebp
subl $24, %esp // sub extra 16 from the stack for alignment
and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
- movl 8(%ebp), %eax
- movl %eax, (%esp)
+ movl 8(%ebp), %eax
+ movl 12(%ebp), %ecx
+ movl %ecx, 4(%esp)
+ movl %eax, (%esp)
call ASM_PFX(SecSleep)
@@ -784,11 +788,15 @@ ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
ASM_PFX(GasketPosixFileOpen):
pushl %ebp
movl %esp, %ebp
- subl $40, %esp // sub extra 16 from the stack for alignment
+ subl $56, %esp // sub extra 16 from the stack for alignment
and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
- movl 24(%ebp), %eax
- movl %eax, 16(%esp)
+ movl 28(%ebp), %eax
+ movl 32(%ebp), %ecx
+ movl %ecx, 24(%esp)
+ movl %eax, 20(%esp)
movl 20(%ebp), %eax
+ movl 24(%ebp), %ecx
+ movl %ecx, 16(%esp)
movl %eax, 12(%esp)
movl 16(%ebp), %eax
movl %eax, 8(%esp)
@@ -875,12 +883,14 @@ ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
ASM_PFX(GasketPosixFileSetPossition):
pushl %ebp
movl %esp, %ebp
- subl $24, %esp // sub extra 16 from the stack for alignment
+ subl $40, %esp // sub extra 16 from the stack for alignment
and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
- movl 12(%ebp), %eax
- movl %eax, 4(%esp)
- movl 8(%ebp), %eax
- movl %eax, (%esp)
+ movl 12(%ebp), %eax
+ movl 16(%ebp), %ecx
+ movl %ecx, 8(%esp)
+ movl %eax, 4(%esp)
+ movl 8(%ebp), %eax
+ movl %eax, (%esp)
call ASM_PFX(PosixFileSetPossition)