UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);\r
UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);\r
\r
-UINTN ReverseGasketUint64 (void *api, UINT64 a);\r
+typedef void (*CALL_BACK) (UINT64 Delta);\r
+\r
+UINTN ReverseGasketUint64 (CALL_BACK CallBack, UINT64 a);\r
\r
//\r
// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
call *%eax\r
leave\r
ret\r
+ \r
+ \r
.globl _ReverseGasketUint64\r
_ReverseGasketUint64:\r
pushl %ebp\r
movl %esp, %ebp\r
- subl $56, %esp\r
+ subl $40, %esp\r
movl 12(%ebp), %eax\r
- movl %eax, -32(%ebp)\r
+ movl %eax, -16(%ebp)\r
movl 16(%ebp), %eax\r
- movl %eax, -28(%ebp)\r
- movl 8(%ebp), %eax\r
movl %eax, -12(%ebp)\r
- movl -32(%ebp), %eax\r
+ movl -16(%ebp), %eax\r
+ movl -12(%ebp), %edx\r
movl %eax, (%esp)\r
- movl -12(%ebp), %eax\r
+ movl %edx, 4(%esp)\r
+ movl 8(%ebp), %eax\r
call *%eax\r
leave\r
ret\r
+ \r
+ \r
.subsections_via_symbols\r
\r
#endif\r
typedef int (*GASKET_VOID) ();
typedef int (*GASKET_UINTN) (UINTN);
+typedef int (*GASKET_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);
{
GASKET_UINTN func;
- func = (GASKET_UINTN)api;
+ func = (GASKET_UINT64)api;
func (a);
return;
}
GCC:*_*_IA32_PP_FLAGS == -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h\r
GCC:*_*_IA32_ASM_FLAGS == -m32 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
\r
+ GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/SecMain -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o -L/usr/X11R6/lib -lXext -lX11 /usr/lib/crtn.o\r
+ GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings\r
+ GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h\r
+ GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
+\r
#\r
# Need to do this link via gcc and not ld as the pathing to libraries changes from OS version to OS version\r
#\r
if (settimer_callback) {
#ifdef __APPLE__
- ReverseGasketUint64 (settimer_callback, delta);
+ ReverseGasketUint64 (settimer_callback, delta);
#else
(*settimer_callback)(delta);
#endif
\r
\r
UINTN \r
-ReverseGasketUint64 (void *api, UINT64 a)\r
+ReverseGasketUint64 (SET_TIMER_CALLBACK settimer_callback, UINT64 a)\r
{\r
- SET_TIMER_CALLBACK settimer_callback = (SET_TIMER_CALLBACK)api;\r
- \r
(*settimer_callback)(a);\r
return 0;\r
}\r
typedef UINTN (*GASKET_VOID) ();
typedef UINTN (*GASKET_UINTN) (UINTN);
+typedef UINTN (*GASKET_UINT64) (UINT64);
typedef UINTN (*GASKET_UINTN_UINTN) (UINTN, UINTN);
typedef UINTN (*GASKET_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN);
typedef UINTN (*GASKET_UINTN_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN, UINTN);
void
ReverseGasketUint64 (void *api, UINT64 a)
{
- GASKET_UINTN func;
+ GASKET_UINT64 func;
- func = (GASKET_UINTN)api;
+ func = (GASKET_UINT64)api;
func (a);
return;
}