summaryrefslogtreecommitdiff
path: root/UnixPkg/Sec/Ia32
diff options
context:
space:
mode:
Diffstat (limited to 'UnixPkg/Sec/Ia32')
-rw-r--r--UnixPkg/Sec/Ia32/Gasket.S55
-rw-r--r--UnixPkg/Sec/Ia32/GasketTemplate.c13
2 files changed, 66 insertions, 2 deletions
diff --git a/UnixPkg/Sec/Ia32/Gasket.S b/UnixPkg/Sec/Ia32/Gasket.S
index 93d92b50de..440e73d6df 100644
--- a/UnixPkg/Sec/Ia32/Gasket.S
+++ b/UnixPkg/Sec/Ia32/Gasket.S
@@ -129,6 +129,31 @@ _GasketUintnUintnUintnUintn:
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
+.globl _GasketUintnUintnUintnUintnUintn
+_GasketUintnUintnUintnUintnUintn:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $50, %esp # sub extra 0x10 from the stack for the AND
+ and $-16, %esp # stack needs to end in 0xFFFFFFF0 before call
+ movl 8(%ebp), %eax
+ movl %eax, -12(%ebp)
+ movl 28(%ebp), %eax
+ movl %eax, 16(%esp)
+ movl 24(%ebp), %eax
+ movl %eax, 12(%esp)
+ movl 20(%ebp), %eax
+ movl %eax, 8(%esp)
+ movl 16(%ebp), %eax
+ movl %eax, 4(%esp)
+ movl 12(%ebp), %eax
+ movl %eax, (%esp)
+ movl -12(%ebp), %eax
+ call *%eax
+ leave
+ ret
+
+#------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
.globl _GasketUintn10Args
_GasketUintn10Args:
pushl %ebp
@@ -256,6 +281,35 @@ _ReverseGasketUint64:
ret
+.globl _ReverseGasketUint64Uint64
+_ReverseGasketUint64Uint64:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $56, %esp
+ movl 12(%ebp), %eax
+ movl %eax, -32(%ebp)
+ movl 16(%ebp), %eax
+ movl %eax, -28(%ebp)
+ movl 20(%ebp), %eax
+ movl %eax, -40(%ebp)
+ movl 24(%ebp), %eax
+ movl %eax, -36(%ebp)
+ movl 8(%ebp), %eax
+ movl %eax, -12(%ebp)
+ movl -40(%ebp), %eax
+ movl -36(%ebp), %edx
+ movl %eax, 8(%esp)
+ movl %edx, 12(%esp)
+ movl -32(%ebp), %eax
+ movl -28(%ebp), %edx
+ movl %eax, (%esp)
+ movl %edx, 4(%esp)
+ movl -12(%ebp), %eax
+ call *%eax
+ leave
+ ret
+
+
// Sec PPI Callbacks
.globl _GasketSecUnixPeiLoadFile
@@ -288,4 +342,3 @@ _GasketSecTemporaryRamSupport:
jmp _SecTemporaryRamSupport
#endif
-
diff --git a/UnixPkg/Sec/Ia32/GasketTemplate.c b/UnixPkg/Sec/Ia32/GasketTemplate.c
index bb703bf631..d85a26a53e 100644
--- a/UnixPkg/Sec/Ia32/GasketTemplate.c
+++ b/UnixPkg/Sec/Ia32/GasketTemplate.c
@@ -7,7 +7,7 @@
the assembly functions.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -36,6 +36,7 @@ typedef UINT32 UINTN;
typedef int (*GASKET_VOID) ();
typedef int (*GASKET_UINTN) (UINTN);
typedef int (*GASKET_UINT64) (UINT64);
+typedef int (*GASKET_UINT64UINT64) (UINT64, UINT64);
typedef int (*GASKET_UINTN_UINTN) (UINTN, UINTN);
typedef int (*GASKET_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN);
typedef int (*GASKET_UINTN_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN, UINTN);
@@ -149,4 +150,14 @@ ReverseGasketUint64 (void *api, UINT64 a)
return;
}
+void
+ReverseGasketUint64UINT64 (void *api, UINT64 a, UINT64 b)
+{
+ GASKET_UINT64UINT64 func;
+
+ func = (GASKET_UINT64UINT64)api;
+ func (a, b);
+ return;
+}
+