From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 15:46:42 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94E5E1065693; Mon, 23 Aug 2010 15:46:42 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE5568FC19; Mon, 23 Aug 2010 15:46:41 +0000 (UTC) Received: by bwz20 with SMTP id 20so114710bwz.13 for ; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=6O1XWW481q4YY+U9UJ7AFdp+RI+mie2pHy77Zk6e44w=; b=qSW16/m8ixCtV4UOtnfJuFV35zHK4AL28bq2g2VUXPhMDnxJ5qpli4vd1DYQPjhQik Y56V4zg7xcRQsHrjBDc6J6kEXtbkZIVgUTBp9LZfs98vHPkE2BjqwofNHe5dvU1CfKPU vYnuljXHXNKRYkyTVUS3eTM3oYp8Bv96nz2Ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=PjClt7t9wn93YpAPTZ9xUd7olXwHB1rx9y8zpkc8RIlTeeavrU7Z2kWQHb+WdOvxQE SXxZ40iBg0y5nodSfHdG/Q6/OeBZuyW18Rzt1iyzu4UgcNPud1ZcAv2cLfDxz5ijXa0i /3NcWprTIG/lxVUdfcOnVtTX7WaKX9zdfwssQ= MIME-Version: 1.0 Received: by 10.204.29.23 with SMTP id o23mr3830587bkc.13.1282578400396; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.82.6 with HTTP; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) In-Reply-To: <201008230807.59582.jhb@freebsd.org> References: <201008230807.59582.jhb@freebsd.org> Date: Mon, 23 Aug 2010 08:46:40 -0700 X-Google-Sender-Auth: xVYciolMvR9zFy4ALoh6RuWhcBI Message-ID: From: Garrett Cooper To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Question about printcpuinfo in sys/amd64/amd64/indentcpu.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 15:46:42 -0000 On Mon, Aug 23, 2010 at 5:07 AM, John Baldwin wrote: > On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote: >> Hi, >> =A0 =A0 Currently the code in identcpu.c does a check for a specific cpu >> value extension. This is set to 0x80000004 (even though the >> corresponding code below iterates through 0x80000002:0x80000005): > > It does not invoke 0x80000005 (<, not <=3D, is used as the loop terminato= r). > >> =A0 =A0 =A0 =A0 /* Check for extended CPUID information and a processor = name. */ >> =A0 =A0 =A0 =A0 if (cpu_exthigh >=3D 0x80000004) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand =3D cpu_brand; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (i =3D 0x80000002; i < 0x80000005; i= ++) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 do_cpuid(i, regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(brand, regs, size= of(regs)); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand +=3D sizeof(regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 } I'm blind :/. I did some poking around and now I know why it's doing that. It's checking for the items noted in chapter 4.2 Brand String under the "Intel Processor Identification and the CPUID Instruction" spec. Thanks, -Garrett