Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2010 18:04:07 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208921 - in head/sys: amd64/amd64 conf i386/i386 x86/x86
Message-ID:  <201006081804.o58I473g073875@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jun  8 18:04:07 2010
New Revision: 208921
URL: http://svn.freebsd.org/changeset/base/208921

Log:
  Move the machine check support code to the x86 tree since it is identical
  on i386 and amd64.
  
  Requested by:	alc

Added:
  head/sys/x86/x86/mca.c
     - copied, changed from r208893, head/sys/i386/i386/mca.c
Deleted:
  head/sys/amd64/amd64/mca.c
  head/sys/i386/i386/mca.c
Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.pc98

Modified: head/sys/conf/files.amd64
==============================================================================
--- head/sys/conf/files.amd64	Tue Jun  8 17:54:28 2010	(r208920)
+++ head/sys/conf/files.amd64	Tue Jun  8 18:04:07 2010	(r208921)
@@ -108,7 +108,6 @@ amd64/amd64/io.c		optional	io
 amd64/amd64/legacy.c		standard
 amd64/amd64/locore.S		standard	no-obj
 amd64/amd64/machdep.c		standard
-amd64/amd64/mca.c		standard
 amd64/amd64/mem.c		optional	mem
 amd64/amd64/minidump_machdep.c	standard
 amd64/amd64/mp_machdep.c	optional	smp
@@ -306,3 +305,4 @@ x86/isa/nmi.c			standard
 x86/isa/orm.c			optional	isa
 x86/x86/io_apic.c		standard
 x86/x86/local_apic.c		standard
+x86/x86/mca.c			standard

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Tue Jun  8 17:54:28 2010	(r208920)
+++ head/sys/conf/files.i386	Tue Jun  8 18:04:07 2010	(r208921)
@@ -276,7 +276,6 @@ i386/xen/locore.s		optional xen	no-obj
 i386/i386/longrun.c		optional cpu_enable_longrun
 i386/i386/machdep.c		standard
 i386/xen/xen_machdep.c		optional xen
-i386/i386/mca.c			standard
 i386/i386/mem.c			optional mem
 i386/i386/minidump_machdep.c	standard
 i386/i386/mp_clock.c		optional smp
@@ -390,3 +389,4 @@ x86/isa/nmi.c			standard
 x86/isa/orm.c			optional isa
 x86/x86/io_apic.c		optional apic
 x86/x86/local_apic.c		optional apic
+x86/x86/mca.c			standard

Modified: head/sys/conf/files.pc98
==============================================================================
--- head/sys/conf/files.pc98	Tue Jun  8 17:54:28 2010	(r208920)
+++ head/sys/conf/files.pc98	Tue Jun  8 18:04:07 2010	(r208921)
@@ -151,7 +151,6 @@ i386/i386/io.c			optional io
 i386/i386/k6_mem.c		optional mem
 i386/i386/legacy.c		standard
 i386/i386/locore.s		standard	no-obj
-i386/i386/mca.c			standard
 i386/i386/mem.c			optional mem
 i386/i386/minidump_machdep.c	standard
 i386/i386/mp_clock.c		optional smp
@@ -258,3 +257,4 @@ x86/isa/atpic.c			optional atpic	
 x86/isa/isa.c			optional isa
 x86/x86/io_apic.c		optional apic
 x86/x86/local_apic.c		optional apic
+x86/x86/mca.c			standard

Copied and modified: head/sys/x86/x86/mca.c (from r208893, head/sys/i386/i386/mca.c)
==============================================================================
--- head/sys/i386/i386/mca.c	Mon Jun  7 13:44:04 2010	(r208893, copy source)
+++ head/sys/x86/x86/mca.c	Tue Jun  8 18:04:07 2010	(r208921)
@@ -32,7 +32,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#ifdef __amd64__
+#define	DEV_APIC
+#else
 #include "opt_apic.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -837,8 +841,9 @@ mca_intr(void)
 		 * Just print the values of the old Pentium registers
 		 * and panic.
 		 */
-		printf("MC Type: 0x%llx  Address: 0x%llx\n",
-		    rdmsr(MSR_P5_MC_TYPE), rdmsr(MSR_P5_MC_ADDR));
+		printf("MC Type: 0x%jx  Address: 0x%jx\n",
+		    (uintmax_t)rdmsr(MSR_P5_MC_TYPE),
+		    (uintmax_t)rdmsr(MSR_P5_MC_ADDR));
 		return (0);
 	}
 



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