Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 8 months ago

Last modified 8 months ago

#817 new defect

CPU target not set correctly for ia32 userspace

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone:
Component: helenos-build/ia32 Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

It appears that -march is not passed to compiler when building ia32 target.

This is suggested by meson/arch/ia32/meson.build line 37 which I quote:

# FIXME: enabling -march for uspace makes malloc tests crash. Investigate.

And when I compiled with i486 as processor, I found conditional move (cmove..) instructions in the vterm binary. Conditional move instructions were introduced in Pentium Pro (and are not supported by all CPUs of that family).

This means, among other things, that userspace would not work properly on older CPUs despite properly setting CPU as i486 in the build configuration.

Change History (1)

comment:1 Changed 8 months ago by Jiri Svoboda

I tried various combinations of CPU config, qemu versions and options:

  • HelenOS configured for i486 in Qemu 2.12 or 4.0 using qemu-system-i386 -cpu 486 (works, but SHOULD NOT)
  • HelenOS configured for i486 in Qemu 2.12 or 4.0 using qemu-system-i386 -M isapc -cpu 486 (seems to work, serial console output, but no graphics)
  • HelenOS configured for Pentium4 in Qemu 2.12 or 4.0 using qemu-system-i386 --cpu 486 (fails, as expected)

Not sure about the lack of grahics output with -M isapc but even with that option it seems userspace tasks work, so not event {{{-M isapc -cpu 486} can be trusted to accurately restrict the CPU features to those of a 486 processor, so running in Qemu is not a valid test.

Note: See TracTickets for help on using tickets.