Fwd: Re: Core Topology

Marcus Overhagen <ml-j/[email protected]> Sun, 19 Apr 2009 12:36:29 +0200
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------090104080803070901010105
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

it looks like my previos mail never made it to the list. I'm resending it.

--------------090104080803070901010105
Content-Type: message/rfc822;
	name="Re: [Open-beos-kernel-devel] Core Topology.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="Re: [Open-beos-kernel-devel] Core Topology.eml"

Message-ID: <[email protected]>
Date: Thu, 09 Apr 2009 00:37:57 +0200
From: Marcus Overhagen <[email protected]>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Open BeOS kernel development <open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [Open-beos-kernel-devel] Core Topology
References: <f019d2f30903210849n18db8df5ne34bef71863eb1e4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>	<5F674981-70A4-47B9-A3C5-231D00B2C056-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>	<f019d2f30903220903k125a3bebh78eb3a6ced1064b1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>	<20090322180646.364.1-Zo55g98pwZSDy9R9CggG9Q0JkcsJGQge@public.gmane.org>	<f019d2f30903230646o108a4e5djcb62e7762e55f7f0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>	<[email protected]>	<f019d2f30903230901j664068e8ldfa651eb91dc52b8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
	<[email protected]>
In-Reply-To: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Christian Packmann schrieb:

> The current implementation in Haiku only allows CPUID input in register 
> EAX; some recent CPUID functions on Intel also require an input in ECX to 
> indicate the requested level of the topology. So there needs to be a new 
> CPUID wrapper which also allows for inputs to ECX. I already mentioned 

We could add an
get_cpuid_etc(cpuid_info *, const cpuid_params *, uint32 flags)

struct cpuid_params {
   uint32	cpuNum;
   uint32	eax;
   uint32	ebx;
   uint32	edx;
   uint32	ecx;
};


Or we use a macro as in get_sem_info and break source compatibility.


status_t get_cpuid(cpuid_info *info, uint32 eaxRegister, uint32 cpuNum);
status_t _get_cpuid_etc(cpuid_info *, const cpuid_params *);

#define get_cpuid(info, param) _get_cpuid_etc(info, param)

which would overlay get_cpuid calls while still retaining binary 
compatibility.


optionally, extend the cpuid_info struct

typedef union {
[...]
   struct {
     uint32	eax;
     uint32	ebx;
     uint32	edx;
     uint32	ecx;
   } inputs;
} cpuid_info;

instead of adding the params struct.

regards
Marcus


--------------090104080803070901010105
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
--------------090104080803070901010105
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Open-beos-kernel-devel mailing list
Open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel

--------------090104080803070901010105--