Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/testing: TestGrubX8664EFI: use Nehalem cpu emulation
@ 2024-02-05 13:35 Romain Naour
  2024-02-05 16:04 ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2024-02-05 13:35 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Following the Bootlin toolchain bump to 2023.11-1 [1], the
TestGrubX8664EFI failed with this error:

  # efivar -l
  traps: efivar[86] trap invalid opcode ip:7fc187f4c7f4 sp:7fff9bbaa930 error:0 in libefivar.so.1.38[7fc187f4c000+16000]
  Illegal instruction

Actually this error can be reproduced by installing other packages like
"file" because the qemu emulation doesn't provide all assembler
instruction emulation required by x86-64-core-i7 target used by
TestGrubX8664EFI.

A similar issue has been fixed in toolchain-builder by adding Nehalem
cpu emulation on the qemu command line [2].

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/6093853712

[1] 7e0e6e3b8618ab942f25b11ee72fbc5a4deefdf1
[2] https://gitlab.com/buildroot.org/toolchains-builder/-/commit/f2b253732b4d1fc5b87badba7c2d48f12a197f76

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 support/testing/tests/boot/test_grub.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/testing/tests/boot/test_grub.py b/support/testing/tests/boot/test_grub.py
index 9f3a6a8495..5315fa23ba 100644
--- a/support/testing/tests/boot/test_grub.py
+++ b/support/testing/tests/boot/test_grub.py
@@ -120,7 +120,7 @@ class TestGrubX8664EFI(infra.basetest.BRTest):
         # https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3
         # http://lists.busybox.net/pipermail/buildroot/2023-July/670825.html
         qemu_fw_cfg = "name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes"
-        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-hda", hda, "-fw_cfg", qemu_fw_cfg])
+        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-cpu", "Nehalem", "-hda", hda, "-fw_cfg", qemu_fw_cfg])
         self.emulator.login()
 
         cmd = "modprobe efivarfs"
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] support/testing: TestGrubX8664EFI: use Nehalem cpu emulation
  2024-02-05 13:35 [Buildroot] [PATCH] support/testing: TestGrubX8664EFI: use Nehalem cpu emulation Romain Naour
@ 2024-02-05 16:04 ` Yann E. MORIN
  2024-02-05 17:37   ` Romain Naour
  0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2024-02-05 16:04 UTC (permalink / raw)
  To: Romain Naour; +Cc: buildroot

Romain, All,

On 2024-02-05 14:35 +0100, Romain Naour spake thusly:
> Following the Bootlin toolchain bump to 2023.11-1 [1], the
> TestGrubX8664EFI failed with this error:

As we discussed IRL, I've reworded the commit log with your input.

>   # efivar -l
>   traps: efivar[86] trap invalid opcode ip:7fc187f4c7f4 sp:7fff9bbaa930 error:0 in libefivar.so.1.38[7fc187f4c000+16000]
>   Illegal instruction
> 
> Actually this error can be reproduced by installing other packages like
> "file" because the qemu emulation doesn't provide all assembler
> instruction emulation required by x86-64-core-i7 target used by
> TestGrubX8664EFI.
> 
> A similar issue has been fixed in toolchain-builder by adding Nehalem
> cpu emulation on the qemu command line [2].
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/6093853712
> 
> [1] 7e0e6e3b8618ab942f25b11ee72fbc5a4deefdf1
> [2] https://gitlab.com/buildroot.org/toolchains-builder/-/commit/f2b253732b4d1fc5b87badba7c2d48f12a197f76
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/testing/tests/boot/test_grub.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/testing/tests/boot/test_grub.py b/support/testing/tests/boot/test_grub.py
> index 9f3a6a8495..5315fa23ba 100644
> --- a/support/testing/tests/boot/test_grub.py
> +++ b/support/testing/tests/boot/test_grub.py
> @@ -120,7 +120,7 @@ class TestGrubX8664EFI(infra.basetest.BRTest):
>          # https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3
>          # http://lists.busybox.net/pipermail/buildroot/2023-July/670825.html
>          qemu_fw_cfg = "name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes"
> -        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-hda", hda, "-fw_cfg", qemu_fw_cfg])
> +        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-cpu", "Nehalem", "-hda", hda, "-fw_cfg", qemu_fw_cfg])
>          self.emulator.login()
>  
>          cmd = "modprobe efivarfs"
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] support/testing: TestGrubX8664EFI: use Nehalem cpu emulation
  2024-02-05 16:04 ` Yann E. MORIN
@ 2024-02-05 17:37   ` Romain Naour
  0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour @ 2024-02-05 17:37 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

Hello Yann, All,

Le 05/02/2024 à 17:04, Yann E. MORIN a écrit :
> Romain, All,
> 
> On 2024-02-05 14:35 +0100, Romain Naour spake thusly:
>> Following the Bootlin toolchain bump to 2023.11-1 [1], the
>> TestGrubX8664EFI failed with this error:
> 
> As we discussed IRL, I've reworded the commit log with your input.

Thanks for improving the commit log with additional important informations about
the root cause of the issue.

I really appreciate and I'll try to do even better next time :)

Best regards,
Romain


> 
>>   # efivar -l
>>   traps: efivar[86] trap invalid opcode ip:7fc187f4c7f4 sp:7fff9bbaa930 error:0 in libefivar.so.1.38[7fc187f4c000+16000]
>>   Illegal instruction
>>
>> Actually this error can be reproduced by installing other packages like
>> "file" because the qemu emulation doesn't provide all assembler
>> instruction emulation required by x86-64-core-i7 target used by
>> TestGrubX8664EFI.
>>
>> A similar issue has been fixed in toolchain-builder by adding Nehalem
>> cpu emulation on the qemu command line [2].
>>
>> Fixes:
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/6093853712
>>
>> [1] 7e0e6e3b8618ab942f25b11ee72fbc5a4deefdf1
>> [2] https://gitlab.com/buildroot.org/toolchains-builder/-/commit/f2b253732b4d1fc5b87badba7c2d48f12a197f76
>>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> 
> Applied to master, thanks.
> 
> Regards,
> Yann E. MORIN.
> 
>> ---
>>  support/testing/tests/boot/test_grub.py | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/support/testing/tests/boot/test_grub.py b/support/testing/tests/boot/test_grub.py
>> index 9f3a6a8495..5315fa23ba 100644
>> --- a/support/testing/tests/boot/test_grub.py
>> +++ b/support/testing/tests/boot/test_grub.py
>> @@ -120,7 +120,7 @@ class TestGrubX8664EFI(infra.basetest.BRTest):
>>          # https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3
>>          # http://lists.busybox.net/pipermail/buildroot/2023-July/670825.html
>>          qemu_fw_cfg = "name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes"
>> -        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-hda", hda, "-fw_cfg", qemu_fw_cfg])
>> +        self.emulator.boot(arch="x86_64", options=["-bios", bios, "-cpu", "Nehalem", "-hda", hda, "-fw_cfg", qemu_fw_cfg])
>>          self.emulator.login()
>>  
>>          cmd = "modprobe efivarfs"
>> -- 
>> 2.43.0
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-05 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 13:35 [Buildroot] [PATCH] support/testing: TestGrubX8664EFI: use Nehalem cpu emulation Romain Naour
2024-02-05 16:04 ` Yann E. MORIN
2024-02-05 17:37   ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox