From owner-freebsd-current Sun Aug 4 20:16:48 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA13928 for current-outgoing; Sun, 4 Aug 1996 20:16:48 -0700 (PDT) Received: from hp.com (hp.com [15.255.152.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id UAA13915; Sun, 4 Aug 1996 20:16:31 -0700 (PDT) Received: from fakir.india.hp.com by hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA242454982; Sun, 4 Aug 1996 20:16:27 -0700 Received: from localhost by fakir.india.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA280805117; Mon, 5 Aug 1996 08:48:38 +0530 Message-Id: <199608050318.AA280805117@fakir.india.hp.com> To: freebsd-current@freebsd.org Cc: committers@freebsd.org Subject: Patch to recognize AMD 5x86 cpus Date: Mon, 05 Aug 1996 08:48:37 +0530 From: A JOSEPH KOSHY Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Enclosed is a patch to recognize and print the kind of AMD 5x86 cpu on-board at boot time. This is per AMD's application note on CPU recognition. Sample boot time output from my machine: FreeBSD 2.2-CURRENT #1: Sat Aug 3 10:06:03 1996 koshy@orthanc:/usr/src/sys/compile/ORTHANC Calibrating clock(s) relative to mc146818A clock... i8254 clock: 1193604 Hz CPU: AMD Am5x86 Write-Back (486-class CPU) Origin = "AuthenticAMD" Id = 0x4f4 real memory = 16777216 (16384K bytes) avail memory = 15036416 (14684K bytes) ...etc... The patch is wrt -current as of Fri 2nd Aug 1996. Can someone review // commit these changes please? Koshy My Personal Opinions Only. -------------------------------PATCH---------------------------------- --- identcpu.c.ctm Fri Jul 12 19:40:58 1996 +++ identcpu.c Tue Jul 16 20:47:57 1996 @@ -148,6 +148,20 @@ break; } } + } else if (!strcmp(cpu_vendor,"AuthenticAMD")) { + cpu_model[0] = '\0'; + strcpy(cpu_model, "AMD "); + switch (cpu_id & 0xF0) { + case 0xE0: + strcat(cpu_model, "Am5x86 Write-Through"); + break; + case 0xF0: + strcat(cpu_model, "Am5x86 Write-Back"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } } #endif printf("%s (", cpu_model);