diff options
Diffstat (limited to 'arch/x86/boot/compressed/head_32.S')
-rw-r--r-- | arch/x86/boot/compressed/head_32.S | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index 9116aac232c7..eed23c087d6c 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -42,26 +42,53 @@ ENTRY(startup_32) | |||
42 | ENTRY(efi_pe_entry) | 42 | ENTRY(efi_pe_entry) |
43 | add $0x4, %esp | 43 | add $0x4, %esp |
44 | 44 | ||
45 | call 1f | ||
46 | 1: popl %esi | ||
47 | subl $1b, %esi | ||
48 | |||
49 | popl %ecx | ||
50 | movl %ecx, efi32_config(%esi) /* Handle */ | ||
51 | popl %ecx | ||
52 | movl %ecx, efi32_config+8(%esi) /* EFI System table pointer */ | ||
53 | |||
54 | /* Relocate efi_config->call() */ | ||
55 | leal efi32_config(%esi), %eax | ||
56 | add %esi, 88(%eax) | ||
57 | pushl %eax | ||
58 | |||
45 | call make_boot_params | 59 | call make_boot_params |
46 | cmpl $0, %eax | 60 | cmpl $0, %eax |
47 | je 1f | 61 | je fail |
48 | movl 0x4(%esp), %esi | 62 | popl %ecx |
49 | movl (%esp), %ecx | ||
50 | pushl %eax | 63 | pushl %eax |
51 | pushl %esi | ||
52 | pushl %ecx | 64 | pushl %ecx |
53 | sub $0x4, %esp | 65 | jmp 2f /* Skip efi_config initialization */ |
54 | 66 | ||
55 | ENTRY(efi_stub_entry) | 67 | ENTRY(efi_stub_entry) |
56 | add $0x4, %esp | 68 | add $0x4, %esp |
69 | popl %ecx | ||
70 | popl %edx | ||
71 | |||
72 | call 1f | ||
73 | 1: popl %esi | ||
74 | subl $1b, %esi | ||
75 | |||
76 | movl %ecx, efi32_config(%esi) /* Handle */ | ||
77 | movl %edx, efi32_config+8(%esi) /* EFI System table pointer */ | ||
78 | |||
79 | /* Relocate efi_config->call() */ | ||
80 | leal efi32_config(%esi), %eax | ||
81 | add %esi, 88(%eax) | ||
82 | pushl %eax | ||
83 | 2: | ||
57 | call efi_main | 84 | call efi_main |
58 | cmpl $0, %eax | 85 | cmpl $0, %eax |
59 | movl %eax, %esi | 86 | movl %eax, %esi |
60 | jne 2f | 87 | jne 2f |
61 | 1: | 88 | fail: |
62 | /* EFI init failed, so hang. */ | 89 | /* EFI init failed, so hang. */ |
63 | hlt | 90 | hlt |
64 | jmp 1b | 91 | jmp fail |
65 | 2: | 92 | 2: |
66 | call 3f | 93 | call 3f |
67 | 3: | 94 | 3: |
@@ -202,6 +229,13 @@ relocated: | |||
202 | xorl %ebx, %ebx | 229 | xorl %ebx, %ebx |
203 | jmp *%eax | 230 | jmp *%eax |
204 | 231 | ||
232 | .data | ||
233 | efi32_config: | ||
234 | .fill 11,8,0 | ||
235 | .long efi_call_phys | ||
236 | .long 0 | ||
237 | .byte 0 | ||
238 | |||
205 | /* | 239 | /* |
206 | * Stack and heap for uncompression | 240 | * Stack and heap for uncompression |
207 | */ | 241 | */ |