734 /*
735 * Utility functions to get/set extended control registers (XCR)
736 * Initial use is to get/set the contents of the XFEATURE_ENABLED_MASK.
737 */
738 extern uint64_t get_xcr(uint_t);
739 extern void set_xcr(uint_t, uint64_t);
740
741 extern uint64_t rdmsr(uint_t);
742 extern void wrmsr(uint_t, const uint64_t);
743 extern uint64_t xrdmsr(uint_t);
744 extern void xwrmsr(uint_t, const uint64_t);
745 extern int checked_rdmsr(uint_t, uint64_t *);
746 extern int checked_wrmsr(uint_t, uint64_t);
747
748 extern void invalidate_cache(void);
749 extern ulong_t getcr4(void);
750 extern void setcr4(ulong_t);
751
752 extern void mtrr_sync(void);
753
754 extern void cpu_fast_syscall_enable(void *);
755 extern void cpu_fast_syscall_disable(void *);
756
757 struct cpu;
758
759 extern int cpuid_checkpass(struct cpu *, int);
760 extern uint32_t cpuid_insn(struct cpu *, struct cpuid_regs *);
761 extern uint32_t __cpuid_insn(struct cpuid_regs *);
762 extern int cpuid_getbrandstr(struct cpu *, char *, size_t);
763 extern int cpuid_getidstr(struct cpu *, char *, size_t);
764 extern const char *cpuid_getvendorstr(struct cpu *);
765 extern uint_t cpuid_getvendor(struct cpu *);
766 extern uint_t cpuid_getfamily(struct cpu *);
767 extern uint_t cpuid_getmodel(struct cpu *);
768 extern uint_t cpuid_getstep(struct cpu *);
769 extern uint_t cpuid_getsig(struct cpu *);
770 extern uint_t cpuid_get_ncpu_per_chip(struct cpu *);
771 extern uint_t cpuid_get_ncore_per_chip(struct cpu *);
772 extern uint_t cpuid_get_ncpu_sharing_last_cache(struct cpu *);
773 extern id_t cpuid_get_last_lvl_cacheid(struct cpu *);
774 extern int cpuid_get_chipid(struct cpu *);
775 extern id_t cpuid_get_coreid(struct cpu *);
|
734 /*
735 * Utility functions to get/set extended control registers (XCR)
736 * Initial use is to get/set the contents of the XFEATURE_ENABLED_MASK.
737 */
738 extern uint64_t get_xcr(uint_t);
739 extern void set_xcr(uint_t, uint64_t);
740
741 extern uint64_t rdmsr(uint_t);
742 extern void wrmsr(uint_t, const uint64_t);
743 extern uint64_t xrdmsr(uint_t);
744 extern void xwrmsr(uint_t, const uint64_t);
745 extern int checked_rdmsr(uint_t, uint64_t *);
746 extern int checked_wrmsr(uint_t, uint64_t);
747
748 extern void invalidate_cache(void);
749 extern ulong_t getcr4(void);
750 extern void setcr4(ulong_t);
751
752 extern void mtrr_sync(void);
753
754 extern void cpu_fast_syscall_enable(void);
755 extern void cpu_fast_syscall_disable(void);
756
757 struct cpu;
758
759 extern int cpuid_checkpass(struct cpu *, int);
760 extern uint32_t cpuid_insn(struct cpu *, struct cpuid_regs *);
761 extern uint32_t __cpuid_insn(struct cpuid_regs *);
762 extern int cpuid_getbrandstr(struct cpu *, char *, size_t);
763 extern int cpuid_getidstr(struct cpu *, char *, size_t);
764 extern const char *cpuid_getvendorstr(struct cpu *);
765 extern uint_t cpuid_getvendor(struct cpu *);
766 extern uint_t cpuid_getfamily(struct cpu *);
767 extern uint_t cpuid_getmodel(struct cpu *);
768 extern uint_t cpuid_getstep(struct cpu *);
769 extern uint_t cpuid_getsig(struct cpu *);
770 extern uint_t cpuid_get_ncpu_per_chip(struct cpu *);
771 extern uint_t cpuid_get_ncore_per_chip(struct cpu *);
772 extern uint_t cpuid_get_ncpu_sharing_last_cache(struct cpu *);
773 extern id_t cpuid_get_last_lvl_cacheid(struct cpu *);
774 extern int cpuid_get_chipid(struct cpu *);
775 extern id_t cpuid_get_coreid(struct cpu *);
|