[Mono-bugs] [Bug 584198] New: Improvements to /proc/cpuinfo parsing on ARM, notably for qemu

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 1 04:43:37 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=584198

http://bugzilla.novell.com/show_bug.cgi?id=584198#c0


           Summary: Improvements to /proc/cpuinfo parsing on ARM, notably
                    for qemu
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: All
        OS/Version: Ubuntu
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: lool at dooz.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=345551)
 --> (http://bugzilla.novell.com/attachment.cgi?id=345551)
ARM cpuinfo parsing improvements dpatch

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2)
Gecko/20100222 Ubuntu/10.04 (lucid) Firefox/3.6

Hi

The mono ARM JIT implementation reads /proc/cpuinfo to check the family of the
ARM CPU it's running on and whether it supports Thumb.  When cpuinfo is missing
or has data mono can't parse, it assumes non-thumb and <= ARMv4, and if you urn
some thumb code, it triggers an assertion failure.

/proc/cpuinfo is typically missing in chroots if you don't mount /proc, and
might have bogus data when using qemu-arm syscall emulation; the latter is
clearly a qemu bug, but I think it makes sense to improve the cpudetection
routine to handle the case where the data doesn't seem like it's an ARM CPU. 
The parsing is relatively weak in that it looks for "(v" in the Processor line
and uses the digit after that to decide of the ARM family.

I'd like to propose merging the attached patch.

One important thing to keep in mind is that families older than ARMv4 (and in
fact even some ARMv4 families) aren't supported anymore and all ARMv5 and later
families have Thumb.  So I believe the only case where we care that Thumb might
not be enabled is when Processor is ARMv4 and Features lacks "thumb".

Thanks,

Reproducible: Always

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list