From: andrewfish Date: Sun, 19 Jun 2011 02:58:32 +0000 (+0000) Subject: InOsEmuPkg: Fix UINT64 bugs in IA-32 gasket. X-Git-Tag: edk2-stable201903~14656 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f2f008b43594a438204ce00ce2e9efe8c9428f60 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 --- 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)