Commit Graph

2903 Commits

Author SHA1 Message Date
nisimura 9a409cff3e Add MX (PMAG-A), CX (PMAG-B), TX (PMAG-RO/PMAG[B]-J) TC framebuffer
supports.  None of them has any acceleration capability.
2001-08-23 01:16:52 +00:00
hubertf 5366e197e2 More comment changes: 90x[B] -> 90x[BC] 2001-08-22 15:39:04 +00:00
wiz c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
mrg dc4e692845 add a commented "options NETATALK" 2001-08-20 04:49:17 +00:00
chs 3f98593d27 in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
2001-08-19 17:34:01 +00:00
mjacob 7a43c0e46b Fixed the one minor buglet that kept 8200s from working
(SCB_VECTOIDX(vec) - SCB_IOVECBASE] -> SCB_VECTOIDX(vec - SCB_IOVECBASE))

Sigh. This is all very good work- this new interrupt stuff. Yet like the
last time my good friend Jason 'simplified' things, we lost information.
It used to be you could tell which specific slot an interrupt was frame
based upon the vector. Now you can't because they're allocated dynamically.
Oh well- it's not all that important.
2001-08-13 23:36:30 +00:00
chs 610af327b3 add an unlock missing from previous revision. 2001-08-13 01:12:15 +00:00
jdolecek c495131fe3 Move _insque()/_remque() to libkern. Once remaining uses would
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated
altogether.
2001-08-12 08:35:31 +00:00
bjh21 ad2c12a28d Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading.  I should probably have done this at the time,
but it's better late than never.
2001-08-02 12:24:05 +00:00
thorpej 0fb6b9a8f8 Rework the interrupt code, shaving some cycles off in the process.
Rather than an "iointr" routine that decomposes a vector into an
IRQ, we maintain a vector table directly, hooking up each "iointr"
routine at the correct vector.  This also allows us to hook device
interrupts up to specific vectors (c.f. Jensen).

We can shave even more cycles off, here, and I will, but it requires
some changes to the alpha_shared_intr stuff.
2001-07-27 00:25:18 +00:00
wiz 684d06bac8 bcopy -> memcpy, bzero -> memset 2001-07-22 15:17:30 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
thorpej 030941bc0d Only match the "gbus" on the primary CPU's CPU module. 2001-07-19 20:34:08 +00:00
thorpej 13e63c6a43 Take a guess and initialize the prefetch threshold to 256 bytes. Haven't
found this one in the manual yet.
2001-07-19 19:09:22 +00:00
thorpej b0256ef005 DWLPx has a 256-byte DMA prefetch threshold. 2001-07-19 18:59:41 +00:00
thorpej 1e21ada1d9 MCPCIA has a 256 byte DMA prefetch threshold. 2001-07-19 18:55:40 +00:00
thorpej c563df226b The T2 has a 256 byte DMA prefetch threshold. 2001-07-19 18:50:25 +00:00
thorpej e6ab362da0 The LCA isn't supposed to have a DMA prefetch threshold, but experience
has shown is that if we don't allocate a spill page, we get a machine
check.  So, initialize the threshold to 256 bytes.
2001-07-19 18:47:38 +00:00
thorpej 4c4c88dbb7 ALCOR/ALCOR2/PYXIS have a 256-byte DMA prefetch threshold. 2001-07-19 18:42:42 +00:00
thorpej 908464bef9 APECS has a 256 byte DMA prefetch threshold. 2001-07-19 18:39:29 +00:00
thorpej 63bc6c1370 Since the SGMAP buffer load subroutine doesn't need to modify
the segment index, don't pass it by reference.
2001-07-19 18:20:20 +00:00
thorpej 77e1f86ad4 Implement dmamap_load_uio for SGMAPs. 2001-07-19 18:08:54 +00:00
thorpej e60fffea3b Pay attention to BUS_DMA_READ; don't need to allocate a spill
page if it is set.
2001-07-19 17:08:44 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
thorpej b70733d358 Since DMA frobbing can be done at interrupt time by devies at
multiple levels, protect the extent map w/ splvm().
2001-07-19 14:26:54 +00:00
thorpej 18490eff62 Add support for mbufs to the Alpha SGMAP DMA maps. 2001-07-19 06:40:01 +00:00
thorpej 8617f2c7f5 Simplify the SGMAP code a bit, and move SGVA allocation out of a
common routine into the individual load routines, since each load
routine needs to muddle with the "internals" of this operation.

