Subject: duplicate AMD k8 MSR definitions
To: NetBSD amd64 <port-amd64@NetBSD.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: port-amd64
Date: 06/06/2007 19:52:09
--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
I just noticed that AMD K8 (Opteron, ...) MSR definitions are
duplicated in `sys/arch/amd64/include/specialreg.h' and
`sys/arch/x86/include/specialreg.h'.
Ok to apply the attached patch ?
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="netbsd-amdk8msr.diff"
Index: sys/arch/amd64/include/specialreg.h
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/include/specialreg.h,v
retrieving revision 1.3
diff -u -r1.3 specialreg.h
--- sys/arch/amd64/include/specialreg.h 11 Dec 2005 12:16:25 -0000 1.3
+++ sys/arch/amd64/include/specialreg.h 6 Jun 2007 14:06:17 -0000
@@ -1,23 +1,3 @@
/* $NetBSD: specialreg.h,v 1.3 2005/12/11 12:16:25 christos Exp $ */
#include <x86/specialreg.h>
-
-/*
- * Extended Feature Enable Register of the x86-64
- */
-
-#define MSR_EFER 0xc0000080
-
-#define EFER_SCE 0x00000001 /* SYSCALL extension */
-#define EFER_LME 0x00000100 /* Long Mode Active */
-#define EFER_LMA 0x00000400 /* Long Mode Enabled */
-#define EFER_NXE 0x00000800 /* No-Execute Enabled */
-
-#define MSR_STAR 0xc0000081 /* 32 bit syscall gate addr */
-#define MSR_LSTAR 0xc0000082 /* 64 bit syscall gate addr */
-#define MSR_CSTAR 0xc0000083 /* compat syscall gate addr */
-#define MSR_SFMASK 0xc0000084 /* flags to clear on syscall */
-
-#define MSR_FSBASE 0xc0000100 /* 64bit offset for fs: */
-#define MSR_GSBASE 0xc0000101 /* 64bit offset for gs: */
-#define MSR_KERNELGSBASE 0xc0000102 /* storage for swapgs ins */
--PNTmBPCT7hxwcZjr--