Commit Graph

49 Commits

Author SHA1 Message Date
darrenr
0d5f0d9024 * add machdep.booted_device and machdep.boot_args (both fetched from
appropriate PROM variables).
* return "netbsd" for machdep.booted_kernel if the PROM doesn't return us a
  kernel name.
2002-02-03 14:10:02 +00:00
uwe
814a815542 Export msiiep_swap_endian(onoff) from msiiep.c to turn on/off
automagic endian swapping performed by PCI controller.  Need it in
several places where we want to enter PROM repl.
2001-12-11 03:24:46 +00:00
darrenr
860b0688ac defopt "options SUN4*", put #define for each of SUN4, SUN4C, SUN4M and SUN4U
into opt_arch_sparc.h and include this wherever they are used.
2001-12-04 00:05:04 +00:00
pk
4f1fe56be8 Remove redundant declarations. 2001-11-12 16:32:25 +00:00
mrg
a68e13f815 implement generic soft interrupts as described in softintr(9). convert
the network, clock & serial softint's to use them.
2001-09-27 02:05:42 +00:00
thorpej
8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
mrg
122b3a0e67 sprinkle KERNEL_LOCK() and KERNEL_PROC_LOCK() where they're missing. add
SYSCALL_DEBUG support to trap.c.
2001-03-15 03:01:39 +00:00
christos
9bd2dee3b2 fix bit rot so that MP kernel compiles s/cpu_no/ci_cpuid/ 2001-01-21 07:48:29 +00:00
thorpej
4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
thorpej
814826fdda Fix typo. kern/10291. 2000-06-05 20:47:47 +00:00
thorpej
0e2f894851 Provide a CPU_IS_PRIMARY() macro in the MULTIPROCESSOR case. 2000-06-03 20:43:28 +00:00
pk
504ed6e58b Move switchexit() declaration in here. 2000-05-31 12:05:04 +00:00
thorpej
8d5520dccf - In the MULTIPROCESSOR case, initialize p_cpu before a process is
marked SONPROC.
- Fix a bug where all cpu_info structures except for the boot CPUs
  would exist at both a CPU-local VA (CPUINFO_VA) and a gloal VA;
  The boot CPU's existed only a CPUINFO_VA.
- Add a self-reference pointer to the cpu_info that references the
  global address in the MULTIPROCESSOR case.  Just allow it to reference
  the `local' VA in the single-processor case, as CPUINFO_VA is global
  enough when there's only one processor to care about.  Change curcpu()
  to return the global address.
2000-05-31 05:28:26 +00:00
thorpej
a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
thorpej
18ab712015 Provide cpu_boot_secondary_cpus(). 1999-12-16 20:24:58 +00:00
pk
fa65ea182c Implement sysctl `machdep.booted_kernel'. 1999-10-04 19:11:42 +00:00
thorpej
28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
pk
dd91d8a2b4 Add SIR_SERIAL soft interrupt source. 1999-01-19 10:02:40 +00:00
thorpej
cabecee13c Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:43:49 +00:00
pk
bf7ace9074 CLKF_INTR() needs to have a MULTIPROCESSOR version. 1998-10-13 20:53:02 +00:00
thorpej
5006dbf868 cpu_set_kpc() prototype is already in <sys/systm.h>. 1998-10-05 22:11:15 +00:00
pk
6ad3a051e8 mp_{pause,resume,halt}_cpu() prototypes. 1998-09-26 20:12:06 +00:00
pk
4fe6cdf6ca Nuke obsolete prototype. 1998-08-23 10:07:09 +00:00
pk
24255abca0 iommu_{enter,remove} moved to iommuvar.h 1998-08-21 14:10:42 +00:00
tv
426330f919 eliminate declarations of global data in <sparc/cpu.h> and declare in
source files, reducing global symblol replication in .o kernel files
1997-11-22 03:13:56 +00:00
pk
a372844a7a Add fix_align() and emulinstr() prototypes. 1997-03-15 22:25:15 +00:00
cgd
8a3333b2a9 Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().
1996-11-06 20:19:19 +00:00
thorpej
fa0e4a3082 Make the SPARC kernel compile again after recent tty cdevsw changes. 1996-09-05 09:32:47 +00:00
pk
5703b83d00 Move autoconf subroutine prototypes to autoconf.h
Deal with sun4m `software interrupts'.
1996-03-31 22:17:14 +00:00
christos
9af46afa21 Fix prototypes for the latest kpc changes. 1996-03-15 00:01:21 +00:00
christos
9a07d9dec9 Add missing prototypes and fix the fp struct for svr4. 1996-03-14 19:49:04 +00:00
pk
808df5543f Remove cpu_set_init_frame(). 1996-03-14 00:49:20 +00:00
cgd
c83f9c5568 remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
1995-06-28 02:55:18 +00:00
pk
b4cf60ac8a cpu_swapout() not needed after all. 1995-05-19 06:57:41 +00:00
pk
9ef5f62072 Start swapping. 1995-05-08 17:34:20 +00:00
cgd
8703076975 define BROKEN_SWAP and/or cpu_swapout as appropriate. 1995-05-05 03:41:51 +00:00
christos
de42a28a1b - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
1995-04-22 20:24:40 +00:00
jtc
71ab4ed9dc KERNEL -> _KERNEL 1995-03-28 18:13:48 +00:00
deraadt
6abee40cb1 prototype wcopy/wzero 1994-11-25 23:11:42 +00:00
deraadt
274a90762d copyright/Id cleanup 1994-11-20 20:51:32 +00:00
deraadt
6d9927894a vme interrupt support 1994-10-26 07:16:34 +00:00
deraadt
79b1288c6a USPAGE 1994-09-27 01:32:06 +00:00
deraadt
79430f5f9d liten 1994-05-19 08:23:00 +00:00
deraadt
5e6f04e81f profiling and clock stuff 1994-05-05 09:54:33 +00:00
deraadt
32f1e3f490 flags foo 1994-05-05 05:55:00 +00:00
deraadt
1d2fa0cf4d move defn of trapvec to cpu.h 1994-03-22 08:08:43 +00:00
deraadt
e9fee9d6d3 sparc runs in current today 1994-02-01 06:01:19 +00:00
deraadt
7ee2311b78 stdarg.h, varargs.h, psl.h, autoconf.h: posted patches from torek
cpu.h: cpu_adjstack() won't work well in the NetBSD execve - need a
	different model, stub enablertclock() for now..
exec.h: a netbsd-type exec.h file (ie. empty)
param.h: add MID_MACHINE
pmap.h: delete kernel_pmap hack - it doesn't work for us, + two proto's
vmparam.h: VM_MIN_ADDRESS = 0!
1993-10-11 02:28:23 +00:00
deraadt
4588caefaa Chris Torek's sparc port. Missing lots of things. 1993-10-02 10:22:00 +00:00