[efi:next 13/14] arch/x86/kernel/reboot.c:613: undefined reference to `efi_capsule_pending'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head:   f4cc0ea28451d8adfb5f1ee35635e07650907c6e
commit: 168f1c4079fcddd8c989ce103fcc79d170b7b43c [13/14] efi: ia64: disable the capsule loader
config: x86_64-randconfig-a006-20201213 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=168f1c4079fcddd8c989ce103fcc79d170b7b43c
        git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
        git fetch --no-tags efi next
        git checkout 168f1c4079fcddd8c989ce103fcc79d170b7b43c
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   ld: warning: orphan section `.data..decrypted' from `arch/x86/kernel/cpu/vmware.o' being placed in section `.data..decrypted'
   ld: warning: orphan section `.data..decrypted' from `arch/x86/kernel/kvm.o' being placed in section `.data..decrypted'
   ld: arch/x86/kernel/reboot.o: in function `native_machine_emergency_restart':
>> arch/x86/kernel/reboot.c:613: undefined reference to `efi_capsule_pending'

vim +613 arch/x86/kernel/reboot.c

7432d149fda8ce9 Ingo Molnar         2008-03-06  573  
660e34cebf0a11d Matthew Garrett     2011-04-04  574  /*
5be44a6fb1edb57 Ingo Molnar         2014-04-04  575   * To the best of our knowledge Windows compatible x86 hardware expects
5be44a6fb1edb57 Ingo Molnar         2014-04-04  576   * the following on reboot:
660e34cebf0a11d Matthew Garrett     2011-04-04  577   *
660e34cebf0a11d Matthew Garrett     2011-04-04  578   * 1) If the FADT has the ACPI reboot register flag set, try it
660e34cebf0a11d Matthew Garrett     2011-04-04  579   * 2) If still alive, write to the keyboard controller
660e34cebf0a11d Matthew Garrett     2011-04-04  580   * 3) If still alive, write to the ACPI reboot register again
660e34cebf0a11d Matthew Garrett     2011-04-04  581   * 4) If still alive, write to the keyboard controller again
a4f1987e4c5489a Li, Aubrey          2014-03-02  582   * 5) If still alive, call the EFI runtime service to reboot
5be44a6fb1edb57 Ingo Molnar         2014-04-04  583   * 6) If no EFI runtime service, call the BIOS to do a reboot
660e34cebf0a11d Matthew Garrett     2011-04-04  584   *
5be44a6fb1edb57 Ingo Molnar         2014-04-04  585   * We default to following the same pattern. We also have
5be44a6fb1edb57 Ingo Molnar         2014-04-04  586   * two other reboot methods: 'triple fault' and 'PCI', which
5be44a6fb1edb57 Ingo Molnar         2014-04-04  587   * can be triggered via the reboot= kernel boot option or
5be44a6fb1edb57 Ingo Molnar         2014-04-04  588   * via quirks.
5be44a6fb1edb57 Ingo Molnar         2014-04-04  589   *
5be44a6fb1edb57 Ingo Molnar         2014-04-04  590   * This means that this function can never return, it can misbehave
5be44a6fb1edb57 Ingo Molnar         2014-04-04  591   * by not rebooting properly and hanging.
660e34cebf0a11d Matthew Garrett     2011-04-04  592   */
416e2d63794d4e5 Jody Belka          2008-02-12  593  static void native_machine_emergency_restart(void)
4d022e35fd7e07c Miguel Boton        2008-01-30  594  {
4d022e35fd7e07c Miguel Boton        2008-01-30  595  	int i;
660e34cebf0a11d Matthew Garrett     2011-04-04  596  	int attempt = 0;
660e34cebf0a11d Matthew Garrett     2011-04-04  597  	int orig_reboot_type = reboot_type;
edf2b1394611fef Robin Holt          2013-07-08  598  	unsigned short mode;
4d022e35fd7e07c Miguel Boton        2008-01-30  599  
d176720d34c72f7 Eduardo Habkost     2008-11-17  600  	if (reboot_emergency)
d176720d34c72f7 Eduardo Habkost     2008-11-17  601  		emergency_vmx_disable_all();
d176720d34c72f7 Eduardo Habkost     2008-11-17  602  
840c2baf2d4cdf3 Joseph Cihula       2009-06-30  603  	tboot_shutdown(TB_SHUTDOWN_REBOOT);
840c2baf2d4cdf3 Joseph Cihula       2009-06-30  604  
4d022e35fd7e07c Miguel Boton        2008-01-30  605  	/* Tell the BIOS if we want cold or warm reboot */
edf2b1394611fef Robin Holt          2013-07-08  606  	mode = reboot_mode == REBOOT_WARM ? 0x1234 : 0;
edf2b1394611fef Robin Holt          2013-07-08  607  	*((unsigned short *)__va(0x472)) = mode;
4d022e35fd7e07c Miguel Boton        2008-01-30  608  
87615a34d561ef5 Matt Fleming        2016-04-25  609  	/*
87615a34d561ef5 Matt Fleming        2016-04-25  610  	 * If an EFI capsule has been registered with the firmware then
87615a34d561ef5 Matt Fleming        2016-04-25  611  	 * override the reboot= parameter.
87615a34d561ef5 Matt Fleming        2016-04-25  612  	 */
87615a34d561ef5 Matt Fleming        2016-04-25 @613  	if (efi_capsule_pending(NULL)) {
87615a34d561ef5 Matt Fleming        2016-04-25  614  		pr_info("EFI capsule is pending, forcing EFI reboot.\n");
87615a34d561ef5 Matt Fleming        2016-04-25  615  		reboot_type = BOOT_EFI;
87615a34d561ef5 Matt Fleming        2016-04-25  616  	}
87615a34d561ef5 Matt Fleming        2016-04-25  617  
4d022e35fd7e07c Miguel Boton        2008-01-30  618  	for (;;) {
4d022e35fd7e07c Miguel Boton        2008-01-30  619  		/* Could also try the reset bit in the Hammer NB */
4d022e35fd7e07c Miguel Boton        2008-01-30  620  		switch (reboot_type) {
5be44a6fb1edb57 Ingo Molnar         2014-04-04  621  		case BOOT_ACPI:
5be44a6fb1edb57 Ingo Molnar         2014-04-04  622  			acpi_reboot();
5be44a6fb1edb57 Ingo Molnar         2014-04-04  623  			reboot_type = BOOT_KBD;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  624  			break;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  625  
4d022e35fd7e07c Miguel Boton        2008-01-30  626  		case BOOT_KBD:
144d102b926f887 Michael D Labriola  2012-02-01  627  			mach_reboot_fixups(); /* For board specific fixups */
7432d149fda8ce9 Ingo Molnar         2008-03-06  628  
4d022e35fd7e07c Miguel Boton        2008-01-30  629  			for (i = 0; i < 10; i++) {
4d022e35fd7e07c Miguel Boton        2008-01-30  630  				kb_wait();
4d022e35fd7e07c Miguel Boton        2008-01-30  631  				udelay(50);
144d102b926f887 Michael D Labriola  2012-02-01  632  				outb(0xfe, 0x64); /* Pulse reset low */
4d022e35fd7e07c Miguel Boton        2008-01-30  633  				udelay(50);
4d022e35fd7e07c Miguel Boton        2008-01-30  634  			}
660e34cebf0a11d Matthew Garrett     2011-04-04  635  			if (attempt == 0 && orig_reboot_type == BOOT_ACPI) {
660e34cebf0a11d Matthew Garrett     2011-04-04  636  				attempt = 1;
660e34cebf0a11d Matthew Garrett     2011-04-04  637  				reboot_type = BOOT_ACPI;
660e34cebf0a11d Matthew Garrett     2011-04-04  638  			} else {
a4f1987e4c5489a Li, Aubrey          2014-03-02  639  				reboot_type = BOOT_EFI;
660e34cebf0a11d Matthew Garrett     2011-04-04  640  			}
660e34cebf0a11d Matthew Garrett     2011-04-04  641  			break;
4d022e35fd7e07c Miguel Boton        2008-01-30  642  
4d022e35fd7e07c Miguel Boton        2008-01-30  643  		case BOOT_EFI:
8562c99cdd30217 Matt Fleming        2014-06-13  644  			efi_reboot(reboot_mode, NULL);
5be44a6fb1edb57 Ingo Molnar         2014-04-04  645  			reboot_type = BOOT_BIOS;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  646  			break;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  647  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  648  		case BOOT_BIOS:
5be44a6fb1edb57 Ingo Molnar         2014-04-04  649  			machine_real_restart(MRR_BIOS);
5be44a6fb1edb57 Ingo Molnar         2014-04-04  650  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  651  			/* We're probably dead after this, but... */
5be44a6fb1edb57 Ingo Molnar         2014-04-04  652  			reboot_type = BOOT_CF9_SAFE;
14d7ca5c5758536 H. Peter Anvin      2008-11-11  653  			break;
4d022e35fd7e07c Miguel Boton        2008-01-30  654  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  655  		case BOOT_CF9_FORCE:
14d7ca5c5758536 H. Peter Anvin      2008-11-11  656  			port_cf9_safe = true;
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  657  			fallthrough;
4d022e35fd7e07c Miguel Boton        2008-01-30  658  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  659  		case BOOT_CF9_SAFE:
14d7ca5c5758536 H. Peter Anvin      2008-11-11  660  			if (port_cf9_safe) {
5be44a6fb1edb57 Ingo Molnar         2014-04-04  661  				u8 reboot_code = reboot_mode == REBOOT_WARM ?  0x06 : 0x0E;
16c21ae5ca636cf Li Fei              2013-08-21  662  				u8 cf9 = inb(0xcf9) & ~reboot_code;
14d7ca5c5758536 H. Peter Anvin      2008-11-11  663  				outb(cf9|2, 0xcf9); /* Request hard reset */
14d7ca5c5758536 H. Peter Anvin      2008-11-11  664  				udelay(50);
16c21ae5ca636cf Li Fei              2013-08-21  665  				/* Actually do the reset */
16c21ae5ca636cf Li Fei              2013-08-21  666  				outb(cf9|reboot_code, 0xcf9);
14d7ca5c5758536 H. Peter Anvin      2008-11-11  667  				udelay(50);
14d7ca5c5758536 H. Peter Anvin      2008-11-11  668  			}
5be44a6fb1edb57 Ingo Molnar         2014-04-04  669  			reboot_type = BOOT_TRIPLE;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  670  			break;
5be44a6fb1edb57 Ingo Molnar         2014-04-04  671  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  672  		case BOOT_TRIPLE:
e802a51ede91350 Thomas Gleixner     2017-08-28  673  			idt_invalidate(NULL);
5be44a6fb1edb57 Ingo Molnar         2014-04-04  674  			__asm__ __volatile__("int3");
5be44a6fb1edb57 Ingo Molnar         2014-04-04  675  
5be44a6fb1edb57 Ingo Molnar         2014-04-04  676  			/* We're probably dead after this, but... */
5be44a6fb1edb57 Ingo Molnar         2014-04-04  677  			reboot_type = BOOT_KBD;
4d022e35fd7e07c Miguel Boton        2008-01-30  678  			break;
4d022e35fd7e07c Miguel Boton        2008-01-30  679  		}
4d022e35fd7e07c Miguel Boton        2008-01-30  680  	}
4d022e35fd7e07c Miguel Boton        2008-01-30  681  }
4d022e35fd7e07c Miguel Boton        2008-01-30  682  

:::::: The code at line 613 was first introduced by commit
:::::: 87615a34d561ef59bd0cffc73256a21220dfdffd x86/efi: Force EFI reboot to process pending capsules

:::::: TO: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux