0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/linkage.h>
0010 #include <linux/init.h>
0011 #include <asm/asm-offsets.h>
0012 #include <asm/page_types.h>
0013
0014 __INIT
0015 SYM_FUNC_START(efi_call_svam)
0016 push %ebp
0017 movl %esp, %ebp
0018 push %ebx
0019
0020 push 16(%esp)
0021 push 16(%esp)
0022 push %ecx
0023 push %edx
0024 movl %eax, %ebx // &systab_phys->runtime
0025
0026
0027
0028
0029
0030 movl $1f, %edx
0031 subl $__PAGE_OFFSET, %edx
0032 jmp *%edx
0033 1:
0034
0035
0036 movl %cr0, %edx
0037 andl $0x7fffffff, %edx
0038 movl %edx, %cr0
0039
0040
0041 subl $__PAGE_OFFSET, %esp
0042
0043
0044 movl (%eax), %eax
0045 call *EFI_svam(%eax)
0046
0047
0048 movl (%ebx), %ecx
0049 movl 36(%esp), %edx // &efi.runtime
0050 movl %ecx, (%edx)
0051
0052
0053 movl %cr0, %edx
0054 orl $0x80000000, %edx
0055 movl %edx, %cr0
0056
0057 movl 16(%esp), %ebx
0058 leave
0059 RET
0060 SYM_FUNC_END(efi_call_svam)