aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-08-16 16:57:57 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-08-16 16:57:57 +0000
commit26502503e57448b879c9293f18ad778c2f7e5f78 (patch)
treed0ded423708b55f6864084633815a6dea9bdd44a
parent4e7370ed1f9b2e6226f4aaad15d80663f0849380 (diff)
downloadsrc-26502503e57448b879c9293f18ad778c2f7e5f78.tar.gz
src-26502503e57448b879c9293f18ad778c2f7e5f78.zip
Notes
-rw-r--r--sys/alpha/include/cpu.h7
-rw-r--r--sys/alpha/include/md_var.h3
-rw-r--r--sys/amd64/include/cpu.h3
-rw-r--r--sys/amd64/include/md_var.h3
-rw-r--r--sys/ddb/db_command.c2
-rw-r--r--sys/i386/include/cpu.h3
-rw-r--r--sys/i386/include/md_var.h3
-rw-r--r--sys/ia64/acpica/madt.c2
-rw-r--r--sys/ia64/ia64/interrupt.c4
-rw-r--r--sys/ia64/ia64/mp_machdep.c8
-rw-r--r--sys/ia64/ia64/vm_machdep.c20
-rw-r--r--sys/ia64/include/cpu.h30
-rw-r--r--sys/ia64/include/md_var.h22
-rw-r--r--sys/kern/kern_shutdown.c2
-rw-r--r--sys/powerpc/include/cpu.h7
-rw-r--r--sys/powerpc/include/md_var.h3
-rw-r--r--sys/sparc64/include/cpu.h3
-rw-r--r--sys/sparc64/include/md_var.h3
18 files changed, 53 insertions, 75 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index 0e39182233a6..75edd1d719df 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -107,6 +107,12 @@ struct trapframe;
extern struct rpb *hwrpb;
extern volatile int mc_expected, mc_received;
+void cpu_halt(void);
+void cpu_reset(void);
+void fork_trampoline(void); /* MAGIC */
+void swi_vm(void *);
+
+/* XXX the following should not be here. */
void XentArith(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */
void XentIF(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */
void XentInt(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */
@@ -139,7 +145,6 @@ void regtoframe(struct reg *, struct trapframe *);
void savectx(struct pcb *);
void set_iointr(void (*)(void *, unsigned long));
void switch_exit(struct thread *); /* MAGIC */
-void fork_trampoline(void); /* MAGIC */
void syscall(u_int64_t, struct trapframe *);
void trap(unsigned long, unsigned long, unsigned long, unsigned long,
struct trapframe *);
diff --git a/sys/alpha/include/md_var.h b/sys/alpha/include/md_var.h
index 12df6141c882..763b32507969 100644
--- a/sys/alpha/include/md_var.h
+++ b/sys/alpha/include/md_var.h
@@ -52,10 +52,7 @@ struct cam_sim;
struct pcicfg;
void busdma_swi(void);
-void cpu_halt(void);
-void cpu_reset(void);
int is_physical_memory(vm_offset_t addr);
-void swi_vm(void *);
void alpha_register_pci_scsi(int bus, int slot, struct cam_sim *sim);
#ifdef _SYS_BUS_H_
struct resource *alpha_platform_alloc_ide_intr(int chan);
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index e9b7fff4cfd5..50ede9d19d21 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -80,7 +80,10 @@ extern char btext[];
extern char etext[];
extern u_int tsc_present;
+void cpu_halt(void);
+void cpu_reset(void);
void fork_trampoline(void);
+void swi_vm(void *);
/*
* Return contents of in-cpu fast counter as a sort of "bogo-time"
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index 63e9b2be4e9e..041091646a7b 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -58,8 +58,6 @@ struct fpreg;
struct dbreg;
void busdma_swi(void);
-void cpu_halt(void);
-void cpu_reset(void);
void cpu_setregs(void);
void doreti_iret(void) __asm(__STRING(doreti_iret));
void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault));
@@ -68,7 +66,6 @@ void fillw(int /*u_short*/ pat, void *base, size_t cnt);
void pagezero(void *addr);
int is_physical_memory(vm_offset_t addr);
void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
-void swi_vm(void *);
void fpstate_drop(struct thread *td);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 56d3ed1f87d3..9f41582620fb 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include <ddb/db_lex.h>
#include <ddb/db_output.h>
-#include <machine/md_var.h>
+#include <machine/cpu.h>
#include <machine/setjmp.h>
/*
diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h
index d4e72bb593ea..85f36ae069ae 100644
--- a/sys/i386/include/cpu.h
+++ b/sys/i386/include/cpu.h
@@ -90,7 +90,10 @@ extern char btext[];
extern char etext[];
extern u_int tsc_present;
+void cpu_halt(void);
+void cpu_reset(void);
void fork_trampoline(void);
+void swi_vm(void *);
/*
* Return contents of in-cpu fast counter as a sort of "bogo-time"
diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h
index e8f106d36c90..4fe29d3ad352 100644
--- a/sys/i386/include/md_var.h
+++ b/sys/i386/include/md_var.h
@@ -75,8 +75,6 @@ struct dbreg;
void bcopyb(const void *from, void *to, size_t len);
void busdma_swi(void);
-void cpu_halt(void);
-void cpu_reset(void);
void cpu_setregs(void);
void cpu_switch_load_gs(void) __asm(__STRING(cpu_switch_load_gs));
void doreti_iret(void) __asm(__STRING(doreti_iret));
@@ -99,7 +97,6 @@ void init_AMD_Elan_sc520(void);
int is_physical_memory(vm_offset_t addr);
vm_paddr_t kvtop(void *addr);
void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec);
-void swi_vm(void *);
int user_dbreg_trap(void);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c
index b2106338ccf8..ac281d3a0147 100644
--- a/sys/ia64/acpica/madt.c
+++ b/sys/ia64/acpica/madt.c
@@ -28,7 +28,7 @@
#include "acpi.h"
-#include <machine/cpu.h>
+#include <machine/md_var.h>
extern u_int64_t ia64_lapic_address;
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c
index 6ee3070ddbab..e7b5367ab7b4 100644
--- a/sys/ia64/ia64/interrupt.c
+++ b/sys/ia64/ia64/interrupt.c
@@ -51,11 +51,11 @@
#include <sys/sysctl.h>
#include <machine/clock.h>
-#include <machine/cpu.h>
-#include <machine/reg.h>
#include <machine/frame.h>
#include <machine/intr.h>
+#include <machine/md_var.h>
#include <machine/pcb.h>
+#include <machine/reg.h>
#include <machine/sapicvar.h>
#include <machine/smp.h>
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index 5de8c249cef6..69bead1ff138 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -47,15 +47,15 @@
#include <vm/vm_kern.h>
#include <machine/atomic.h>
-#include <machine/cpu.h>
+#include <machine/clock.h>
+#include <machine/fpu.h>
+#include <machine/mca.h>
+#include <machine/md_var.h>
#include <machine/pal.h>
#include <machine/pcb.h>
#include <machine/pmap.h>
-#include <machine/clock.h>
-#include <machine/mca.h>
#include <machine/sal.h>
#include <machine/smp.h>
-#include <machine/fpu.h>
#include <i386/include/specialreg.h>
MALLOC_DECLARE(M_PMAP);
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index dd9ecb314ebd..77d7c6405122 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -307,23 +307,3 @@ swi_vm(void *dummy)
busdma_swi();
#endif
}
-
-/*
- * Tell whether this address is in some physical memory region.
- * Currently used by the kernel coredump code in order to avoid
- * dumping the ``ISA memory hole'' which could cause indefinite hangs,
- * or other unpredictable behaviour.
- */
-
-
-int
-is_physical_memory(addr)
- vm_offset_t addr;
-{
- /*
- * stuff other tests for known memory-mapped devices (PCI?)
- * here
- */
-
- return 1;
-}
diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h
index 502fc49b383a..7269e921fcd5 100644
--- a/sys/ia64/include/cpu.h
+++ b/sys/ia64/include/cpu.h
@@ -90,34 +90,16 @@ struct clockframe {
#ifdef _KERNEL
-struct thread;
-struct trapframe;
-
-void cpu_mp_add(u_int, u_int, u_int);
-int do_ast(struct trapframe *);
-void fork_trampoline(void); /* MAGIC */
-int ia64_count_cpus(void);
-int ia64_highfp_drop(struct thread *);
-int ia64_highfp_load(struct thread *);
-int ia64_highfp_save(struct thread *);
-void ia64_init(void);
-void ia64_probe_sapics(void);
-void interrupt(u_int64_t, struct trapframe *);
-void map_gateway_page(void);
-void map_pal_code(void);
-void map_port_space(void);
-int syscall(struct trapframe *);
-void trap(int, struct trapframe *);
-
/*
* Return contents of in-cpu fast counter as a sort of "bogo-time"
* for non-critical timing.
*/
-static __inline u_int64_t
-get_cyclecount(void)
-{
- return (ia64_get_itc());
-}
+#define get_cyclecount ia64_get_itc
+
+void cpu_halt(void);
+void cpu_reset(void);
+void fork_trampoline(void); /* MAGIC */
+void swi_vm(void *);
#endif /* _KERNEL */
diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h
index 38d98de27e0b..3301f3416218 100644
--- a/sys/ia64/include/md_var.h
+++ b/sys/ia64/include/md_var.h
@@ -39,8 +39,9 @@ extern int szsigcode;
extern long Maxmem;
struct fpreg;
-struct thread;
struct reg;
+struct thread;
+struct trapframe;
struct ia64_fdesc {
u_int64_t func;
@@ -51,11 +52,22 @@ struct ia64_fdesc {
#define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp)
void busdma_swi(void);
-void cpu_halt(void);
-void cpu_reset(void);
-int is_physical_memory(vm_offset_t addr);
+int copyout_regstack(struct thread *, uint64_t *, uint64_t *);
+void cpu_mp_add(u_int, u_int, u_int);
+int do_ast(struct trapframe *);
+int ia64_count_cpus(void);
+int ia64_highfp_drop(struct thread *);
+int ia64_highfp_load(struct thread *);
+int ia64_highfp_save(struct thread *);
+void ia64_init(void);
+void ia64_probe_sapics(void);
+void interrupt(uint64_t, struct trapframe *);
+void map_gateway_page(void);
+void map_pal_code(void);
+void map_port_space(void);
void os_boot_rendez(void);
void os_mca(void);
-void swi_vm(void *);
+int syscall(struct trapframe *);
+void trap(int, struct trapframe *);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 3bd35d46160a..6532972f88c7 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$");
#include <sys/sysproto.h>
#include <sys/vnode.h>
+#include <machine/cpu.h>
#include <machine/pcb.h>
-#include <machine/md_var.h>
#include <machine/smp.h>
#include <sys/signalvar.h>
diff --git a/sys/powerpc/include/cpu.h b/sys/powerpc/include/cpu.h
index 84ffb3b2b288..ae3893d7bd6a 100644
--- a/sys/powerpc/include/cpu.h
+++ b/sys/powerpc/include/cpu.h
@@ -92,8 +92,13 @@ get_cyclecount(void)
#define cpu_getstack(td) ((td)->td_frame->fixreg[1])
-void savectx(struct pcb *);
+void cpu_halt(void);
+void cpu_reset(void);
void fork_trampoline(void);
+void swi_vm(void *);
+
+/* XXX the following should not be here. */
+void savectx(struct pcb *);
int kcopy(const void *, void *, size_t);
#endif /* _MACHINE_CPU_H_ */
diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h
index cc5761842a94..9e98647f395d 100644
--- a/sys/powerpc/include/md_var.h
+++ b/sys/powerpc/include/md_var.h
@@ -51,10 +51,7 @@ struct cam_sim;
struct pcicfg;
void busdma_swi(void);
-void cpu_halt(void);
-void cpu_reset(void);
int is_physical_memory(vm_offset_t addr);
-void swi_vm(void *);
void decr_init(void);
diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h
index f0caebf71e86..d92d724be4f6 100644
--- a/sys/sparc64/include/cpu.h
+++ b/sys/sparc64/include/cpu.h
@@ -77,7 +77,10 @@
extern char btext[];
extern char etext[];
+void cpu_halt(void);
+void cpu_reset(void);
void fork_trampoline(void);
+void swi_vm(void *v);
static __inline u_int64_t
get_cyclecount(void)
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h
index 4cf034882ffa..899d1bb10343 100644
--- a/sys/sparc64/include/md_var.h
+++ b/sys/sparc64/include/md_var.h
@@ -46,12 +46,9 @@ extern vm_paddr_t kstack0_phys;
struct pcpu;
-void cpu_halt(void);
void cpu_identify(u_long vers, u_int clock, u_int id);
-void cpu_reset(void);
void cpu_setregs(struct pcpu *pc);
int is_physical_memory(vm_paddr_t addr);
-void swi_vm(void *v);
cpu_block_copy_t spitfire_block_copy;
cpu_block_zero_t spitfire_block_zero;