Add a `prefetch threshold' member to the bus_dma_tag_t, so that
eventually we can determine whether or not to allocate a spill
page on a per-mapping basis.
2001-07-19 04:27:37 +00:00
thorpej 09ab6c5da8 Duh, to set the user stack pointer, you have to frob the PALcode PCB,
not the trap frame.

Fixes clone(2) on the Alpha.
2001-07-18 22:22:49 +00:00
thorpej 6af9e1cf38 Print the stack pointer on a user unaligned access fault. 2001-07-18 22:22:02 +00:00
thorpej 909084d90f Protect userland from the inlines and kernel variable decls. 2001-07-17 20:54:58 +00:00
thorpej 3e1e8af07b Don't use pmap_changebit() in pmap_protect(), and remove the
pager mapping check from pmap_changebit().
2001-07-16 21:37:21 +00:00
thorpej aff311a28c Remove I-sync stuff from pmap_changebit(). The AARM says that we
only have to sync the I-stream when the mapping is removed or chaged,
and since the I-stream is fetch-only, changing protection bits does
not constitute changing the mapping (the VA->PA translation is still
the same).
2001-07-16 19:48:03 +00:00
elric 99e8b114e0 So, the PowerStorm 4d20 a.k.a. 32bit TGA2 w/ IBM RGB561 RAMDAC was causing
the kernel to panic since it is recognised as a TGA and the TGA driver
doesn't [yet] know what to do with it.

This patch fixes that by:
	o  making tgamatch() try to actually figure out what kind
	   of TGA card is there, rather than simply relying on the
	   vendor/product ids.
	o  creating a tga_cnmatch() so that the console code in
	   arch/alpha/pci/pci_machdep.c can cause the same to occur.
	o  breaking up some of tga_getdevconfig() into a few different
	   functions to re-use code that would have been duplicated.
	o  changed arch/alpha/pci/pci_machdep.c so that it calls out
	   to tga_cnmatch() if DEVICE_IS_TGA() matches before it decides
	   to attach the console as a TGA.

Addresses PR: port-alpha/12923
2001-07-16 00:55:16 +00:00
thorpej dcfd225d73 Defer sending shootdown IPIs a bit longer. Reduces traffic a fair
bit more.
2001-07-15 21:57:01 +00:00
thorpej ff62d4c0c5 - Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
  are passed to pmap_tlb_shootdown().  This, combined with the locking
  protocol tweak, allow us to get a consistent view of `activeness' of
  a pmap, which means we can optmize away a lot of TLB shootdown traffic
  for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
  to deal with hitting the entire TLB, and garbage-collect the TBIA
  and TBIAP IPIs.
2001-07-15 16:42:18 +00:00
thorpej f79117f725 UVM never passes us a NULL pmap argument; remove that Mach VM leftover. 2001-07-15 05:24:20 +00:00
thorpej 6908e679ac Cosmetic change. 2001-07-14 17:55:42 +00:00
thorpej 3eeb00e998 Oops, only register those event counters if the primary processor. 2001-07-14 05:48:45 +00:00
thorpej c022450f9c Instrument the lazy FP context switch path:
- fpevent_use is incremented the first time a process uses FP
  for the first time (note, FPUSED is inherited on fork, but
  cleared on exec).
- fpevent_reuse is incremented whenever a process that has previously
  used FP has to take a FEN trap in order to be able to use it again.
2001-07-14 05:10:38 +00:00
thorpej 335571bc61 Change the way we spin up CPUs. Now boot the CPU as soon as we
discover it, but make it block on a semaphore until the MI kernel
says that we can let the secondary processors loose.  This allows
us to announce the extensions on the secondary CPUs, and to compute
the intersection of all the extensions across all CPUs, like so:

