Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Aug 1996 08:48:37 +0530
From:      A JOSEPH KOSHY <koshy@india.hp.com>
To:        freebsd-current@freebsd.org
Cc:        committers@freebsd.org
Subject:   Patch to recognize AMD 5x86 cpus
Message-ID:  <199608050318.AA280805117@fakir.india.hp.com>

next in thread | raw e-mail | index | archive | help

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
<koshy@india.hp.com>	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);





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608050318.AA280805117>