diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-08-17 06:42:08 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-08-17 06:42:08 +0000 |
| commit | 3e25ce2310c7653e2d8c15045871364a3a298c9c (patch) | |
| tree | c396c4d20098d5889204513f259cb9b3a2f0c0df /sys/alpha/include | |
| parent | 365b27ea29ecd7c2703214242fc9e6c3d55b44a8 (diff) | |
Notes
Diffstat (limited to 'sys/alpha/include')
| -rw-r--r-- | sys/alpha/include/cpu.h | 59 | ||||
| -rw-r--r-- | sys/alpha/include/md_var.h | 67 | ||||
| -rw-r--r-- | sys/alpha/include/pcb.h | 4 |
3 files changed, 57 insertions, 73 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h index 75edd1d719df..d9a76e41cbb2 100644 --- a/sys/alpha/include/cpu.h +++ b/sys/alpha/include/cpu.h @@ -52,8 +52,6 @@ #include <machine/frame.h> -#define cpu_getstack(td) (alpha_pal_rdusp()) - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the Alpha, we use @@ -98,67 +96,14 @@ struct clockframe { #ifdef _KERNEL -struct pcb; -struct thread; -struct reg; -struct rpb; -struct trapframe; - -extern struct rpb *hwrpb; -extern volatile int mc_expected, mc_received; +#define cpu_getstack(td) (alpha_pal_rdusp()) +#define get_cyclecount alpha_rpcc 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 */ -void XentMM(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ -void XentRestart(void); /* MAGIC */ -void XentSys(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ -void XentUna(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ -void alpha_init(u_long, u_long, u_long, u_long, u_long); -void alpha_fpstate_check(struct thread *td); -void alpha_fpstate_drop(struct thread *td); -void alpha_fpstate_save(struct thread *td, int write); -void alpha_fpstate_switch(struct thread *td); -int alpha_pa_access(u_long); -int badaddr (void *, size_t); -int badaddr_read(void *, size_t, void *); -u_int64_t console_restart(u_int64_t, u_int64_t, u_int64_t); -void dumpconf(void); -void exception_return(void); /* MAGIC */ -void frametoreg(struct trapframe *, struct reg *); -long fswintrberr(void); /* MAGIC */ -void init_prom_interface(struct rpb*); -void interrupt(unsigned long, unsigned long, unsigned long, - struct trapframe *); -void machine_check(unsigned long, struct trapframe *, unsigned long, - unsigned long); -u_int64_t hwrpb_checksum(void); -void hwrpb_restart_setup(void); -void regdump(struct trapframe *); -void regtoframe(struct reg *, struct trapframe *); -void savectx(struct pcb *); -void set_iointr(void (*)(void *, unsigned long)); -void switch_exit(struct thread *); /* MAGIC */ -void syscall(u_int64_t, struct trapframe *); -void trap(unsigned long, unsigned long, unsigned long, unsigned long, - 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 (alpha_rpcc()); -} - #endif /* _KERNEL */ #endif /* _ALPHA_CPU_H_ */ diff --git a/sys/alpha/include/md_var.h b/sys/alpha/include/md_var.h index 763b32507969..d57664786e41 100644 --- a/sys/alpha/include/md_var.h +++ b/sys/alpha/include/md_var.h @@ -33,6 +33,12 @@ * Miscellaneous machine-dependent declarations. */ +struct cam_sim; +struct reg; +struct rpb; +struct thread; +struct trapframe; + extern char sigcode[]; extern char esigcode[]; extern int szsigcode; @@ -44,31 +50,60 @@ extern int szfreebsd4_sigcode; #endif extern long Maxmem; extern int busdma_swi_pending; +extern struct rpb *hwrpb; +extern volatile int mc_expected; +extern volatile int mc_received; -struct fpreg; -struct thread; -struct reg; -struct cam_sim; -struct pcicfg; - +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 */ +void XentMM(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ +void XentRestart(void); /* MAGIC */ +void XentSys(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ +void XentUna(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ +void alpha_fpstate_check(struct thread *td); +void alpha_fpstate_drop(struct thread *td); +void alpha_fpstate_save(struct thread *td, int write); +void alpha_fpstate_switch(struct thread *td); +void alpha_init(u_long, u_long, u_long, u_long, u_long); +int alpha_pa_access(u_long); +void alpha_register_pci_scsi(int bus, int slot, struct cam_sim *sim); +int badaddr(void *, size_t); +int badaddr_read(void *, size_t, void *); void busdma_swi(void); +u_int64_t console_restart(u_int64_t, u_int64_t, u_int64_t); +void dumpconf(void); +void exception_return(void); /* MAGIC */ +void frametoreg(struct trapframe *, struct reg *); +long fswintrberr(void); /* MAGIC */ +u_int64_t hwrpb_checksum(void); +void hwrpb_restart_setup(void); +void init_prom_interface(struct rpb*); +void interrupt(unsigned long, unsigned long, unsigned long, + struct trapframe *); int is_physical_memory(vm_offset_t addr); -void alpha_register_pci_scsi(int bus, int slot, struct cam_sim *sim); +void machine_check(unsigned long, struct trapframe *, unsigned long, + unsigned long); +void regdump(struct trapframe *); +void regtoframe(struct reg *, struct trapframe *); +void set_iointr(void (*)(void *, unsigned long)); +void switch_exit(struct thread *); /* MAGIC */ +void syscall(u_int64_t, struct trapframe *); +void trap(unsigned long, unsigned long, unsigned long, unsigned long, + struct trapframe *); + #ifdef _SYS_BUS_H_ struct resource *alpha_platform_alloc_ide_intr(int chan); int alpha_platform_release_ide_intr(int chan, struct resource *res); -int alpha_platform_setup_ide_intr(struct device *dev, - struct resource *res, - driver_intr_t *fn, void *arg, - void **cookiep); +int alpha_platform_setup_ide_intr(struct device *dev, struct resource *res, + driver_intr_t *fn, void *arg, void **cookiep); int alpha_platform_teardown_ide_intr(struct device *dev, - struct resource *res, void *cookie); + struct resource *res, void *cookie); int alpha_platform_pci_setup_intr(device_t dev, device_t child, - struct resource *irq, int flags, - driver_intr_t *intr, void *arg, - void **cookiep); + struct resource *irq, int flags, driver_intr_t *intr, void *arg, + void **cookiep); int alpha_platform_pci_teardown_intr(device_t dev, device_t child, - struct resource *irq, void *cookie); + struct resource *irq, void *cookie); int alpha_pci_route_interrupt(device_t bus, device_t dev, int pin); #endif diff --git a/sys/alpha/include/pcb.h b/sys/alpha/include/pcb.h index e1c063be9300..982e97b458b3 100644 --- a/sys/alpha/include/pcb.h +++ b/sys/alpha/include/pcb.h @@ -57,4 +57,8 @@ struct pcb { unsigned long pcb_accessaddr; /* for [fs]uswintr [SW] */ }; +#ifdef _KERNEL +void savectx(struct pcb *); +#endif + #endif /* _MACHINE_PCB_H */ |
