[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1738202] Re: qemu 2.11 segfaults on elf file that work
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [Bug 1738202] Re: qemu 2.11 segfaults on elf file that worked with qemu2.7 |
Date: |
Thu, 14 Dec 2017 13:24:29 -0000 |
Your command line is badly broken: "-M integratorcp" requests a model of
an integratorcp board, but "-cpu cortex-m4" tries to put an M-profile
CPU in it, which is not something that board can support. In particular
the resulting system model will have no NVIC in it. This only worked by
accident in previous versions of QEMU.
Ideally we should have better cpu-model compatibility checking in the
board models, in which case we could print a message saying "CPU type
cortex-m4 is not compatible with the integratorcp board" rather than
crashing.
If you omit -cpu you'll get the default CPU type for the board, which is
an arm926. That's a sensible board+cpu combination but presumably your
guest code is not built to run on that hardware, which will be why it
just falls over. ("QEMU prints no output" often means "guest code has
crashed or gone into an infinite loop", rather than a QEMU bug.)
If your code needs to run on an M-profile CPU then you'll need to pick
one of the M-profile board models. As of 2.11 those are lm3s6965evb,
lm3s811evb, mps2-an385, mps2-an511, netduino2.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1738202
Title:
qemu 2.11 segfaults on elf file that worked with qemu2.7
Status in QEMU:
New
Bug description:
running on cygwin in Windows 7
QEMU 2.10.93 segfaults:
$ /opt/qemu2.11/qemu-system-arm -M integratorcp -cpu cortex-m4 -semihosting
-nographic -monitor null -serial null -no-reboot -kernel
MFWso_Cycle_f1uP2_CUNIT_0.elf
Segmentation fault
where QEMU 2.7.0 worked:
$ /opt/qemu2.7/qemu-system-arm -M integratorcp -cpu cortex-m4 -semihosting
-nographic -monitor null -serial null -no-reboot -kernel
MFWso_Cycle_f1uP2_CUNIT_0.elf
------------ CUnit_MFWso_Cycle_f1 ------------
CUnit - A Unit testing framework for C - Version 2.1-0
http://cunit.sourceforge.net/
Suite: Suite_MFWso_Cycle_f1
Test: MFWso_Cycle_f1() ... passed
Test: MFWso_GetPhysicalStateData() ... passed
Test: MFWso_GetOutputData() ... passed
Test: MFWso_GetSafeChannelOK() ... passed
--Run Summary: Type Total Ran Passed Failed
suites 1 1 n/a 0
tests 4 4 4 0
asserts 54 54 54 0
----------------------------------------
Omitting the -cpu parameter results (for both versions) to hang of
qemu (no output, no end, full cpu load).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1738202/+subscriptions