cpu0 at mainbus0: ID 0 (primary), 21164A-2
cpu0: Architecture extensions: 1<BWX>
cpu1 at mainbus0: ID 1, 21164A-2
cpu1: Architecture extensions: 1<BWX>
2001-07-13 21:34:35 +00:00
thorpej d819792e68 Use memcpy() in kcopy(), copyin(), and copyout(). XXX This means we have
to burn 3 insns to swap the arguments.  Need to change the interface to
these routines to match memcpy().

G/C bcopy() from here.  We'll let it be provided by libkern (which is
what provides memcpy()) until bcopy() is exorcised completely.
2001-07-13 00:06:06 +00:00
thorpej 97d7c635b0 bcopy -> memcpy 2001-07-12 23:35:42 +00:00
thorpej 1dd3ea59f6 bcmp -> memcmp 2001-07-12 23:26:30 +00:00
thorpej 294259060c bzero -> memset 2001-07-12 23:25:39 +00:00
soren ce3293accb ncr(8) is gone from the tree, so remove ^#ncr*. 2001-07-09 15:05:22 +00:00
abs 01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
tsutsui df016928f8 Remove (commented out) ncr* at pci? lines. 2001-07-07 17:09:47 +00:00
toshii 4866f1a22b Fix typo. s/extention/extension/ 2001-07-05 08:38:24 +00:00
nathanw c45675aa2b The machine check error code is reliably located at an offset of 0x10
in the logout frame. Print it for all fatal machine checks on all
models.
2001-07-03 13:55:42 +00:00
darcy ce0ec1e208 Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores.  It appears that there are no overrides
in the code and each file has the following added.

 options    SYSVSEM     # System V semaphores
+#options   SEMMNI=10   # number of semaphore identifiers
+#options   SEMMNS=60   # number of semaphores in system
+#options   SEMUME=10   # max number of undo entries per process
+#options   SEMMNU=30   # number of undo structures in system
 options    SYSVSHM     # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten.  It was done separately.
2001-06-30 11:00:31 +00:00
thorpej 0910b96106 Panic if we get an MM trans/prot fault in interrupt context. 2001-06-26 17:29:28 +00:00
wiz e2eaa3b87a constraint, not contraint. 2001-06-21 12:15:03 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
thorpej 7478f1c9a3 Add sf(4), gsip(4), gphyter(4) drivers. 2001-06-18 22:40:19 +00:00
christos 59abdecf4b Add a linux specific trapsignal() function. This is just a passthrough
on all platforms but the i386. On the i386 we look at T_PROTFLT and send
a SIGSEGV instead of SIGBUS. This makes allegro lisp 5.0 and pvs (a proof
verification system) to work.

XXX[1]: We need to go through each architecture and verify that we send
        the correct signal on each trap type.
XXX[2]: trap.c on all other architectures but i386 needs to be modified
        to s/trapsignal/(*p->p_emul->e_trapsignal)/g
2001-06-18 02:04:42 +00:00
christos 0f380fac15 Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +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
itojun 4d51fe368b change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
2001-06-14 05:44:23 +00:00
wiz c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
simonb e5bd00e48d For ports that wire up pciide in compatibility mode, have
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.

Ports that don't need to do this no longer need to supply a
dummy function.
2001-06-08 04:48:54 +00:00
lukem 5429ee5e02 add iha(4); it works in my pc164 after thorpej fixed a minor issue 2001-06-07 03:51:53 +00:00
thorpej 95eaadac34 Use symbolic names for the CTB terminal type field, rather than
hard-coded constants.
2001-06-05 04:53:11 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
enami da8f8f1e72 define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
2001-05-31 07:37:01 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
he 47ae105daa Add Makefile snippets to install netboot in installation/netboot
under ``make release''.
2001-05-28 18:21:12 +00:00
sommerfeld 4aaf078a4a Assorted microtime fixes (similar to fixes I made yesterday when
porting this code to i386mp branch):

 - call microset() early on each cpu so that calls to microtime()
before the first clock interrupt don't return trash.  this manifested
itself as garbage runtimes in "ps" for kernel threads.
 - avoid races between hardclock updating "time" and microset on a
different cpu reading it by adding a "microset_time" global which is
initialized from "time" on the primary cpu.
 - call microset every hz ticks, not every hz+1 (cosmetic)
