Commit Graph

2562 Commits

Author SHA1 Message Date
thorpej
8ebabb1aae Increase the number of static extent descriptors from 8 to 16,
and add a means for calling a chip-specific init hook.
2000-11-29 05:53:29 +00:00
jdolecek
f6a7e12165 split linux signal code off locore.s 2000-11-27 22:29:26 +00:00
ad
57ea462da2 lsu -> ld, by popular request. 2000-11-26 17:44:02 +00:00
thorpej
484693d993 `babylon' no longer exists. 2000-11-26 04:59:03 +00:00
thorpej
dce417005a Kernel config file for basil.shagadelic.org, my API UP1000 devel machine. 2000-11-26 04:58:07 +00:00
chs
b5142d6841 increase PAGER_MAP_SIZE to 16MB and move it to uvm_pager.h
since the alpha and mips pmaps use it.
2000-11-24 22:41:38 +00:00
chs
fa19fe52db adjust the spinlock macros in the non-MULTIPROCESSOR, non-LOCKDEBUG case
so that gcc will think that static spinlock are used.
this allows us to remove the ugly conditionalization of
static spinlock declarations.
2000-11-24 03:59:07 +00:00
simonb
f91f0ea65c Make this compile again (unterminated `#if' conditional). 2000-11-24 02:21:56 +00:00
thorpej
534e7d4454 Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
  XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
  in the handlers themselves, and also making it possible for the
  "pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
  CPUs registers (and thus get e.g. a traceback) from whichever
  CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
  They don't have a prayer of working properly in multiprocessor
  kernels, and didn't really work all that well in uniprocessor kernels.
2000-11-22 08:39:46 +00:00
thorpej
6cbdf24c45 Add a debugging printf, commented out by default. 2000-11-22 07:44:01 +00:00
enami
9c0026f5fa s/char \*/const &/ so that this file compiles again. 2000-11-22 04:28:13 +00:00
itojun
1c06733c6b constify 2000-11-22 03:54:01 +00:00
thorpej
7231516137 Just access the trapframe directly for DDB registers. 2000-11-22 02:25:52 +00:00
thorpej
7f6303947a Restructure the way registers are presented to DDB, to make it
easier to support reading registers from other CPUs.
2000-11-22 02:03:48 +00:00
jdolecek
baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
thorpej
f595d8e741 Ooops, do the last only if MULTIPROCESSOR. 2000-11-20 21:18:07 +00:00
thorpej
13c94ca56c We've fixed enough bugs that we can actually acquire the scheduler
lock, jump into the idle loop, and run user code!  Yippee!
2000-11-20 20:40:17 +00:00
thorpej
b37faa6ca5 Protect microtime_slock appropriately. 2000-11-20 20:37:52 +00:00
thorpej
e12f731db5 On the Alpha, interprocessor interrupts come in at the same priority
as normal device interrupts.  Because of this, we won't get IPIs while
servicing such interrupts.  This can lead to the following deadlock
scenario as reported by Bill Sommerfeld:
- Process runs on cpu1, but has FP state on cpu0.
- Process executes FP-using insn, causing an FP trap, which causes
  the kernel lock to be acquired.
- At roughly the same time, cpu0 receives a device interrupt, and attempts
  to acquire the kernel lock, which blocks since cpu1 already has it.
- cpu1 sends cpu0 a SYNCH FPU IPI, and waits for cpu0 to release its
  FP state.
- Since cpu0 cannot notice the IPI until it has processed the device
  interrupt, which it cannot do because it cannot acquire the kernel
  lock, we have deadlock.

Solve the problem by adding a spinlock interlock release hook which
checks for pending IPIs and processes them.

