This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Fwd: libpthread.so illegal cpuid on 486
- From: Daniel Goertzen <daniel dot goertzen at gmail dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Tue, 30 Sep 2014 13:08:42 -0500
- Subject: Re: Fwd: libpthread.so illegal cpuid on 486
- Authentication-results: sourceware.org; auth=none
- References: <CAJCf5RzJ07pNpaz-kGz9GnT+5igT3ZJrNZgPe7YFeAkkX97v+Q at mail dot gmail dot com> <CAJCf5Rw9rGVtMFEeH69EWHHRt8KvvJUDoFZf2hQD0ES8kjJsDA at mail dot gmail dot com> <5429BCC7 dot 4080900 at redhat dot com>
I applied the patch to glibc-2.20 and everything starting working
again. Thanks!
There are still cpuid instructions in libpthread.so but I guess they
never get executed. I do not see any cache size crashes.
Cheers,
Dan.
On Mon, Sep 29, 2014 at 3:10 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 09/29/2014 03:54 PM, Daniel Goertzen wrote:
>> After a long struggle trying to get glibc-2.19 running on my 486
>> embedded systems, I discovered that libpthread.so was invoking the
>> "cpuid" instruction. This instruction is not present on most 486 cpus
>> and will cause the program to fail with "Illegal instruction."
>>
>> My system used to work fine with glibc-2.17; it looks like the problem
>> arrived with the new lock elision stuff. I tried building with
>> --disable-lock-elision but the cpuid-based checks are still performed.
>>
>> Am I doing something wrong?
>
> You are doing nothing wrong.
>
>> Is this a bug?
>
> Yes, it's a bug.
>
> If the "HAS_RTM" check is the only thing that's breaking i486,
> then you could try this patch:
> https://sourceware.org/ml/libc-alpha/2014-09/msg00662.html
> Which removes the cpuid call to check for elision initialization.
> It should be checked in as soon as s390 maintainer ACKs.
>
> That isn't all the cpuid calls though, there is one in sysconf
> for getting cache information, so you may wish to test if
> sysconf for _SC_LEVEL1_ICACHE_SIZE crashes and report that
> bug also. For i486 we'll have to just return an error indicating
> we couldn't figure it out.
>
>> Is glibc leaving the 486 behind?
>
> We had no explicit intention of removing i486's from our supported
> machine list. Please follow along with the release schedule and
> help test 486 :-)
>
> Cheers,
> Carlos.
>