CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Thu May 30 21:40:40 UTC 2019 Modified Files: src/sys/arch/x86/include: cpufunc.h Log Message: use __asm To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/cpufunc.h diff -u src/sys/arch/x86/include/cpufunc.h:1.31 src/sys/arch/x86/include/cpufunc.h:1.32 --- src/sys/arch/x86/include/cpufunc.h:1.31 Wed May 29 12:54:41 2019 +++ src/sys/arch/x86/include/cpufunc.h Thu May 30 17:40:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.31 2019/05/29 16:54:41 maxv Exp $ */ +/* $NetBSD: cpufunc.h,v 1.32 2019/05/30 21:40:40 christos Exp $ */ /* * Copyright (c) 1998, 2007, 2019 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ static inline void x86_pause(void) { - asm volatile ("pause"); + __asm volatile ("pause"); } void x86_lfence(void); @@ -81,7 +81,7 @@ invpcid(register_t op, uint64_t pcid, va .addr = va }; - asm volatile ( + __asm volatile ( "invpcid %[desc],%[op]" : : [desc] "m" (desc), [op] "r" (op) @@ -94,7 +94,7 @@ rdtsc(void) { uint32_t low, high; - asm volatile ( + __asm volatile ( "rdtsc" : "=a" (low), "=d" (high) : @@ -127,7 +127,7 @@ x86_getss(void) { uint16_t val; - asm volatile ( + __asm volatile ( "mov %%ss,%[val]" : [val] "=r" (val) : @@ -138,7 +138,7 @@ x86_getss(void) static inline void setds(uint16_t val) { - asm volatile ( + __asm volatile ( "mov %[val],%%ds" : : [val] "r" (val) @@ -148,7 +148,7 @@ setds(uint16_t val) static inline void setes(uint16_t val) { - asm volatile ( + __asm volatile ( "mov %[val],%%es" : : [val] "r" (val) @@ -158,7 +158,7 @@ setes(uint16_t val) static inline void setfs(uint16_t val) { - asm volatile ( + __asm volatile ( "mov %[val],%%fs" : : [val] "r" (val) @@ -172,7 +172,7 @@ void setusergs(int); #define FUNC_CR(crnum) \ static inline void lcr##crnum(register_t val) \ { \ - asm volatile (\ + __asm volatile (\ "mov %[val],%%cr" #crnum \ :\ : [val] "r" (val) \ @@ -181,7 +181,7 @@ void setusergs(int); static inline register_t rcr##crnum(void) \ { \ register_t val;\ - asm volatile (\ + __asm volatile (\ "mov %%cr" #crnum ",%[val]" \ : [val] "=r" (val) \ :\ @@ -211,7 +211,7 @@ FUNC_CR(8) #define FUNC_DR(drnum) \ static inline void ldr##drnum(register_t val) \ { \ - asm volatile (\ + __asm volatile (\ "mov %[val],%%dr" #drnum \ :\ : [val] "r" (val) \ @@ -220,7 +220,7 @@ FUNC_CR(8) static inline register_t rdr##drnum(void) \ { \ register_t val;\ - asm volatile (\ + __asm volatile (\ "mov %%dr" #drnum ",%[val]" \ : [val] "=r" (val) \ :\ @@ -255,13 +255,13 @@ union savefpu; static inline void fninit(void) { - asm volatile ("fninit"); + __asm volatile ("fninit"); } static inline void fnclex(void) { - asm volatile ("fnclex"); + __asm volatile ("fnclex"); } void fnsave(union savefpu *); @@ -273,7 +273,7 @@ void frstor(const union savefpu *); static inline void clts(void) { - asm volatile ("clts"); + __asm volatile ("clts"); } void stts(void); @@ -289,7 +289,7 @@ rdxcr(uint32_t xcr) { uint32_t low, high; - asm volatile ( + __asm volatile ( "xgetbv" : "=a" (low), "=d" (high) : "c" (xcr) @@ -305,7 +305,7 @@ wrxcr(uint32_t xcr, uint64_t val) low = val; high = val >> 32; - asm volatile ( + __asm volatile ( "xsetbv" : : "a" (low), "d" (high), "c" (xcr) @@ -325,13 +325,13 @@ void x86_enable_intr(void); static inline void x86_disable_intr(void) { - asm volatile ("cli"); + __asm volatile ("cli"); } static inline void x86_enable_intr(void) { - asm volatile ("sti"); + __asm volatile ("sti"); } #endif /* XENPV */ @@ -358,7 +358,7 @@ rdmsr(u_int msr) { uint32_t low, high; - asm volatile ( + __asm volatile ( "rdmsr" : "=a" (low), "=d" (high) : "c" (msr) @@ -377,7 +377,7 @@ wrmsr(u_int msr, uint64_t val) low = val; high = val >> 32; - asm volatile ( + __asm volatile ( "wrmsr" : : "a" (low), "d" (high), "c" (msr)
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Thu May 30 21:40:40 UTC 2019 Modified Files: src/sys/arch/x86/include: cpufunc.h Log Message: use __asm To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Sat May 18 08:17:39 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Clean up a little, add new XCR0 bits, remove a few unused MSRs, and fix typos. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.145 src/sys/arch/x86/include/specialreg.h:1.146 --- src/sys/arch/x86/include/specialreg.h:1.145 Tue May 14 18:11:34 2019 +++ src/sys/arch/x86/include/specialreg.h Sat May 18 08:17:39 2019 @@ -1,6 +1,32 @@ -/* $NetBSD: specialreg.h,v 1.145 2019/05/14 18:11:34 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.146 2019/05/18 08:17:39 maxv Exp $ */ -/*- +/* + * Copyright (c) 2014-2019 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * @@ -32,28 +58,24 @@ */ /* - * Bits in 386 special registers: + * CR0 */ #define CR0_PE 0x0001 /* Protected mode Enable */ #define CR0_MP 0x0002 /* "Math" Present (NPX or NPX emulator) */ #define CR0_EM 0x0004 /* EMulate non-NPX coproc. (trap ESC only) */ #define CR0_TS 0x0008 /* Task Switched (if MP, trap ESC and WAIT) */ #define CR0_ET 0x0010 /* Extension Type (387 (if set) vs 287) */ -#define CR0_PG 0x8000 /* PaGing enable */ - -/* - * Bits in 486 special registers: - */ #define CR0_NE 0x0020 /* Numeric Error enable (EX16 vs IRQ13) */ #define CR0_WP 0x0001 /* Write Protect (honor PTE_W in all modes) */ #define CR0_AM 0x0004 /* Alignment Mask (set to enable AC flag) */ #define CR0_NW 0x2000 /* Not Write-through */ #define CR0_CD 0x4000 /* Cache Disable */ +#define CR0_PG 0x8000 /* PaGing enable */ /* - * Cyrix 486 DLC special registers, accessible as IO ports. + * Cyrix 486 DLC special registers, accessible as IO ports */ -#define CCR0 0xc0 /* configuration control register 0 */ +#define CCR0 0xc0 /* configuration control register 0 */ #define CCR0_NC0 0x01 /* first 64K of each 1M memory region is non-cacheable */ #define CCR0_NC1 0x02 /* 640K-1M region is non-cacheable */ #define CCR0_A20M 0x04 /* enables A20M# input pin */ @@ -62,13 +84,11 @@ #define CCR0_BARB 0x20 /* flushes internal cache when entering hold state */ #define CCR0_CO 0x40 /* cache org: 1=direct mapped, 0=2x set assoc */ #define CCR0_SUSPEND 0x80 /* enables SUSP# and SUSPA# pins */ - -#define CCR1 0xc1 /* configuration control register 1 */ +#define CCR1 0xc1 /* configuration control register 1 */ #define CCR1_RPL 0x01 /* enables RPLSET and RPLVAL# pins */ -/* the remaining 7 bits of this register are reserved */ /* - * bits in the %cr4 control register: + * CR4 */ #define CR4_VME 0x0001 /* virtual 8086 mode extension enable */ #define CR4_PVI 0x0002 /* protected mode virtual interrupt enable */ @@ -102,21 +122,22 @@ #define XCR0_Opmask 0x0020 /* AVX-512 Opmask */ #define XCR0_ZMM_Hi256 0x0040 /* AVX-512 upper 256 bits low regs */ #define XCR0_Hi16_ZMM 0x0080 /* AVX-512 512 bits upper registers */ +#define XCR0_PT 0x0100 /* Processor Trace state */ +#define XCR0_PKRU 0x0200 /* Protection Key state */ +#define XCR0_HDC 0x2000 /* Hardware Duty Cycle state */ + +#define XCR0_FLAGS1 "\20" \ + "\1" "x87" "\2" "SSE" "\3" "AVX" \ + "\4" "BNDREGS" "\5" "BNDCSR" "\6" "Opmask" \ + "\7" "ZMM_Hi256" "\10" "Hi16_ZMM" "\11"
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Sat May 18 08:17:39 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Clean up a little, add new XCR0 bits, remove a few unused MSRs, and fix typos. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Tue May 14 18:11:34 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add snprintb's string for cpuid7 edx bit 10 "MD_CLEAR". To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Tue May 14 18:11:34 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add snprintb's string for cpuid7 edx bit 10 "MD_CLEAR". To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.144 src/sys/arch/x86/include/specialreg.h:1.145 --- src/sys/arch/x86/include/specialreg.h:1.144 Tue May 14 16:59:26 2019 +++ src/sys/arch/x86/include/specialreg.h Tue May 14 18:11:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.144 2019/05/14 16:59:26 maxv Exp $ */ +/* $NetBSD: specialreg.h,v 1.145 2019/05/14 18:11:34 msaitoh Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -437,6 +437,7 @@ #define CPUID_SEF_FLAGS2 "\20" \ "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \ +"\13" "MD_CLEAR" \ "\16" "TSX_FORCE_ABORT"\ "\33" "IBRS" "\34" "STIBP" \ "\35" "L1D_FLUSH" "\36" "ARCH_CAP" "\37CORE_CAP" "\40" "SSBD"
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Sat May 11 13:40:26 UTC 2019 Modified Files: src/sys/arch/x86/include: Makefile cpufunc.h Log Message: Undo previous, fixed in userland. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/include/Makefile cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Sat May 11 13:40:26 UTC 2019 Modified Files: src/sys/arch/x86/include: Makefile cpufunc.h Log Message: Undo previous, fixed in userland. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/include/Makefile cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/Makefile diff -u src/sys/arch/x86/include/Makefile:1.23 src/sys/arch/x86/include/Makefile:1.24 --- src/sys/arch/x86/include/Makefile:1.23 Sat May 11 08:58:17 2019 +++ src/sys/arch/x86/include/Makefile Sat May 11 09:40:26 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2019/05/11 12:58:17 christos Exp $ +# $NetBSD: Makefile,v 1.24 2019/05/11 13:40:26 christos Exp $ INCSDIR=/usr/include/x86 @@ -9,7 +9,6 @@ INCS= aout_machdep.h \ cpu_extended_state.h \ cpu_rng.h \ cpu_ucode.h \ - cpufunc.h \ cputypes.h \ cpuvar.h \ float.h \ Index: src/sys/arch/x86/include/cpufunc.h diff -u src/sys/arch/x86/include/cpufunc.h:1.29 src/sys/arch/x86/include/cpufunc.h:1.30 --- src/sys/arch/x86/include/cpufunc.h:1.29 Sat May 11 08:58:17 2019 +++ src/sys/arch/x86/include/cpufunc.h Sat May 11 09:40:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.29 2019/05/11 12:58:17 christos Exp $ */ +/* $NetBSD: cpufunc.h,v 1.30 2019/05/11 13:40:26 christos Exp $ */ /* * Copyright (c) 1998, 2007, 2019 The NetBSD Foundation, Inc. @@ -329,12 +329,6 @@ void x86_reset(void); */ #define OPTERON_MSR_PASSCODE 0x9c5a203aU -uint64_t rdmsr_locked(u_int); -int rdmsr_safe(u_int, uint64_t *); -void wrmsr_locked(u_int, uint64_t); - -#endif /* _KERNEL */ - static inline uint64_t rdmsr(u_int msr) { @@ -349,6 +343,9 @@ rdmsr(u_int msr) return (low | ((uint64_t)high << 32)); } +uint64_t rdmsr_locked(u_int); +int rdmsr_safe(u_int, uint64_t *); + static inline void wrmsr(u_int msr, uint64_t val) { @@ -363,4 +360,8 @@ wrmsr(u_int msr, uint64_t val) ); } +void wrmsr_locked(u_int, uint64_t); + +#endif /* _KERNEL */ + #endif /* !_X86_CPUFUNC_H_ */
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Sat May 11 12:58:17 UTC 2019 Modified Files: src/sys/arch/x86/include: Makefile cpufunc.h Log Message: expose the {rd,wr}msr functions to userland and install the header for the benefit of cpuctl (fix the build). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/include/Makefile cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/Makefile diff -u src/sys/arch/x86/include/Makefile:1.22 src/sys/arch/x86/include/Makefile:1.23 --- src/sys/arch/x86/include/Makefile:1.22 Sat Feb 17 08:01:23 2018 +++ src/sys/arch/x86/include/Makefile Sat May 11 08:58:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2018/02/17 13:01:23 kamil Exp $ +# $NetBSD: Makefile,v 1.23 2019/05/11 12:58:17 christos Exp $ INCSDIR=/usr/include/x86 @@ -9,6 +9,7 @@ INCS= aout_machdep.h \ cpu_extended_state.h \ cpu_rng.h \ cpu_ucode.h \ + cpufunc.h \ cputypes.h \ cpuvar.h \ float.h \ Index: src/sys/arch/x86/include/cpufunc.h diff -u src/sys/arch/x86/include/cpufunc.h:1.28 src/sys/arch/x86/include/cpufunc.h:1.29 --- src/sys/arch/x86/include/cpufunc.h:1.28 Thu May 9 13:09:50 2019 +++ src/sys/arch/x86/include/cpufunc.h Sat May 11 08:58:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.28 2019/05/09 17:09:50 bouyer Exp $ */ +/* $NetBSD: cpufunc.h,v 1.29 2019/05/11 12:58:17 christos Exp $ */ /* * Copyright (c) 1998, 2007, 2019 The NetBSD Foundation, Inc. @@ -329,6 +329,12 @@ void x86_reset(void); */ #define OPTERON_MSR_PASSCODE 0x9c5a203aU +uint64_t rdmsr_locked(u_int); +int rdmsr_safe(u_int, uint64_t *); +void wrmsr_locked(u_int, uint64_t); + +#endif /* _KERNEL */ + static inline uint64_t rdmsr(u_int msr) { @@ -343,9 +349,6 @@ rdmsr(u_int msr) return (low | ((uint64_t)high << 32)); } -uint64_t rdmsr_locked(u_int); -int rdmsr_safe(u_int, uint64_t *); - static inline void wrmsr(u_int msr, uint64_t val) { @@ -360,8 +363,4 @@ wrmsr(u_int msr, uint64_t val) ); } -void wrmsr_locked(u_int, uint64_t); - -#endif /* _KERNEL */ - #endif /* !_X86_CPUFUNC_H_ */
Re: CVS commit: src/sys/arch/x86/include
On Sun, 15 Jul 2018, Paul Goyette wrote: Any chance that this will fix kern/52919? If not, can we do some additional re-arrangement of struct cpu_info to address the problem? And in any case, shouldn't this cause a bump in kernel version, since you've changed a structure that is shared between kernel and modules? :) Modified Files: src/sys/arch/x86/include: cpu.h Log Message: Hum. Move the __HAVE_DIRECT_MAP block a little below, otherwise dynamically loaded kernel modules use a wrong offset for some ci_* fields. Found when modloading tprof_amd on an AMD 10h, the read of ci_signature was at a wrong address, and the cpu family was not detected correctly. +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: CVS commit: src/sys/arch/x86/include
Any chance that this will fix kern/52919? If not, can we do some additional re-arrangement of struct cpu_info to address the problem? On Sun, 15 Jul 2018, Maxime Villard wrote: Module Name:src Committed By: maxv Date: Sun Jul 15 08:47:43 UTC 2018 Modified Files: src/sys/arch/x86/include: cpu.h Log Message: Hum. Move the __HAVE_DIRECT_MAP block a little below, otherwise dynamically loaded kernel modules use a wrong offset for some ci_* fields. Found when modloading tprof_amd on an AMD 10h, the read of ci_signature was at a wrong address, and the cpu family was not detected correctly. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/x86/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. !DSPAM:5b4b0a35163311665672011! +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: CVS commit: src/sys/arch/x86/include
Le 29/09/2017 à 05:17, Ryota Ozaki a écrit : Module Name:src Committed By: ozaki-r Date: Fri Sep 29 03:17:18 UTC 2017 Modified Files: src/sys/arch/x86/include: pmap.h Log Message: Fix build sys/arch/x86/x86/cpu.c:920:20: error: 'pmap_largepages' undeclared (first use in this function) smp_data.large = (pmap_largepages != 0); ^ To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/x86/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. mmh yes, I patched my test machine but apparently didn't commit the updated diff
Re: CVS commit: src/sys/arch/x86/include
(2013/11/21 15:02), matthew green wrote: Module Name: src Committed By:msaitoh Date:Wed Nov 20 17:50:39 UTC 2013 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: - Add some AMD Fn8001 extended features %ecx bits definitions from the document (AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions. Document revision 3.20) - s/MXX/MMXX/ because this bit is MMX eXtention. i thought it was Multi Media eXtension. MMX: Fn0001 %edx bit 23 (Intel and AMD) Fn8001 %edx bit 23 (Same as Fn0001 %edx, AMD only) AMD MMX Extension: Fn8001 %edx bit 22 (AMD extensions to MMX instruction, AMD Only) See Pase 580 in AMD64 Architecture Programmer's manual Volume 3 revision 3.20 :) -- --- SAITOH Masanobu (msai...@execsw.org msai...@netbsd.org)
re: CVS commit: src/sys/arch/x86/include
Module Name: src Committed By: msaitoh Date: Wed Nov 20 17:50:39 UTC 2013 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: - Add some AMD Fn8001 extended features %ecx bits definitions from the document (AMD64 Architecture ProgrammerVolume 3: General-Purpose and System Instructions. Document revision 3.20) - s/MXX/MMXX/ because this bit is MMX eXtention. i thought it was Multi Media eXtension.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Thu Feb 25 20:48:35 UTC 2010 Modified Files: src/sys/arch/x86/include: pci_machdep.h Log Message: Change the pci_attach_args definition to allow machine-dependent code to override the default pci(9) behavior by creating a non-NULL pci_attach_args_t (on x86, pci_attach_args_t is always NULL) containing one or more non-NULL function pointers. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/pci_machdep.h diff -u src/sys/arch/x86/include/pci_machdep.h:1.12 src/sys/arch/x86/include/pci_machdep.h:1.13 --- src/sys/arch/x86/include/pci_machdep.h:1.12 Wed Feb 24 21:34:23 2010 +++ src/sys/arch/x86/include/pci_machdep.h Thu Feb 25 20:48:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.12 2010/02/24 21:34:23 dyoung Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.13 2010/02/25 20:48:34 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -63,9 +63,8 @@ extern struct x86_bus_dma_tag pci_bus_dma64_tag; #endif -struct { - int dummy; -} pci_chipset_tag; +struct pci_chipset_tag; +struct pci_attach_args; /* * Types provided to machine-independent PCI code @@ -74,6 +73,34 @@ typedef union x86_pci_tag_u pcitag_t; typedef int pci_intr_handle_t; +struct pci_chipset_tag { + pcireg_t (*pc_conf_read)(pci_chipset_tag_t, pcitag_t, int); + + void (*pc_conf_write)(pci_chipset_tag_t, pcitag_t, int, pcireg_t); + +#if 0 + int (*pc_find_rom)(struct pci_attach_args *, bus_space_tag_t, + bus_space_handle_t, int, bus_space_handle_t *, bus_space_size_t *); +#endif + + int (*pc_intr_map)(struct pci_attach_args *, pci_intr_handle_t *); + + const char *(*pc_intr_string)(pci_chipset_tag_t, pci_intr_handle_t); + + const struct evcnt *(*pc_intr_evcnt)(pci_chipset_tag_t, + pci_intr_handle_t); + + void *(*pc_intr_establish)(pci_chipset_tag_t, pci_intr_handle_t, int, + int (*)(void *), void *); + + void (*pc_intr_disestablish)(pci_chipset_tag_t, void *); + + pcitag_t (*pc_make_tag)(pci_chipset_tag_t, int, int, int); + + void (*pc_decompose_tag)(pci_chipset_tag_t, pcitag_t, + int *, int *, int *); +}; + /* * i386-specific PCI variables and functions. * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. @@ -81,7 +108,6 @@ void pci_mode_set(int); int pci_mode_detect(void); int pci_bus_flags(void); -struct pci_attach_args; /* * Functions provided to machine-independent PCI code.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Thu Feb 25 20:48:35 UTC 2010 Modified Files: src/sys/arch/x86/include: pci_machdep.h Log Message: Change the pci_attach_args definition to allow machine-dependent code to override the default pci(9) behavior by creating a non-NULL pci_attach_args_t (on x86, pci_attach_args_t is always NULL) containing one or more non-NULL function pointers. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Wed Feb 24 21:24:20 UTC 2010 Modified Files: src/sys/arch/x86/include: pci_machdep.h Log Message: Change 'typedef void *pci_chipset_tag_t' to 'typedef struct pci_chipset_tag *pci_chipset_tag_t' for an improvement in type safety. (Back when I did the same for cardbus_chipset_tag_t, it helped to turn up some bugs!) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Wed Feb 24 21:25:52 UTC 2010 Modified Files: src/sys/arch/x86/include: pci_machdep.h Log Message: Don't bother to #define PCI_PREFER_IOSPACE, nothing uses it. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dyoung Date: Wed Feb 24 21:34:23 UTC 2010 Modified Files: src/sys/arch/x86/include: pci_machdep.h Log Message: KNF: change spaces to tabs. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: cegger Date: Wed Jan 13 12:54:49 UTC 2010 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: recognize SVM PauseFilter To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: cegger Date: Sat Jan 9 20:50:11 UTC 2010 Modified Files: src/sys/arch/x86/include: i82489reg.h Log Message: add LAPIC_MSR_ENABLE_x2 MSR. from mur...@river-styx via port-amd64@ '...as documented in the Intel 64 and IA32 Architectures Software Developers Manual 3A, chapter 10.5.1.' To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/i82489reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.