Commit Graph

2701 Commits

Author SHA1 Message Date
thorpej c28272808b Remove the PTP and PV entry stealing code. Now that the pmap
module can fail gracefully, it serves little purpose, and the
code is a bit complicated and adds overhead to the context
switching code.
2001-04-24 20:53:43 +00:00
thorpej 20f1193ce2 Delete a couple of statistics that are not really worth keeping. 2001-04-24 20:14:45 +00:00
thorpej 7d4893b529 Gather ASN info into a single structure, and place a variable-length
array of those structures at the end of the pmap structure.  We compute
the size of the pmap structure based on the maximum CPU ID for a
particular machine.  This gives us better cache behavior and better
memory footprint for the ASN info.
2001-04-24 20:11:53 +00:00
thorpej 42113967f9 Fix an uninitialized variable problem in the non-MULTIPROCESSOR case. 2001-04-24 20:03:20 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej 2c37838b72 The Alpha pmap_virtual_space() can return compile-time constants,
so do so.  This allows us to call uvm_pageboot_alloc() before
pmap_bootstrap().

Also, the virtual_start variable is unneeded in the Alpha pmap
module, and virtual_end (and the mostly-unused-except-by-bus_dma
variables avail_start and avail_end) can be `computed' at the
same time.
2001-04-23 15:42:29 +00:00
thorpej 92ca543e1c Panic if all mappings are not removed from a pmap when its
reference count drops to 0.
2001-04-23 15:26:08 +00:00
thorpej 55044638aa Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-22 23:42:11 +00:00
thorpej 69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
ross 8e68ebf6df Add one-line placeholder for pending commit so diffs are complete. 2001-04-22 20:47:22 +00:00
thorpej 5871b80f00 Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly.  On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change.  This is merely for API consistency.
2001-04-22 18:21:48 +00:00
thorpej cfb5c7ed9f Make pmap_virtual_space() a required pmap function, even on platforms
which have pmap_steal_memory().  This is to reduce the API differences
between pmaps that implement pmap_steal_memory() and pmaps which do
not.

Note that pmap_steal_memory() needs to adjust *vstartp and/or
*vendp only if it used addresses within the range provided to UVM
via the pmap_virtual_space() call.  I.e. it is not necessary to do
so in any current pmap_steal_memory() implementation.
2001-04-22 17:22:57 +00:00
thorpej 4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej 7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
ross c8ee2e4ddd Import and use cpu_info_primary for non-MULTIPROCESSOR.
Hey, it compiles, and it's only -current.
2001-04-21 22:03:21 +00:00
thorpej 24e7ecca97 Adjust the way the cpu_info[] array works (array of pointers
rather than array of structures).  Keep a list of active
CPUs and define a CPU_INFO_FOREACH to traverse them.

This fixes cpustates statistics tracking.
2001-04-21 16:27:10 +00:00
ross baa78b5c79 Nonfunctional change split out from pending functional commit. 2001-04-20 23:52:23 +00:00
thorpej 4ad5b289fe No longer need to play with the kernel_lock while waiting
for the other processor to sync FP state.
2001-04-20 22:59:38 +00:00
thorpej c24c3604b0 SPINLOCK_INTERLOCK_RELEASE_HOOK should actually be
SPINLOCK_SPIN_HOOK, so that we actually check for
pending IPIs on the Alpha more than once.  Also,
when we call alpha_ipi_process(), make sure to go
to splipi().
2001-04-20 22:58:39 +00:00
thorpej b8ccfcaac5 Add splipi() to block interprocessor interrupts (which come in at IPL 5). 2001-04-20 22:28:58 +00:00
thorpej 97682364ef Adjust for a multiprocessor data structure change (whee, I guess
I haven't built a GENERIC.MP for a while...)
2001-04-20 18:03:27 +00:00
thorpej 499f5a02fd Alas, we must put pmap_emulate_reference() in the kernel_lock
perimeter as long as we still acquire it in interrupt handlers,
in order to avoid a lock ordering deadlock.
2001-04-20 18:00:50 +00:00
thorpej e84fefd1f1 pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it.  So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN.  Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser.  In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.
2001-04-20 16:22:33 +00:00
thorpej 702cab6b16 Eliminate race conditions in the FP-switch code. MP kernels get
much further on the way to multi-user now.
2001-04-20 00:10:17 +00:00
thorpej c68e2d61d2 Add support for attaching "com" serial ports as KGDB devices. 2001-04-19 18:25:26 +00:00
thorpej 8acff45e10 Work around a firmware bug on the AlphaServer 1000A whereby the
built-in ISA display is reported incorrectly.
2001-04-19 18:02:57 +00:00
thorpej f2f0a680e3 Glue in KGDB. Needs some more work -- KGDB currently renders
DDB disabled, but it's a start.
2001-04-19 17:48:46 +00:00
thorpej f9d203e8f7 KGDB glue for NetBSD/alpha. 2001-04-19 02:56:34 +00:00
thorpej 58f470b95a Need <sys/kgdb.h> for kgdb_connect() prototype. 2001-04-19 00:21:08 +00:00
thorpej b1cdda68fb Remove an un-true comment regarding the location of the u-area. 2001-04-18 16:04:43 +00:00
thorpej 1bf3f87777 Fix a problem with kcopy()/copyin()/copyout() on MP systems
that became apparent when UBC was added: store a pointer to
the process itself, not a pointer to ci->ci_curproc.

This gets us back to where we were before UBC went in: MP
kernels get to single-user mode, and can run processes on
both CPUs, but things go south when we try to come into
multi-user mode.
2001-04-18 00:38:10 +00:00
thorpej a51a1d8cdd - Get rid of the prot bits in the mem_clusters[] array when
reserving RAM in the bus_mem extent map.  Problem pointed
  out by Artur Grabowski.
- Work around a slightly annoying bit of behavior exhibited by
  the UP1000 firmware.  The UP1000 firmware reports the space
  consumed by the "ISA hole" in the same MDDT entry as two
  chunks of RAM (on either side of the hole) used by the PALcode,
  all as one "reserved for PALcode" chunk.  We must take this
  into account when reserving RAM in the bus_mem extent map.
2001-04-17 21:52:00 +00:00
thorpej 18c1bea288 Oops, properly mark a memory operand as both an input and an
output as necessary.
2001-04-16 17:05:22 +00:00
thorpej 1bd443444b In splx(), don't call spl0() unless the ssir != 0. 2001-04-15 23:26:05 +00:00
thorpej 00f815f803 Clean up soft interrupt related stuff a bit. 2001-04-15 23:07:34 +00:00
kleink f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink 739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej e964ad79cf Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).
2001-04-14 00:45:13 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
kleink 9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
ross eeea1bcd05 g/c transfer_check 2001-04-10 10:09:45 +00:00
sommerfeld 422ddeb55b In cpu_fork(), initialize u_pcb.pcb_context[8] so that the newly
spawned kthread/process runs at IPL_0 instead of whatever IPL the
parent was running at.

This appears to fix the NTP clock stability problems observed on some
alpha systems; the clock appears stable even when there's heavy
raidframe (i.e., kthread-intensive) I/O under way.
2001-04-10 00:27:00 +00:00
enami 2ceebb6c0e Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
2001-03-31 00:35:21 +00:00
minoura a9a5dcd043 Add yds at pci and children.
Alpha and i386 are the only tested ports.
2001-03-30 14:47:48 +00:00
ross e84bc939c9 On alternate Tuesdays, SRM uses a different method of identifying
PCI interrupts routed to the ISA ICU.
2001-03-27 01:39:51 +00:00
ross 5b36d84a9c Don't panic until DEFCON 1. 2001-03-25 06:38:50 +00:00
nathanw a45ca84ab5 Verbose display of machine check errors on AS200/400 boxes. 2001-03-25 05:52:38 +00:00