From owner-freebsd-bugs Sat Jul 31 1:22: 1 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 591BB14DF2 for ; Sat, 31 Jul 1999 01:21:59 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA05774; Sat, 31 Jul 1999 01:20:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from smtp2.free.fr (smtp2.free.fr [212.27.32.6]) by hub.freebsd.org (Postfix) with ESMTP id B4C6514D32 for ; Sat, 31 Jul 1999 01:17:08 -0700 (PDT) (envelope-from hubert.tournier@online.fr) Received: from online.fr (paris11-50-21.dial.proxad.net [212.27.50.21]) by smtp2.free.fr (8.9.3/8.9.3/Debian/GNU) with ESMTP id KAA20062 for ; Sat, 31 Jul 1999 10:16:25 +0200 Message-Id: <37A2B16A.D4159733@online.fr> Date: Sat, 31 Jul 1999 10:18:50 +0200 From: Thao et Hubert Tournier To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12896: Incorrect CPU model display at boot time Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12896 >Category: kern >Synopsis: Incorrect CPU model display at boot time >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 31 01:20:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: hubert.tournier@online.fr >Release: FreeBSD 3.2-RELEASE i386 >Organization: home >Environment: Only for machines with AMD processors. >Description: At boot time, I've the following display : CPU: \^E (400.91-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping=12 Features=0x8021bf instead of : CPU: AMD K6-2 (400.91-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping=12 Features=0x8021bf >How-To-Repeat: Reboot. It's systematic. >Fix: In "/sys/i386/i386/identcpu.c", near line 313, the "cpu_model" variable is overwritten with the memcpy functions. [...] printcpuinfo(void) { [...] do_cpuid(0x80000000, regs); nreg = regs[0]; if (nreg >= 0x80000004) { do_cpuid(0x80000002, regs); memcpy(cpu_model, regs, sizeof regs); do_cpuid(0x80000003, regs); memcpy(cpu_model+16, regs, sizeof regs); do_cpuid(0x80000004, regs); memcpy(cpu_model+32, regs, sizeof regs); } [...] } [...] Obviously, the cpu_model variable, a string, was not meant to receive integer values. As I don't understand the purpose of the do_cpuid function, I just wrap this part of the code with the following lines : { char cpu_model_backup[128]; [...] strcpy(cpu_model_backup, cpu_model); [block] strcpy(cpu_model, cpu_model_backup); [...] It's a kludge but it fixes the problem ;-) >Release-Note: >Audit-Trail: >Unformatted: X-send-pr-version: 3.2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message