2001-05-27 13:53:24 +00:00
chs e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00
thorpej 937cea769e Brain'o in last. Pointed out by Steve Woodford <scw@netbsd.org>. 2001-05-19 14:20:40 +00:00
tsutsui a1931e2305 Remove unneeded scsipi includes. 2001-05-19 05:22:41 +00:00
thorpej 1af4d30054 Don't compute psuedo header checksum if nxt == 0. 2001-05-19 00:30:35 +00:00
ross 26882092f4 o Deal with stray machine checks
o Add for alpha a security-sensitive rate-limiting printf(9) wrapper based
  on ratecheck(9):  void rlprintf(struct timeval *t, const char *fmt, ...);
2001-05-14 19:56:22 +00:00
ross f62f237fde Fix new DEBUGLIST feature. 2001-05-14 19:49:03 +00:00
ross 04ff12867f Make the /u part of show reg/u work. 2001-05-13 01:40:58 +00:00
ross d6a25f9b02 Add DEBUGLIST mechanism. Example config line:
makeoptions DEBUGLIST="uvm* trap ufs*"
This turns on -g for only those files matching a DEBUGLIST pattern word.
2001-05-08 05:47:35 +00:00
ad 14ad1926a8 Add mlx at eisa. 2001-05-06 20:32:20 +00:00
thorpej 18c5f91b0b Fix a deadlock cause by a lock ordering interaction between pmap_enter()
and pmap_growkernel().
2001-05-05 18:22:04 +00:00
thorpej 18639a81be No need to have code we don't use anymore. 2001-05-05 02:20:53 +00:00
thorpej fcbf0b9d21 Add systype for "Titan" systems (systype 38). 2001-05-03 20:52:19 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
thorpej cfda5afaa5 Add some page coloring defaults. 2001-05-02 02:30:30 +00:00
thorpej 5291142217 Determine the size of the B-Cache earier, and initialize the
number of page colors accordingly.
2001-05-02 01:24:29 +00:00
thorpej 05dac31b1e Initialize the VM page size before calling the platform init routine. 2001-05-02 01:05:16 +00:00
ross 43c3cc6cc0 Fix lock problems with error flow reorg. 2001-05-01 05:53:29 +00:00
thorpej cf3594e27e Delete the pmap_copy() calls. 2001-05-01 05:33:12 +00:00
thorpej 72a57e578e Use CPU_INFO_FOREACH(). 2001-05-01 05:16:44 +00:00
thorpej ed63ff3c52 Use a single linked list for PV entries. This saves 1MB of space
on my 1G RAM AlphaServer.
2001-05-01 02:53:05 +00:00
thorpej cf67ac7122 Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
ross 613d465e10 apply recent changes to DEBUG code 2001-04-30 19:00:41 +00:00
thorpej 2b27ac7a99 Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure.  Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM.  These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg.  As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now).  Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +00:00
sommerfeld a80b986278 Correct microtime() to use the microsecond part of the base timestamp. 2001-04-29 17:04:41 +00:00
thorpej f38e77afea Add glue for page zero'ing in the idle loop. 2001-04-29 06:54:03 +00:00
thorpej a96fcfa38c Disable the optimized in4_cksum() for now -- there seem to be problems. 2001-04-29 05:54:29 +00:00
thorpej cee702b869 Optimized in4_cksum(). 2001-04-29 03:29:21 +00:00
kleink fe3c9ceaf7 * Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
  explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
  macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
  intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
thorpej 53c1b3f9d7 Add a microtime() implementation that interpolates between ticks
using the cycle counter.  MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".
2001-04-28 06:10:49 +00:00
kleink 99054d7a6c Add definitions for C99 fastest minimum-width integer types. 2001-04-26 16:25:19 +00:00
ross 32edf97089 Move fp_complete() outside kernel lock perimeter. 2001-04-26 04:21:35 +00:00
ross b569533b9a Clean up 3 comments. 2001-04-26 04:16:17 +00:00
ross 2df695b1e4 o IEEE 754 floating-point completion code.
o Implement the architected FP_C "Floating Point Control Quadword"
2001-04-26 03:10:44 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
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