diff options
author | jhb <jhb@FreeBSD.org> | 2014-09-04 01:46:06 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-09-04 01:46:06 +0000 |
commit | 1e7d9a13243132952f65939f2232142b369360d8 (patch) | |
tree | 23ebceb1eef9d69ce3523718cbe3210794df6a34 /sys/amd64 | |
parent | 9877edbb6dcd5ef6bf81128b82ebd8ebfa474916 (diff) | |
download | FreeBSD-src-1e7d9a13243132952f65939f2232142b369360d8.zip FreeBSD-src-1e7d9a13243132952f65939f2232142b369360d8.tar.gz |
- Move prototypes for various functions into out of C files and into
<machine/md_var.h>.
- Move some CPU-related variables out of i386/i386/identcpu.c to
initcpu.c to match amd64.
- Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
- Remove a misleading comment from i386/i386/initcpu.c (locore zeros
the BSS before it calls identify_cpu()) and remove explicit zero
assignments to reduce the diff with amd64.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 7 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/amd64/include/md_var.h | 3 |
3 files changed, 3 insertions, 11 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 3b66369..e3bd3fa 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -64,15 +64,8 @@ __FBSDID("$FreeBSD$"); #include <amd64/vmm/intel/vmx_controls.h> #include <x86/isa/icu.h> -/* XXX - should be in header file: */ -void printcpuinfo(void); -void identify_cpu(void); -void earlysetcpuclass(void); -void panicifcpuunsupported(void); - static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); -static void print_AMD_assoc(int i); static void print_via_padlock_info(void); static void print_vmx_info(void); diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index bb0bc21..efedcfd 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -151,10 +151,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); extern u_int64_t hammer_time(u_int64_t, u_int64_t); -extern void printcpuinfo(void); /* XXX header file */ -extern void identify_cpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 5ddfbbd..c7b89a6 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -105,14 +105,17 @@ void fsbase_load_fault(void) __asm(__STRING(fsbase_load_fault)); void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); +void identify_cpu(void); void initializecpu(void); void initializecpucache(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); +void panicifcpuunsupported(void); void pagecopy(void *from, void *to); void pagezero(void *addr); +void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); |