Idea from Bill Sommerfeld.
2000-11-20 20:17:13 +00:00
thorpej
fdfb847e3e Make ci_ipis volatile. 2000-11-20 19:25:43 +00:00
thorpej
7f059c8e69 Move IPI processing into a separate function. 2000-11-20 19:24:36 +00:00
thorpej
5a22e57dc3 Print the CPU ID while dumping trap info. 2000-11-20 15:33:39 +00:00
chs
c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
thorpej
2f1e131332 Delete a block of code that was intended to get the second
CPU to handle interrupts, but prevents a whole slew of things
from working properly on the second CPU.  It is no longer
necessary now that several other bugs have been fixed.
2000-11-20 03:15:15 +00:00
thorpej
fe5b367ce6 In Idle(), only switch to the idle PCB if we're not already running
on it, and make sure to deactivate the old process's address space,
as this will not otherwise be done by cpu_switch() later once we're
on the idle PCB.

Also, update some comments related to when s0 (i.e. the old process)
is NULL in the context switching code.
2000-11-20 02:44:45 +00:00
sommerfeld
2a0dca4bec Correct conditionalization of last change. 2000-11-19 20:11:12 +00:00
sommerfeld
8074b0b0b2 MULTIPROCESSOR: context switch to cpu's idle pcb before unlocking the
scheduler in idle so our stack doesn't get stolen out from underneath us.
2000-11-19 20:08:36 +00:00
sommerfeld
c0c9c552c0 Fix obvious typo (don't mark current cpu as not running when doing a
broadcast IPI).
2000-11-19 20:05:25 +00:00
thorpej
87819535b2 Synch cpu_hatch() with the i386:
- print the same style message when the CPU is running.
- Initialize ci->ci_schedstate.spc_runtime on the CPU.
2000-11-19 19:18:19 +00:00
thorpej
69a3a857be As a temporary measure, protect microtime() with a simple lock.
XXX Needs to be rewritten from scratch.
2000-11-19 19:16:44 +00:00
tsutsui
ae33b9bc92 More cosmetics.
BTW, why these two "generic" config files exist?
2000-11-19 14:23:34 +00:00
tsutsui
d805c3822e Remove "rnd is EXPERIMENTAL" comment. 2000-11-19 14:14:31 +00:00
tsutsui
523ec808a6 - Add bba* at ioasic?
- Some cosmetics
2000-11-19 14:10:56 +00:00
tsutsui
13c5a51b02 Add some newer stuff from GENERIC and enable rnd. 2000-11-19 14:03:39 +00:00
tsutsui
f6c12f31f0 Sync with GENERIC. 2000-11-19 13:46:29 +00:00
thorpej
b9ad1f75b9 Make VM_MAX_KERNEL_ADDRESS end on a page boundary. 2000-11-19 03:16:55 +00:00
thorpej
561db1fb7e Implement pmap_growkernel(). 2000-11-19 03:16:34 +00:00
thorpej
137c030d5b Count individual interprocessor interrupts -- it's good to know where
they all come from.
2000-11-18 19:25:35 +00:00
thorpej
34f24f4819 Make sure that the cpu_info points at the correct softc on
single-processor kernels running on multi-processor systems.
2000-11-18 17:45:31 +00:00
sommerfeld
859adc84de Loading the cpu_info value into the kgp for the new cpu isn't likely to work
very well.
2000-11-18 16:21:37 +00:00
thorpej
73265fa0c9 Duh, don't need SGMAP-related includes on this chipset. 2000-11-18 05:56:20 +00:00
thorpej
72a145bd5e I have long since upgraded the boot block on my test system. (Actually,
I have an entirely different test system now.)
2000-11-17 22:47:30 +00:00
thorpej
b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
augustss
eb9736c09a Add uscanner. 2000-11-14 19:52:04 +00:00
mycroft
63270df506 Sync with GENERIC. 2000-11-12 06:52:37 +00:00
itojun
05b2e0b151 /t_line/t_linesw (typo) 2000-11-10 11:08:32 +00:00
ad
e6be92ad99 Pull in dev/i2o/files.i2o. 2000-11-08 19:48:51 +00:00
matt
c135d1f282 Add files.ieee1394 2000-11-05 22:48:27 +00:00
eeh
bc7363329c Adapt to new line discipline scheme. 2000-11-02 00:26:35 +00:00
ad
23f6f01a0d ca -> lsu 2000-10-19 14:35:41 +00:00