Deleted Added
full compact
cpufunc.h (46846) cpufunc.h (49043)
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id: cpufunc.h,v 1.86 1999/04/28 01:03:58 luoqi Exp $
33 * $Id: cpufunc.h,v 1.87 1999/05/09 23:30:01 peter Exp $
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 */
39
40#ifndef _MACHINE_CPUFUNC_H_
41#define _MACHINE_CPUFUNC_H_

--- 352 unchanged lines hidden (view full) ---

394{
395 u_int64_t rv;
396
397 __asm __volatile(".byte 0x0f, 0x31" : "=A" (rv));
398 return (rv);
399}
400
401static __inline void
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 */
39
40#ifndef _MACHINE_CPUFUNC_H_
41#define _MACHINE_CPUFUNC_H_

--- 352 unchanged lines hidden (view full) ---

394{
395 u_int64_t rv;
396
397 __asm __volatile(".byte 0x0f, 0x31" : "=A" (rv));
398 return (rv);
399}
400
401static __inline void
402setbits(volatile u_int *addr, u_int bits)
403{
404 __asm __volatile(
405#ifdef SMP
406 "lock; "
407#endif
408 "orl %1,%0" : "=m" (*addr) : "ir" (bits));
409}
410
411static __inline void
412wbinvd(void)
413{
414 __asm __volatile("wbinvd");
415}
416
417static __inline void
418write_eflags(u_int ef)
419{

--- 55 unchanged lines hidden (view full) ---

475void outsl __P((u_int port, void *addr, size_t cnt));
476void outsw __P((u_int port, void *addr, size_t cnt));
477void outw __P((u_int port, u_short data));
478u_int rcr2 __P((void));
479u_int64_t rdmsr __P((u_int msr));
480u_int64_t rdpmc __P((u_int pmc));
481u_int64_t rdtsc __P((void));
482u_int read_eflags __P((void));
402wbinvd(void)
403{
404 __asm __volatile("wbinvd");
405}
406
407static __inline void
408write_eflags(u_int ef)
409{

--- 55 unchanged lines hidden (view full) ---

465void outsl __P((u_int port, void *addr, size_t cnt));
466void outsw __P((u_int port, void *addr, size_t cnt));
467void outw __P((u_int port, u_short data));
468u_int rcr2 __P((void));
469u_int64_t rdmsr __P((u_int msr));
470u_int64_t rdpmc __P((u_int pmc));
471u_int64_t rdtsc __P((void));
472u_int read_eflags __P((void));
483void setbits __P((volatile u_int *addr, u_int bits));
484void wbinvd __P((void));
485void write_eflags __P((u_int ef));
486void wrmsr __P((u_int msr, u_int64_t newval));
487u_int rfs __P((void));
488u_int rgs __P((void));
489void load_fs __P((u_int sel));
490void load_gs __P((u_int sel));
491
492#endif /* __GNUC__ */
493
494void load_cr0 __P((u_int cr0));
495void load_cr3 __P((u_int cr3));
496void load_cr4 __P((u_int cr4));
497void ltr __P((u_short sel));
498u_int rcr0 __P((void));
499u_int rcr3 __P((void));
500u_int rcr4 __P((void));
501
502#endif /* !_MACHINE_CPUFUNC_H_ */
473void wbinvd __P((void));
474void write_eflags __P((u_int ef));
475void wrmsr __P((u_int msr, u_int64_t newval));
476u_int rfs __P((void));
477u_int rgs __P((void));
478void load_fs __P((u_int sel));
479void load_gs __P((u_int sel));
480
481#endif /* __GNUC__ */
482
483void load_cr0 __P((u_int cr0));
484void load_cr3 __P((u_int cr3));
485void load_cr4 __P((u_int cr4));
486void ltr __P((u_short sel));
487u_int rcr0 __P((void));
488u_int rcr3 __P((void));
489u_int rcr4 __P((void));
490
491#endif /* !_MACHINE_CPUFUNC_H_ */