From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 10 03:36:40 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 729) id 6F5A216A4BF; Fri, 10 Oct 2003 03:36:40 -0700 (PDT) To: freebsd-hackers@freebsd.org Cc: Message-Id: <20031010103640.6F5A216A4BF@hub.freebsd.org> Date: Fri, 10 Oct 2003 03:36:40 -0700 (PDT) From: jkoshy@FreeBSD.ORG (Joseph Koshy) Subject: Determining CPU features / cache organization from userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 10:36:40 -0000 Hi -hackers, I'm looking for ways that a userland program can determine the CPU features available on an SMP machine -- processor model, stepping numbers, supported features, cache organization etc. For example, on some x86 processors the CPUID instruction could be used to determine some of these parameters, but using this instruction in an SMP context is a little tricky since we do not know which CPU gets to execute the instruction. Would you know of any existing APIs, in use in other OSes, for retrieving this kind of information? Regards, Koshy