Opened 4 years ago

Closed 2 years ago

#817 closed defect (duplicate)

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: #830
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 (3)

comment:1 by Jiri Svoboda, 4 years ago

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.

comment:2 by Jakub Jermář, 2 years ago

Is this a duplicate of #830?

comment:3 by Jiri Svoboda, 2 years ago

Depends on: #830
Resolution: duplicate
Status: newclosed

Indeed it is. Closing as duplicate of #830.

Note: See TracTickets for help on using tickets.