* Re: [PATCH v2 2/3] firmware: coreboot: loader for Linux-owned SMI handler
@ 2025-06-18 0:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-18 0:30 UTC (permalink / raw)
Cc: oe-kbuild-all, llvm
In-Reply-To: <20250616-coreboot-payload-mm-v2-2-5d679b682e13@9elements.com>
References: <20250616-coreboot-payload-mm-v2-2-5d679b682e13@9elements.com>
TO: Michal Gorlas <michal.gorlas@9elements.com>
TO: "Tzung-Bi Shih" <tzungbi@kernel.org>
TO: Brian Norris <briannorris@chromium.org>
TO: Julius Werner <jwerner@chromium.org>
CC: linux-kernel@vger.kernel.org
CC: chrome-platform@lists.linux.dev
CC: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
CC: Michal Gorlas <michal.gorlas@9elements.com>
Hi Michal,
kernel test robot noticed the following build errors:
[auto build test ERROR on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494]
url: https://github.com/intel-lab-lkp/linux/commits/Michal-Gorlas/firmware-coreboot-support-for-parsing-SMM-related-informations-from-coreboot-tables/20250616-220336
base: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
patch link: https://lore.kernel.org/r/20250616-coreboot-payload-mm-v2-2-5d679b682e13%409elements.com
patch subject: [PATCH v2 2/3] firmware: coreboot: loader for Linux-owned SMI handler
config: i386-randconfig-012-20250618 (https://download.01.org/0day-ci/archive/20250618/202506180813.XldQ0K9E-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250618/202506180813.XldQ0K9E-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506180813.XldQ0K9E-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/firmware/google/mm_loader.c:38:15: error: inline assembly requires more registers than available
38 | asm volatile("movq %[cmd], %%rax\n\t"
| ^
>> drivers/firmware/google/mm_loader.c:38:15: error: register %rax is only available in 64-bit mode
<inline asm>:1:13: note: instantiated into assembly here
1 | movq %eax, %rax
| ^~~~
drivers/firmware/google/mm_loader.c:38:36: error: register %rax is only available in 64-bit mode
38 | asm volatile("movq %[cmd], %%rax\n\t"
| ^
<inline asm>:2:7: note: instantiated into assembly here
2 | movq %rax, %rcx
| ^~~~~
>> drivers/firmware/google/mm_loader.c:39:28: error: register %rbx is only available in 64-bit mode
39 | "movq %%rax, %%rcx\n\t"
| ^
<inline asm>:3:13: note: instantiated into assembly here
3 | movq %eax, %rbx
| ^~~~
>> drivers/firmware/google/mm_loader.c:40:29: error: register %r8 is only available in 64-bit mode
40 | "movq %[arg], %%rbx\n\t"
| ^
<inline asm>:4:13: note: instantiated into assembly here
4 | movq %ecx, %r8
| ^~~
>> drivers/firmware/google/mm_loader.c:44:26: error: register %rcx is only available in 64-bit mode
44 | "outb %%al, %%dx\n\t"
| ^
<inline asm>:8:7: note: instantiated into assembly here
8 | cmpq %rcx, %rax
| ^~~~~
drivers/firmware/google/mm_loader.c:46:30: error: register %rcx is only available in 64-bit mode
46 | "jne .return_changed\n\t"
| ^
<inline asm>:10:8: note: instantiated into assembly here
10 | pushq %rcx
| ^~~~
drivers/firmware/google/mm_loader.c:47:22: error: register %rcx is only available in 64-bit mode
47 | "pushq %%rcx\n\t"
| ^
<inline asm>:11:15: note: instantiated into assembly here
11 | movq $10000, %rcx
| ^~~~
drivers/firmware/google/mm_loader.c:49:18: error: register %rcx is only available in 64-bit mode
49 | "rep nop\n\t"
| ^
<inline asm>:13:7: note: instantiated into assembly here
13 | popq %rcx
| ^~~~
drivers/firmware/google/mm_loader.c:50:21: error: register %r8 is only available in 64-bit mode
50 | "popq %%rcx\n\t"
| ^
<inline asm>:14:11: note: instantiated into assembly here
14 | cmpq $0, %r8
| ^~~
drivers/firmware/google/mm_loader.c:52:33: error: register %r8 is only available in 64-bit mode
52 | "je .return_not_changed\n\t"
| ^
<inline asm>:16:7: note: instantiated into assembly here
16 | decq %r8
| ^~~
drivers/firmware/google/mm_loader.c:55:27: error: register %rax is only available in 64-bit mode
55 | ".return_changed:\n\t"
| ^
<inline asm>:19:7: note: instantiated into assembly here
19 | movq %rax, %eax
| ^~~~~
drivers/firmware/google/mm_loader.c:58:31: error: register %rcx is only available in 64-bit mode
58 | ".return_not_changed:\n\t"
| ^
<inline asm>:22:7: note: instantiated into assembly here
22 | movq %rcx, %eax
| ^~~~~
13 errors generated.
vim +38 drivers/firmware/google/mm_loader.c
27
28 /*
29 * This is x86_64 specific, assuming that we want this to also work on i386,
30 * we either need to have "trigger_smi32" bounded by preprocessor guards(?)
31 * or mm_loader32 and then mm_loader$(BITS) in Makefile(?).
32 */
33 static int trigger_smi(u64 cmd, u64 arg, u64 retry)
34 {
35 u64 status;
36 u16 apmc_port = 0xb2;
37
> 38 asm volatile("movq %[cmd], %%rax\n\t"
> 39 "movq %%rax, %%rcx\n\t"
> 40 "movq %[arg], %%rbx\n\t"
41 "movq %[retry], %%r8\n\t"
42 ".trigger:\n\t"
43 "mov %[apmc_port], %%dx\n\t"
> 44 "outb %%al, %%dx\n\t"
45 "cmpq %%rcx, %%rax\n\t"
46 "jne .return_changed\n\t"
47 "pushq %%rcx\n\t"
48 "movq $10000, %%rcx\n\t"
49 "rep nop\n\t"
50 "popq %%rcx\n\t"
51 "cmpq $0, %%r8\n\t"
52 "je .return_not_changed\n\t"
53 "decq %%r8\n\t"
54 "jmp .trigger\n\t"
55 ".return_changed:\n\t"
56 "movq %%rax, %[status]\n\t"
57 "jmp .end\n\t"
58 ".return_not_changed:\n\t"
59 "movq %%rcx, %[status]\n\t"
60 ".end:\n\t"
61 : [status] "=r"(status)
62 : [cmd] "r"(cmd), [arg] "r"(arg), [retry] "r"(retry),
63 [apmc_port] "r"(apmc_port)
64 : "%rax", "%rbx", "%rdx", "%rcx", "%r8");
65
66 if (status == cmd || status == PAYLOAD_MM_RET_FAILURE)
67 status = PAYLOAD_MM_RET_FAILURE;
68 else
69 status = PAYLOAD_MM_RET_SUCCESS;
70
71 return status;
72 }
73
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-18 0:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 0:30 [PATCH v2 2/3] firmware: coreboot: loader for Linux-owned SMI handler kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox