Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Intel recommends to print cpu serial numb...



details:   https://anonhg.NetBSD.org/src/rev/b4d4b700e668
branches:  trunk
changeset: 499556:b4d4b700e668
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Nov 22 16:41:56 2000 +0000

description:
Intel recommends to print cpu serial number as six dash-separated nibbles
(XXXX-XXXX-XXXX-XXXX-XXXX-XXXX), make it so

diffstat:

 sys/arch/i386/i386/machdep.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 95d0b94e55e0 -r b4d4b700e668 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Wed Nov 22 16:15:44 2000 +0000
+++ b/sys/arch/i386/i386/machdep.c      Wed Nov 22 16:41:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.419 2000/11/19 23:38:22 jdolecek Exp $   */
+/*     $NetBSD: machdep.c,v 1.420 2000/11/22 16:41:56 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -372,9 +372,12 @@
                printf("cpu0: features %s\n", buf);
        }
 
-       if (cpuid_level >= 3 && ((cpu_feature & CPUID_PN) != 0))
-               printf("cpu0: serial number %08X%08X%08X\n",
-                      cpu_serial[0], cpu_serial[1], cpu_serial[2]);
+       if (cpuid_level >= 3 && ((cpu_feature & CPUID_PN) != 0)) {
+               printf("cpu0: serial number %04X-%04X-%04X-%04X-%04X-%04X\n",
+                       cpu_serial[0] / 65536, cpu_serial[0] % 65536,
+                       cpu_serial[1] / 65536, cpu_serial[1] % 65536,
+                       cpu_serial[2] / 65536, cpu_serial[2] % 65536);
+       }
 
        format_bytes(pbuf, sizeof(pbuf), ptoa(physmem));
        printf("total memory = %s\n", pbuf);



Home | Main Index | Thread Index | Old Index