Prechádzať zdrojové kódy

x86/boot: Fix non-EFI build

The kbuild test robot reported the following errors, introduced with
commit 54b52d872680 ("x86/efi: Build our own EFI services pointer
table"),

 arch/x86/boot/compressed/head_32.o: In function `efi32_config':
>> (.data+0x58): undefined reference to `efi_call_phys'

 arch/x86/boot/compressed/head_64.o: In function `efi64_config':
>> (.data+0x90): undefined reference to `efi_call6'

Wrap the efi*_config structures in #ifdef CONFIG_EFI_STUB so that we
don't make references to EFI functions if they're not compiled in.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Matt Fleming 11 rokov pred
rodič
commit
3db4cafdfd

+ 2 - 0
arch/x86/boot/compressed/head_32.S

@@ -229,12 +229,14 @@ relocated:
 	xorl	%ebx, %ebx
 	xorl	%ebx, %ebx
 	jmp	*%eax
 	jmp	*%eax
 
 
+#ifdef CONFIG_EFI_STUB
 	.data
 	.data
 efi32_config:
 efi32_config:
 	.fill 11,8,0
 	.fill 11,8,0
 	.long efi_call_phys
 	.long efi_call_phys
 	.long 0
 	.long 0
 	.byte 0
 	.byte 0
+#endif
 
 
 /*
 /*
  * Stack and heap for uncompression
  * Stack and heap for uncompression

+ 3 - 0
arch/x86/boot/compressed/head_64.S

@@ -440,6 +440,7 @@ gdt:
 	.quad   0x0000000000000000	/* TS continued */
 	.quad   0x0000000000000000	/* TS continued */
 gdt_end:
 gdt_end:
 
 
+#ifdef CONFIG_EFI_STUB
 efi_config:
 efi_config:
 	.quad	0
 	.quad	0
 
 
@@ -456,6 +457,8 @@ efi64_config:
 	.fill	11,8,0
 	.fill	11,8,0
 	.quad	efi_call6
 	.quad	efi_call6
 	.byte	1
 	.byte	1
+#endif /* CONFIG_EFI_STUB */
+
 /*
 /*
  * Stack and heap for uncompression
  * Stack and heap for uncompression
  */
  */