[haiku-development] Re: Fixing get_cpu_model_string(), Ticket 3541

  • From: Christian Packmann <Christian.Packmann@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 20 Jun 2009 19:57:30 +0200

Urias McCullough - 2009-06-20 16:05 :
On Sat, Jun 20, 2009 at 7:02 AM, Christian
Packmann<Christian.Packmann@xxxxxx> wrote:

I realized I didn't provide an example of what I needed, so I'll paste
a link to my "computer list" on seti@home (not a project I crunch
much):

http://setiathome.berkeley.edu/hosts_user.php?sort=rpc_time&rev=0&show_all=1&userid=8542071

You'll see Haiku there at the top.

Hm, are those the strings which are internally used for identification?
They're inconsistent: some have family/model/stepping while others don't;
some have x86 or AMD64 in the square brackets, some not. I assume that's
some BOINC code which generates these?

What you don't see there is the string of features... Haiku's sysinfo
is lacking a few, I need to send a patch for that :)

That would be nice. But I think that sysinfo needs a wide rewrite anyway, as the internals seem pretty Intel-centric. I wouldn't want to add complete parsing of Via and Transmeta to that code.

Hm, actually I would prefer this being part of the API. As it is, the code
in the header will be compiled into at least three programs (AboutHaiku,
Pulse, sysinfo), which is a waste of space. And if there were API calls,
there could be two: one which just "cleans" the strings, and another which
generates short strings for use in Pulse etc.

I would like an API for it ;)

I'll certainly implement this in my own CPUID code. So even if such functionality doesn't make it in Haiku, you can fall back on that. The code will initially be included only with Benchy source releases, but I'll make a separate archive when it's somewhat mature.

For most systems, the BOINC code is simply using procfs
(/proc/cpuinfo) - but obviously we don't have this.

Ah, this probably constitutes the "standard" then. I'll have to take a look at the string definitions in Linux.

> On Windows, I
believe there's an API to get this info as well.

Yes, but IIRC it's horribly out of date and programmers have to roll their own code if they want to detect more recent feature flags.

Christian

Other related posts: