This still affects Ubuntu 26.04 LTS (resolute) with bochsbios 2.8+dfsg-1,
and the cause and fix are both known.

Symptom: with "romimage: file=/usr/share/bochs/BIOS-bochs-latest",
rombios32 prints "Found N cpu(s)", then jumps into its own build-date
string and triple-faults, in a loop. No MP or ACPI tables are built. In
my log EIP is 0x322f3330 ("03/2", from the build date 05/03/24); the read
at 0x322f3130 in this bug's log is the same failure with another date.

Cause: Debian bug #1082917, fixed in Debian 2.8+dfsg-2 (October 2024) and
backported to bookworm as 2.7+dfsg-4+deb12u1. The BIOS was built for the
cross compiler's default i686 instead of a 386.
https://bugs.debian.org/1082917

I tested the fix: bochsbios 2.8+dfsg-2 from snapshot.debian.org boots
under Ubuntu's Bochs 2.8 with "cpu: count=2", builds the MP and ACPI
tables and boots the disk. Ubuntu's 2.8+dfsg-1 resets in a loop with the
same configuration.

Why the fix has not reached Ubuntu: 2.8+dfsg-2 and 3.0+dfsg-1 were synced
into -proposed (plucky, questing, resolute, stonking, tenacious), but the
amd64 build, which also builds the arch:all bochsbios, fails:

  i686-linux-gnu-gcc -march=i386 -fno-stack-protector 
"-DBIOS_BUILD_DATE=\"03/02/25\"" -E -P rombios.c > _rombios_.c
  cc1: error: '-fcf-protection' is not compatible with this target
  make[2]: *** [Makefile:104: rombios16.bin] Error 1

https://launchpad.net/ubuntu/+source/bochs/3.0+dfsg-1/+build/31347604

Ubuntu's i686-linux-gnu-gcc enables -fcf-protection by default, and gcc
rejects it together with -march=i386. Adding -fcf-protection=none to
GCC32 in debian/rules (override_dh_auto_build-indep) should fix it. I have
not been able to test this with Ubuntu's cross compiler:

-       $(MAKE) -C bios GCC32="i686-linux-gnu-gcc -march=i386 
-fno-stack-protector" LD32="i686-linux-gnu-ld" 
OBJCOPY32="i686-linux-gnu-objcopy"
+       $(MAKE) -C bios GCC32="i686-linux-gnu-gcc -march=i386 
-fno-stack-protector -fcf-protection=none" LD32="i686-linux-gnu-ld" 
OBJCOPY32="i686-linux-gnu-objcopy"

Separately, the ppc64el build of 3.0+dfsg-1 fails with an internal
compiler error (cpu/avx/xop.cc, gen_split_627 at config/rs6000/vsx.md:4086,
build 31348027), which also blocks migration.

Could the BIOS fix be SRUed to 26.04 LTS?

[Impact] BIOS-bochs-latest, the default system BIOS, cannot boot anything:
it resets in a loop during POST.

[Test plan]
1. Install bochs, bochs-x and bochsbios.
2. Boot any disk image with romimage BIOS-bochs-latest.
3. Broken: the log shows "Starting rombios32", "Found 1 cpu(s)", then
   "3rd (13) exception with no resolution ... resetting", repeating.
   Fixed: the log shows "MP table addr=...", "ACPI tables: RSDP addr=..."
   and "Booting from 0000:7c00".

[Where problems could occur] Only the BIOS ROM images in bochsbios change.
BIOS-bochs-legacy and BIOS-qemu-latest are also rebuilt for a 386, as in
Debian since 2.8+dfsg-2.

Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2019531

Title:
  faulty Bochs BIOS file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bochs/+bug/2019531/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to