Commit Graph

1798 Commits

Author SHA1 Message Date
ross 5790ee09ee Revert...Jason didn't use Andrew's diffs. 1998-06-05 15:28:40 +00:00
ross 8f455480ef Tweak the copyrights a little bit. pci_550.h gets a TNF copyright, not
CMU, and pci_550.c keeps TNF but gets "Andrew Gallatin and Jason R. Thorpe".
1998-06-05 03:34:27 +00:00
thorpej cf914cac00 oops, read CNFG on all Pyxis revs. 1998-06-05 02:15:38 +00:00
thorpej cbaedc8675 Support for the Digital Personal Workstation [456]xx, a.k.a. Miata (systype
DEC_550).  Mostly cloned from the EB164 systype, with some modifications
from myself, and a few more from Andrew Gellatin.
1998-06-05 02:13:41 +00:00
thorpej 3cfb38c5d1 Define the Pyxis interrupt request register. 1998-06-05 00:53:02 +00:00
thorpej 3249813e11 For whatever reason, the firmware seems to enable PCI loopback mode if it
also enables BWX.  Make sure it's enabled if we have an old, buggy firmware
rev.
1998-06-04 22:58:33 +00:00
thorpej d4d49905dd Add support for using BWX for PCI config space and PCI i/o and mem space
on the ALCOR2 and Pyxis.  BWX is enabled iff:
- It hasn't been disabled by the user (patch `cia_use_bwx' or build cia.o
  with the option "CIA_USE_BWX=0"),
- it's enabled in CIA_CSR_CNFG,
- we are running on an EV5-family processor,
- BWX is in the processor's capabilities mask.
1998-06-04 21:34:45 +00:00
thorpej 616125f8d1 Deal with a hardware bug in Pass 1 and Pass 2 Pyxis chips. Basically,
the scatter/gather TLB cannot be invalidated on these chips.  So, to
work around this, we configure the otherwise unsed DMA Window 2 as a
2M SGMAP window at 128M, point all of its page table entries at the
DMA spill page, and, when the TLB is to be invalidated, put the PCI bus
into loopback mode, and create a target hit on Window 2 every 64k for
the number of TLB entries (plus a few ... it seems to not work unless
we read a few extra times), forcing out old TLB entries to make room for
the new, dummy target hits.
1998-06-04 18:11:23 +00:00
thorpej a51d42503c Export the spill page PTE, and provide a hook to initialize it early. 1998-06-04 01:22:52 +00:00
thorpej 6dc28f5445 CIA and Pyxis have 8 scatter/gather TLB entries. 1998-06-04 01:18:22 +00:00
thorpej 32fef69ef7 Define the CIA control register. 1998-06-04 01:04:11 +00:00
thorpej d94f02f9fd Ok, now we _REALLY_ have Pyxis recognition correct. There are two systypes
that can have Pyxis: EB164 (AlphaPC164LX and AlphaPC164SX) and DEC_550 (Miata),
and these systypes/variations _always_ have Pyxis.
1998-06-03 23:16:55 +00:00
thorpej 44605ba506 Define a bunch more system variations. 1998-06-03 23:07:38 +00:00
thorpej 15c52040a5 Define the ALT_MEM big in the CIA revision register. 1998-06-03 22:19:08 +00:00
mjacob 9f5797ac1d turn on Essential HIPPI for these configurations 1998-06-03 21:16:28 +00:00
thorpej d6041754c2 Allow the DMA tag to specify a boundary contraint. If the device has a
more strict boundary, the map will use it, otherwise the map will inherit
the tag's, unless the tag's constraint is 0 (no boundary constraint).
1998-06-03 18:25:53 +00:00
thorpej 50be447da3 Sync the bus_dmamap_load back-end functions between alpha and i386. (only
slight, unnecessary differences)
1998-06-03 04:15:05 +00:00
thorpej 7022024d4a Add epic* at pci? 1998-06-02 01:43:33 +00:00
thorpej a7f360c6c9 Specify a non-profiling C rule. 1998-05-31 23:25:41 +00:00
matt 5d6bc16daa more optimizations 1998-05-29 15:55:34 +00:00
matt 164da176e8 Add boundary checks to _bus_dma_load... 1998-05-29 15:25:07 +00:00
drochner 0c05b92da1 pull in new PC display headers 1998-05-28 16:59:31 +00:00
thorpej c59c1eae2a Define ioasic device offsets in terms of standard ioasic "slot" offsets. 1998-05-27 00:18:13 +00:00
thorpej 1ef3ca572e - Additional rearrangement for the sake of running on the DECstation some
day.
- Convert to use bus_dma.
- Fix cleaning up unaligned start address.
- Correctly determine if the device supports Fast SCSI, and adjust the
  minimum sync period accordingly.
- Compute minimum sync period correctly on the 25MHz devices.
- Use GPI2 to determine if we're a 25MHz or 40MHz device.
- Currectly determine SCSI ID and "fast mode enabled" for the built-in
  TCDS on DEC 3000 models, using cached information from the PROM environment.
1998-05-26 23:43:05 +00:00
thorpej ab087002d1 Make this into a proper attachment (i.e. use asc_tcds) and clean up
the namespace accordingly.
1998-05-26 23:37:44 +00:00
thorpej 3aa84f9e26 - Make this into a proper attachment (i.e. use asc_tcds) and clean up
the namespace accordingly.
- Set FCLK in the CFG3 register if we have a > 25MHz clock.
- Indicate that we support Fast mode to the back-end if we're told we're
  fast by the TCDS layer.
- Correctly compute the minimum sync period.
1998-05-26 23:37:27 +00:00
thorpej 3ce836df8d Make the TCDS attachment of the ASC driver a proper attachment (i.e.
attach it with asc_tcds).
1998-05-26 23:34:23 +00:00
thorpej 2d384ae1a1 GPI2 in the CIR register indicates our clock speed: 1 = 25MHz, 0 = 40MHz. 1998-05-26 22:48:01 +00:00
kleink a97fc2f180 If any of _ANSI_SOURCE, _POSIX_C_SOURCE or _XOPEN_SOURCE are defined, don't
provide any identifiers other than sig_atomic_t.
1998-05-25 20:59:01 +00:00
thorpej e569598438 On DEC 3000s, ask the prom for the SCSI ID and "fast mode enabled" of
the built-in TCDS, while we can still access the prom.
1998-05-25 05:16:42 +00:00
thorpej 085b73d2db Add "SCSIID" and "SCSIFAST" environment variables present on the
DEC 3000 systems.
1998-05-25 04:01:10 +00:00
thorpej 57c68363d6 Add support for reading the SCSI ID and "fast mode enabled" from the
PMAZB-AA and PMAZC-AA EEPROM.
1998-05-25 01:14:38 +00:00
thorpej 3b9e9634fb - Change the tcds child locator from "slot" to "chip", making it look less
like a TurboChannel locator, and more like what is actually going on.
- Allow tcds and asc children of tcds to be cloned.
1998-05-24 23:45:29 +00:00
thorpej d3ead78027 Several changes to the TurboChannel Dual SCSI driver:
- Fix the autoconfiguration model; the TCDS children don't attach to
  TurboChannel, so don't make it look like they do.
- Make the driver use bus_space (not bus_dma yet; soon)
- Recognize the PMAZ-FS (baseboard fast SCSI on DEC 3000s) and the
  PMAZB-AA (TCDS option card) and PMAZC-AA (TCDS fast SCSI option card).
- Rearrange it a bit, so that it can eventually be made into an "MI"
  TurboChannel driver (i.e. work on DECstations).
1998-05-24 23:41:42 +00:00
ross a3073631d7 Rebury an old mach-vm-quirk warning, for mach vm kernels. 1998-05-24 22:15:19 +00:00
ross 1ce82f8f84 Fix previous to kill gcc warning in non-DEBUG compile. 1998-05-24 20:59:49 +00:00
matt 66e7b8998f Only disable stray interrupts if there is no interrupt handler attached 1998-05-24 19:09:57 +00:00
matt a54568bc38 Add PCMCIA hooks (taken from files.i386) 1998-05-23 22:42:14 +00:00
ross 02ae2c98b3 In pmap_pv_enter() untangle the allocated pv (now "newpv") and the DEBUG
loop temporary so DEBUG kernels don't trap on startup.
1998-05-23 22:23:09 +00:00
ross 30e2441b99 Prototype sio_intr_alloc(). 1998-05-23 21:36:33 +00:00
matt 9c2e213217 Add sio_intr_alloc (copied from i386's isa_intr_alloc) for PCMCIA. 1998-05-23 18:35:56 +00:00
matt 11e1975af7 Add isa_intr_alloc macro (for PCMCIA). 1998-05-23 18:35:03 +00:00
thorpej 3dfd62c76f cs_heldchar is gone. 1998-05-23 00:51:10 +00:00
thorpej 0cb3acc9ae Correct a small, but fatal, typo. 1998-05-21 23:38:04 +00:00
thorpej 93d96b3415 Add LOCKDEBUG (commented out). 1998-05-20 18:09:16 +00:00
thorpej a2f214a443 Add fine-grained locking, using a locking protocol modeled after the i386
UVM pmap's locking protocol, written by Chuck Cranor.  Not all of the
support for multiple processors is here yet, but the kernel does run
under moderate loads with LOCKDEBUG (all locking operations are no-ops
unless LOCKDEBUG is turned on).

This is by no means complete... there are still some possible snares
to take a look at.
1998-05-20 04:05:50 +00:00
thorpej 6626878e7b It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
1998-05-19 19:00:11 +00:00
thorpej ca819f2940 Argh, finish renaming Lev1map to kernel_lev1map. 1998-05-19 18:35:11 +00:00
thorpej eaf145ad5e Make function naming consistent, and teach pmap_pv_dump() about page
usage types.
1998-05-19 05:21:34 +00:00
thorpej dc13176aec No need to keep global pointers to the initial kernel level 2 and level 3
page tables.  Also, rename Lev1map to kernel_lev1map.
1998-05-19 02:57:01 +00:00
thorpej 804e5be6f7 Nuke `register'. 1998-05-19 02:43:48 +00:00
thorpej 293854e385 Put pmap_initialized in the BSS segment. 1998-05-19 02:42:41 +00:00
thorpej ca12fa7ebe Make PT page reference counting more generic so it can be used for other
special use page types.
1998-05-19 02:04:28 +00:00
thorpej 8fdc16212f The Alpha architecture has a variable page size; don't hardwire the
number of PV entries per page at compile time.
1998-05-19 00:42:16 +00:00
thorpej b44dc2ecbf Make the page attribute manifest constant names have similar form to
page usage manifest constant names.
1998-05-19 00:29:03 +00:00
thorpej 180f140a85 Keep track of page usage inside the pmap (pvent, l{1,2,3}pt page, "normal"). 1998-05-19 00:20:21 +00:00
matt ba482f242f Fix lc0 (lemac) line(s) so that the de20[345]s will work again. Add depca
for de20[012]s (tested and works on a pc164sx).
1998-05-14 21:53:40 +00:00
drochner 95bdb660ed Simple screen attribute handling for wscons.
The graphics device driver passes a "default attribute" for normal text
output to the wscons framework. If the emulation module needs more
attributes (for different "renditions") it can allocate them via a
callback.
For now, only the "sun" emulation makes use of it.
1998-05-14 20:49:55 +00:00
thorpej d19fbe1196 Garbage-collect the old confargs stuff that was used in the Early Days.
It isn't really appropriate anymore.  Replace it with a real mainbus
attach args structure.
1998-05-14 00:01:30 +00:00
thorpej 6a49b0a33e Clean up some historical artifacts. 1998-05-13 23:38:26 +00:00
thorpej 748d204949 Cleanup TurboLaser autoconfiguration somewhat. 1998-05-13 23:23:23 +00:00
thorpej b24eb75496 Clean up a buglet. 1998-05-13 23:22:08 +00:00
thorpej ca9600b324 Implement and use gbussubmatch(). 1998-05-13 22:13:35 +00:00
thorpej 326f8183dc No need to hard-code the mcclock offset on the gbus; gbus is direct-config. 1998-05-13 22:03:07 +00:00
thorpej fb9726fe91 Add a few files related to the Digital Personal Workstation. 1998-05-13 21:59:32 +00:00
thorpej 49aa171ab9 Add support for chaining DMA windows together, for falling back on
SGMAPs if a direct-mapped window fails.
1998-05-13 21:21:16 +00:00
thorpej b012e4e39b Normalize gbus configuration somewhat, and add support for configuring
the Zilog DUARTs.
1998-05-13 02:50:29 +00:00
thorpej 6172f5a0ac Use flags instead of a bunch of booleans. Add a "use bwx" flag. 1998-05-12 19:07:21 +00:00
thorpej 0b64ea0879 Gah, typo. 1998-05-12 18:45:04 +00:00
thorpej 86ee1b1000 Oops, and the writes, too. 1998-05-12 18:44:32 +00:00
thorpej cc45d00d3c Clean up the code that puts the PCI controller into config mode 1; no
functional difference.
1998-05-12 18:40:44 +00:00
thorpej 34bbe5cd80 Rework ALCOR/ALCOR2/Pyxis recognition Yet Again. (Actually, just the
way it's displayed, and mask off the revision once we've determined
which chip we're talking to.)
1998-05-11 23:56:16 +00:00
thorpej 0624060713 Rework PCI interrupt mapping on the EB164 systype. Rather than computing
interrupt routing directly, use the interrupt routing information provided
in the PCI "line" register.  The previous scheme did not work properly on
AlphaPC 164SXs.  Also, be silent about the fact that 0/8/x does not
have its interrupt mapped; this is to be expected on the 164SX (this is
the Cypress PCI-ISA bridge, which has IDE wired to compat mode on functions
1 and 2; the 164SX does _not_ have PCI IDE on device 11 like other AlphaPCs).
1998-05-11 23:36:46 +00:00
thorpej d5157b2b05 Sync w/ reality 1998-05-11 00:34:24 +00:00
kleink 687ea7404c Fix some arithmetics lossage on typeless pointers. 1998-05-08 16:55:15 +00:00
thorpej 4665241bf8 Simplify the direct-mapped DMA case somewhat by adding a window base
member to the DMA tag, and calling the direct-mapped back-ends directly,
rather than through chipset-specific front-ends which pass the window
base as an additional argument.
1998-05-07 20:09:37 +00:00
mjacob 294015435b remove the unneccessary alpha_mbs and slight cleanup 1998-05-05 22:01:54 +00:00
mjacob 742983f1eb make it impossible to compile w/o SIO (you cannot have a console otherwise 1998-05-05 22:01:31 +00:00
mjacob 1363662600 update for new ws stuff, plus cleanup 1998-05-05 22:00:28 +00:00
mjacob 0713044d87 carry over new ws words from GENERIC 1998-05-05 20:29:18 +00:00
mjacob bcfe658515 Move declaration within block where it will be used (in case
keyboard not defined).
1998-05-05 20:10:05 +00:00
thorpej 88bf077524 Don't need options UVM and PMAP_NEW anymore; they're now standard. 1998-05-04 04:38:28 +00:00
thorpej 22e3e4691d Make UVM+PMAP_NEW the standard VM system on NetBSD/alpha. 1998-05-04 04:35:46 +00:00
ross 53dbd5b7fc Add file-system MFS to support ftp download of sysinst. 1998-05-03 23:15:45 +00:00
augustss abbe1b7df3 Add Ensoniq AudioPCI driver. Commented out until tested. 1998-05-01 22:26:54 +00:00
thorpej b3cdc88a22 Fix some whitespace. 1998-05-01 05:22:16 +00:00
ross d38d75c9fb Include net/route.h 1998-04-30 08:27:59 +00:00
ross 1e075b072d Rewrite active_pmap() and again kill the reborn curproc bug. 1998-04-30 08:27:00 +00:00
mjacob de4d1c62af pretty much redo interrupt code- now handles shared interrupts and solves the buspin int problem 1998-04-30 04:31:19 +00:00
mjacob e3904356a4 do some mbs before a config read/write 1998-04-30 04:25:22 +00:00
thorpej 1686aca01d Pull in opt_gateway.h as appropriate. 1998-04-29 23:11:00 +00:00
thorpej 9e97d1cc17 Define Pyxis Interrupt Mask and General Purpose Output registers. 1998-04-29 03:09:26 +00:00
thorpej 47a53b61ec Add the DEC 550 Personal Workstation slot. 1998-04-29 02:41:41 +00:00
thorpej 371b1a7fb7 Define the DEC 550 Personal Workstation (Miata) systype. 1998-04-29 02:39:24 +00:00
thorpej 829fa05638 Ignore any `-' characters that might have been passed in the boot flags. 1998-04-29 02:13:51 +00:00
thorpej a152517daa Add interrupt counter space for the DEC EB64+, and fix a misplaced
counter comment in the kn300 interrupt counters.
1998-04-29 00:34:06 +00:00
thorpej 28b467b65b Add support for the DEC EB64+. 1998-04-29 00:24:59 +00:00
thorpej 23a168699c Build EB64+ PCI support if DEC_EB64PLUS is configured. 1998-04-29 00:24:28 +00:00
thorpej 861c7a7e2d Add a stub pckbc_machdep_cnattach() which simply returns an error. This
function is meant to glue the new pckbd driver to the old console code
on ports which use the old PC-style console code.  This will eventually
be purged when all of the old legacy consoles have gone away.
1998-04-28 19:14:27 +00:00
thorpej 4ccb48a525 Try (again) to get the chip number right for Alcor and Pyxis, using the
following (iffy) hueristic:

	CIA revision 1   -> 21171
	CIA revision 2   -> 21172
	CIA revision > 2 -> 21174
1998-04-28 18:11:35 +00:00
thorpej b217194508 Fix the semantics (and the comment describing them) of pmap_update(). This
function is intended to process any deferred pmap operations, and is not
meant as a general means of flushing the TLB.  Since this pmap module does
not defer any operations, make pmap_update() do nothing.
1998-04-27 19:17:16 +00:00
thorpej 30188853dc Increase the efficiency of pmap_l{2,3}pte() somewhat, by allowing the
caller to pass an optional 3rd argument, which is the previous level
PTE corresponding the virtual address.  If this argument is non-NULL,
the table walk otherwise necessary will be bypassed.
1998-04-27 19:07:03 +00:00
kleink a53c1863fe Provide definitions for intptr_t and uintptr_t, signed resp. unsigned integral
types large enough to hold any pointer.
1998-04-27 17:39:10 +00:00
drochner 7f77474219 Oops, forgot to delete. It's in dev/pci now. 1998-04-26 11:57:00 +00:00
mjacob 384418e4b7 "Whitespace" does not mean uncommenting a reference to a file that does not, as yet, exist in the tree 1998-04-26 05:18:50 +00:00
thorpej b6eff278f2 Fix some whitespace lossage. 1998-04-25 00:12:44 +00:00
drochner 660e718e2e Drivers for PC-like console devices are MI now. 1998-04-24 20:05:54 +00:00
thorpej 6f3b521cd5 Whitespace sanity. 1998-04-24 18:18:41 +00:00
mjacob 6cd64be0b6 fix minor typo 1998-04-24 01:25:18 +00:00
thorpej 2b6154a68c Add PCI IDE. 1998-04-18 01:19:40 +00:00
thorpej 792e89a201 Add PCI IDE goop. 1998-04-18 01:19:08 +00:00
thorpej 4fc79b8fd3 First cut at PCI IDE compat interrupt support for the EB164 systype.
PCI IDE is found on the AlphaPC 164SX's Cypress PCI-ISA bridge.
1998-04-18 01:18:37 +00:00
thorpej 574b87a792 Initialize the PCI IDE compat interrupt PCI method to NULL; PCI IDE
compat interrupts are not currently supported on these platforms.
1998-04-18 01:12:23 +00:00
thorpej 78c7ebb2d0 Add a second Alpha-specific pci_chipset_tag_t method for establishing
PCI IDE compat interrupts.  Note that this function is optional, and
platform-specific code may initialize the pointer to NULL.
1998-04-18 01:10:54 +00:00
thorpej a5f006fb5f Fix a typo. 1998-04-18 01:09:20 +00:00
thorpej 783382095c Machine-dependent bits for PCI IDE. This redirects PCI IDE compat interrupt
goop to the appropriate platform-dependent code.
1998-04-18 01:08:52 +00:00
mjacob e77859a612 Hmmm... handle the case where there is no keyboard configured (panic
if the console selection is asking for it). Also add the stuff that
was missing from dec_kn300.
1998-04-17 02:45:19 +00:00
thorpej 815703e5ec Make function names in printfs and panics consistent. 1998-04-16 19:50:55 +00:00
thorpej a048ee73ca Fix a whitespace botch. 1998-04-16 19:40:56 +00:00
thorpej 2615a1d8d3 Allow device 8 (the SIO) to have its interrupt mapped; there might be
a PCI IDE controller on one of the PCI-ISA bridge's functions (e.g.
AlphaPC 164SX).
1998-04-16 19:24:24 +00:00
drochner 3cc1fe831c count allocated screens correctly 1998-04-16 12:52:42 +00:00
thorpej c72ac312a7 Add pcppi/spkr drivers, and use DHCP for NFS boots. 1998-04-16 04:11:50 +00:00
thorpej f92ae39153 Make this compile if a Rawhide isn't configured. 1998-04-16 04:04:15 +00:00
mjacob 512e80082b add an AlphaServer 4100 Specific config file 1998-04-15 21:53:25 +00:00
mjacob a8d3df00ed oops- add missing include 1998-04-15 21:42:24 +00:00
mjacob afeea01bbd add back in display console stuff 1998-04-15 21:29:03 +00:00
drochner b7c6c315ea convert to new wscons
(pcppi->pckbc, pms->psm, wscons->wsdisplay)
1998-04-15 21:19:21 +00:00
drochner b98513c4ff convert to mi wscons 1998-04-15 21:15:08 +00:00
drochner b9d78308c1 tell drivers that this port knows about the mi wscons stuff 1998-04-15 21:12:45 +00:00
drochner 534775fe76 explicitely initialize console keyboard 1998-04-15 21:06:46 +00:00
drochner c5ea534f57 Switch the console to polling mode before accessing the keyboard with
interrupts disabled.
1998-04-15 20:51:10 +00:00
drochner fba6e5e23a update for new mi wscons, add ISA speaker 1998-04-15 20:48:52 +00:00
drochner 584f3e8aa0 Adapt PCI console selection to new mi drivers. 1998-04-15 20:46:34 +00:00
drochner 971dd06182 Adapt ISA console selection ti new mi drivers.
(was broken anyway, a "++" was missing somewhere)
1998-04-15 20:43:07 +00:00
mjacob 70e72d5545 redo misleading comment (thanks, soren) 1998-04-15 20:37:39 +00:00
drochner 90fc55bdf9 use mi wscons and device drivers 1998-04-15 20:35:37 +00:00
thorpej f82e238b10 Don't need "delaybah" in the attach args anymore. 1998-04-15 20:11:10 +00:00
thorpej ba1ef83a1e Don't use the ISA `delay port', since it no longer exists. 1998-04-15 20:10:52 +00:00
mjacob bd2e0fee32 delay handle was removed 1998-04-15 19:49:19 +00:00
mjacob 6cc22e724e Hmmm- how did that happen- I missed a merge 1998-04-15 01:18:17 +00:00
mjacob cddc0bf326 add Alpha 4100 support 1998-04-15 00:53:53 +00:00
mjacob 6ad4ba8370 some cleanup 1998-04-15 00:51:00 +00:00
mjacob aed073a77f add Alpha 4100 support 1998-04-15 00:50:14 +00:00
mjacob 0ba76b38c8 spurious interrupt notification and finally adding vmstat -i support 1998-04-15 00:49:58 +00:00
mjacob 0229740b5e removal of unneeded define 1998-04-15 00:49:17 +00:00
mjacob 5f59df9630 oops on byte enables for TurboLaser systems 1998-04-15 00:48:58 +00:00
mjacob 4fa71d82a5 add Alpha 4100 support 1998-04-15 00:46:57 +00:00
mjacob 17ec1fbf11 clarification of comment 1998-04-15 00:46:41 +00:00
mjacob 65e5c41fad do not cia include files here 1998-04-15 00:46:17 +00:00
mjacob d3f1c5b8d8 add Alpha 4100 support 1998-04-15 00:45:43 +00:00
thorpej 164f56220e Add support for the Cypress CY82C693 PCI-ISA bridge. This bridge is more or
less like an Intel SIO except that the ELCR registers are accessed differently
than on the Intel SIO.

XXX This code needs to be split up into bridge front-end and PIC back-end
XXX pieces.
1998-04-14 22:31:17 +00:00
thorpej 4c01c3c48e Pass the pci_chipset_tag_t to sio_intr_setup(). XXX This code should be
rearranged so that other non-PCI-but-in-all-other-ways-ISA-PIC-like
devices can share code.
1998-04-14 22:20:59 +00:00
tv b21bfbde11 Add -Wno-main conditional on compiler being gcc 2.8 or egcs. (This adds
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
1998-04-12 23:47:41 +00:00
mjacob e40e2ff2d0 A little buglet: softc for pceb is same as sio- so declare it as such.
By not doing so, a very obscure bug followed where the config search
stuff stopped at the bridge (pceb) and didn't even call match for the
two Qlogic ISP cards that followed.
1998-04-12 08:32:19 +00:00
cgd 05bb5a1d2f revert back to 1.28 1998-03-30 17:52:03 +00:00
thorpej 0ce9e8b825 We don't have software-only maps, so a NULL pmap_t will never be passed
to pmap functions.
1998-03-28 19:53:42 +00:00
thorpej cbc72091e5 Remove a comment that is not applicable in NetBSD - we don't have
software-only maps.
1998-03-28 19:44:49 +00:00
thorpej ce4810822b Add autoconfiguration support for the Cypress 82C693 PCI-ISA bridge,
found on AlphaPC164SX boards.

Partially from Anders Magnusson <ragge@ludd.luth.se>.
1998-03-28 06:58:43 +00:00
cgd c0ac8bae67 GC alpha's ECOFF_TOOLCHAIN make variable, and related bits. Nobody
should be using an ECOFF toolchain on NetBSD/alpha any more.
1998-03-28 00:50:41 +00:00
thorpej 4893f22399 Much more sane boot block builds, from Chris Demetriou. 1998-03-28 00:21:35 +00:00
thorpej a95651eaea Add a PMAP_KERNEL_PTE() macro that returns the PTE for a given KVA. If
DEBUG, this performs a table walk.  Othwise, the Virtual Page Table is
used.  Use this macro in a few places where this was done by-hand.

Make vtophys() use PMAP_KERNEL_PTE().  In non-DEBUG cases, this is
a fair bit faster.
1998-03-27 19:18:04 +00:00
ross 2ce8cda3e5 Get rid of a /* in a comment. 1998-03-27 01:17:18 +00:00
thorpej b1e15c2005 Add some robustness to pmap_alloc_physpage(): Instead of panic'ing if
we can't get a page, find an inactive pmap and pmap_collect() it,
freeing up a few pages.  Go ahead and die if we can't allocate a page
after 5 tries.
1998-03-27 00:52:43 +00:00
thorpej b86884a71a Give pmap_collect() some substance: when called, a process is being
swapped out, so remove all of the physical mappings the process has
in order to free up the page table pages.

Since the pmap module is allowed to "forget" mappings, pmap_collect()
may be called in other situations where the memory situation is desperate,
although it's more likely that the pages will simply be needed again the
next time a process runs.
1998-03-26 22:18:36 +00:00
thorpej 531db9e0d3 Sanity check the virtual addresses in the kernel and non-kernel cases
of pmap_enter() (and pmap_kenter_*()).  Remove diagnostic check for
kernel pmap in pmap_alloc_asn().
1998-03-26 19:06:28 +00:00
thorpej 040f7cbc70 Remove references to pmap.old.h - It should have just been pmap.h, but
that isn't necessary, either, since <vm/vm.h> is already included.
1998-03-26 18:17:13 +00:00
thorpej c4ba627afc Kernel config file for bishop.nas.nasa.gov and ripley.nas.nasa.gov,
AlphaStation 500 and AlphaStation 600, respectively.
1998-03-26 03:00:36 +00:00
thorpej 9234f2450b Enable DDB history, netbsd.gdb. 1998-03-26 02:58:48 +00:00
thorpej 6111783e61 if NEW_SCC_DRIVER, 3000/300 and 3000/500 aren't PROM console candidates. 1998-03-26 02:53:21 +00:00
thorpej a9e071bef5 defopt NEW_SCC_DRIVER 1998-03-26 02:52:43 +00:00
thorpej 1282aca230 Add options UVM, PMAP_NEW, and NEW_SCC_DRIVER. 1998-03-26 02:51:46 +00:00
thorpej 73f1a02583 If NEW_SCC_DRIVER is defined, the 3000/300 and 3000/500 are not
PROM console candidates.
1998-03-26 02:45:34 +00:00
thorpej 7b4da708cc Add support for attaching a zstty as the console, conditional on
NEW_SCC_DRIVER.
1998-03-26 02:43:22 +00:00
thorpej 4a4bccc923 Remove references to NEW_PMAP. 1998-03-26 02:21:46 +00:00
thorpej 76ba34c797 Remove references to "new_pmap". 1998-03-26 02:19:02 +00:00
thorpej 456b3df281 Remove the Mach 3 pmap from the tree, replacing it with the contents of
pmap.old.<whatever>.  To see the history, look at the corresponding
pmap.old.<whatever> file.
1998-03-26 02:18:03 +00:00
thorpej 3ac5a77c70 Make pmap_kremove() deal with mappings entered with pmap_enter() as well.
Prevents stale PV entries from lingering around.  Fixes a nagging
"kernel stack not valid halt" I was seeing with PMAP_NEW.

Idea from Chuck Cranor.
1998-03-25 22:52:28 +00:00
mjacob db6aafad0b With new pmap stuff, the need for MSS3 goes away. 1998-03-25 18:33:41 +00:00
ross 3786a63843 1. Always link at the high address, now that we can use free ram below
the kernel on most platforms, including all of the entry-level platforms.
2. Kill the comments and options for load address selection.
3. Kill the default -g.
1998-03-25 02:16:41 +00:00
thorpej e6cf334f5c Keep a few things that reference kernel variables out of the namespace.
Add a check to see if libkvm is using this file.
1998-03-25 00:44:34 +00:00
thorpej 49408401a3 In pmap_destroy_lev1map(), fix a problem where the pmap's ASN wouldn't
be invalidated if the pmap is not active.  A rare thing (in fact, I'm
having trouble thinking of a scenario where it would happen), but it was
incorrect, nonetheless.
1998-03-24 22:02:44 +00:00
thorpej ea074f229a cdev_decl the "zs" device (which is really zstty). 1998-03-24 05:17:14 +00:00
thorpej 0105ff6f53 Update my DEC 3000/400 kernel config to reflect usage of the MI SCC driver.
Do not try this at home.  Caution: hot coffee is hot.
1998-03-24 05:16:30 +00:00
thorpej db00f6f709 Define attachments for the MI SCC driver - only hooks up to ioasic
for now.
1998-03-24 05:15:07 +00:00
thorpej a26a53fbbc Slight hack to allow the MI SCC driver to be used at cdev major 15
for testing purposes.  Normal kernels still get the Alpha-specific
SCC driver.
1998-03-24 05:13:59 +00:00
thorpej ee83014c4d Initial mostly-working ioasic attachment for the MI 8530 SCC driver. It is
enough to use as a console on my DEC 3000/400 (connected to a VT-520
terminal).

XXX The MI SCC driver needs serious changes to handle platforms which
have muliple SCC attachments (e.g. the Alpha port, which has an ioasic
attachment for TurboChannel systems and a gbus attachment for TurboLaser
systems).

XXX The MI SCC driver also needs changes to deal with the wacky (to put
it mildly) way the chips are wired up on the ioasic (on both TC Alphas
and DECstations).  These are going to come along later.
1998-03-24 05:12:00 +00:00
mjacob 4ccb969d0b Okay, handle the ALLOCNOW case by doing the appropriate adjustments
up front. Do the spacing arithmetic slightly differently.
1998-03-23 07:51:25 +00:00
mjacob 8e5970917e Redo it slightly so that S/G now appears to work a bit better. This
version has 2GB direct map starting at 2GB, and either 256MB or 1GB
S/G starting at 1MB. I've done *some* testing on this, but I'm not
quite happy with it yet.
1998-03-23 07:42:40 +00:00
mjacob 88c34f6f5f Spaicing for 32 bit ptes (dwlpx only, really) is 0x20, not 1 1998-03-23 07:09:12 +00:00
mjacob 66194d05bc Do a more complete job of figuring out what kind of DWLP? we have- figure
out how much s/g ram is available. Can't really use the 128K entry S/G
ram yet- but I'll fix that later. More importantly, add in a dwlpx_iointr
handler that will try and figure out what the DWLPX error is and at
least print out what is happening- I actually found it useful in S/G
entry debugging as it could tell me that I had some bad S/G entries.
1998-03-23 06:38:10 +00:00
mjacob 51ba315ba2 Slightly restructure interrupt handling to accomodate the addition
of a dwlpx_iointr vector.
1998-03-23 06:32:39 +00:00
mjacob 7c83bc0da6 Prepare for handling multisized S/G maps. Specify dwlpx_iointr function. 1998-03-23 06:31:54 +00:00
jonathan d3d99a28c9 Update #ifdef'ed-out changes from pmax :
* Add more #ifdef pmax/#endif, #ifdef alpha/#endif where appropriate.
    Config and heade files need more work (or replacement)
  change TK_NOTYET to HAVE_RCONS
  change commented-out /* && cn_tab.cn_screen */ to && raster_console()
  * Add DDB hooks.
  * Note where Alpha console ignores carrier on consoles.
  * Add pmax-derived console tty-size code inside HAVE_RCONS
  * Fold in gross pmax rcons-input hooks, inside HAVE_RCONS

Untested, but whitespace/ifdef only,  cross-compiles OK,
preprocessing shows no significat differences (famous last words)
1998-03-22 08:24:52 +00:00
thorpej a5260cbda0 Use atomic set/clear bits in pmap_activate()/pmap_deactivate(). 1998-03-22 07:27:54 +00:00
thorpej fcfe2f1539 Implement a set of `atomic' (using load-locked and store-conditional)
operations.  Initial set includes:

alpha_atomic_setbits_q()	set bits in a quad
alpha_atomic_clearbits_q()	clear bits in a quad
1998-03-22 07:26:32 +00:00
thorpej 9db8ae93c8 - The pmap now includes support for ASNs. We no longer need to flush
the TLB and I-cache in the SWITCH_CONTEXT macro.
- Right after switching to proc0's newly-created context at startup time,
  flush the TLB and I-cache; this is the only place where it's not done
  automatically.
- Fix a nasty bug in a critical section of cpu_switch(); change the
  pmap_activate -> SWITCH_CONTEXT -> pmap_deactivate sequence to
  pmap_deactivate -> pmap_activate -> SWITCH_CONTEXT.  This prevents
  erroneously marking a pmap inactive if switching to a process that
  shares it's address space (and thus its pmap) with the oldproc!  Noticed
  by Chris Demetriou.
1998-03-22 05:46:02 +00:00
thorpej c0cc1ed476 Implement support for Address Space Numbers, greatly reducing the number
of TLB and I-cache flushes, significantly speeding up context switches.

Once again, many thanks to Chris Demetriou and Ross Harvey for code
review and debugging assistance!
1998-03-22 05:41:37 +00:00
thorpej a8d86e5a7c Replace PMAP_ASNGEN_INVALID with PMAP_ASN_RESERVED. 1998-03-22 05:39:50 +00:00
mjacob 86b6520e41 more TS_WOPEN to tp->t_wopen changes 1998-03-21 23:36:19 +00:00
mycroft 0dae91d9af Eliminate uses of TS_WOPEN in hard-wired devices. 1998-03-21 22:52:59 +00:00
mjacob 34f87569b9 add some error defintions 1998-03-21 22:02:42 +00:00
thorpej 66d8f5b544 sync systypes w/ <machine/rpb.h> 1998-03-20 21:48:21 +00:00
thorpej 63c73f94e3 Add a few more systypes. 1998-03-20 21:48:03 +00:00
thorpej 0f95ffdc1d Nuke swpctxt(); it's only used by the Mach pmap, which we will only ever
use for reference.
1998-03-19 06:44:25 +00:00
thorpej 003c50d1d5 Add a macro to invalidate the TLB for a given pmap/va pair. TLB
invalidation algorithm:

	if (old mapping had PG_ASM set || pmap is active) {
		TIBS(va);
		if (also sync I-stream)
			imb();
	}

The check for "old mapping had PG_ASM" will get all kernel mappings (since
kernel mappings always have PG_ASM set).

This allows us to remove the bogus check for the kernel pmap in
active_pmap() - do so.

Use the new TLB invalidation macro whenever such action is needed.
1998-03-18 23:55:25 +00:00
thorpej 15adb17803 Eliminate the last argument from pmap_remove_mapping(); it makes its own
decisions about TLB invalidation.
1998-03-18 23:11:44 +00:00
thorpej 7ee4af11a7 Change active_pmap() to use the CPU mask (XXX and check for kernel pmap
as well, until some other changes are made).  Nuke active_user_pmap(),
and change the places that used it to use active_pmap() instead (as well
as make some DIAGNOSTIC consistency checks).
1998-03-18 22:50:50 +00:00
thorpej 605472f676 Optimize out a TLB invalidation in a common case of pmap_enter(): if
the PTE was previously invalid, no TLB invalidation is necessary because:

	(1) when a PTE is invalidated, its entry is flushed from the
	    TLB

	(2) the PALcode won't install an invalid PTE into the TLB.
1998-03-18 22:13:58 +00:00
thorpej cfdf9a95ad Keep track of which CPUs are using a pmap by setting/clearing bits
in the pmap's CPU mask in pmap_activate()/pmap_deactivate().
1998-03-18 21:57:03 +00:00
thorpej 43614761e3 In cpu_exit() deactivate the address space before freeing the vmspace
structure.  We will continue to run on this context (which is the
global Lev1map at this point) right up until we switch to proc0's
context in switch_exit().
1998-03-18 20:38:07 +00:00
thorpej 87eb2cfded Don't call pmap_deactivate() if we jumped into the middle of cpu_switch()
from switch_exit(), since by this time, the vmspace will have already
been deactivated and freed.
1998-03-18 20:36:13 +00:00
thorpej b637a998f4 Add ASN housekeeping and a CPU mask to the pmap. 1998-03-18 19:39:23 +00:00
thorpej 961a955498 Move the "are we active" macros out of the header file. 1998-03-18 19:27:46 +00:00
thorpej d37acae24c Add a DIAGNOSTIC checks for the kernel pmap in pmap_create_lev1map()
and pmap_destroy_lev1map().  Correct a comment in another DIAGNOSTIC
panic.
1998-03-18 19:21:50 +00:00
thorpej 06b49b8f3e Change a couple of assert()s to DIAGNOSTIC panics. 1998-03-18 19:12:57 +00:00
thorpej 438599b408 Correct a comment in pmap_bootstrap(). 1998-03-18 19:04:42 +00:00
thorpej 56e004c995 Pass the max ASN from the HWRPB to pmap_boostrap(). 1998-03-18 19:02:49 +00:00
thorpej 426d2953f5 Add a macro to test if PG_ASM (Address Space Match) is set in a PTE. 1998-03-18 19:00:15 +00:00
bouyer 9f50fca1fd Add commented out "options FFS_EI" 1998-03-18 16:34:41 +00:00
thorpej 9c1e8fc2ed Implement the PMAP_NEW interface for UVM. 1998-03-17 05:15:24 +00:00
thorpej 1477f77353 Properly depend on the PMAP_NEW option. 1998-03-17 05:00:18 +00:00
thorpej 6bbfd3e9ff Use pmap_kenter_pa() in _bus_dmamem_map() if PMAP_NEW. 1998-03-17 04:59:36 +00:00
thorpej f8cff5ab23 Add a software PTE bit that indicates that a va -> pa mapping was entered
in the physical->virtual list.
1998-03-17 04:53:43 +00:00
thorpej 00452b441f Move PTE-related constants here, and make them not depend on a hard-coded
page size (i.e. use the one initialized from the HWRPB at boot time).

Do a bit of cleanup while here, rendering old inherited constants obsolete.
1998-03-12 07:29:21 +00:00
thorpej 4d8723232d Garbage-collect a bunch of constants that were inherited, but are no
longer necessary or make sense.
1998-03-12 07:28:07 +00:00
thorpej bd3c0e36cf Garbage-collect this a bit. 1998-03-12 06:47:11 +00:00
thorpej 00a597fe92 Use vm_page_alloc1() and vm_page_free1() as appropriate. 1998-03-12 06:27:36 +00:00
thorpej 1f8d640c4b Bump maxusers to 64. 1998-03-12 06:04:47 +00:00
thorpej 6e6e2d7ebf Dump maxusers to 32. 1998-03-12 06:04:31 +00:00
thorpej d9a1f8ba36 Adjust the default and low-bound maxusers, now that the pmap can deal. 1998-03-12 06:04:14 +00:00
thorpej dfe0937a7e If not DEBUG, use the Virtual Page Table to get the PTE for kernel mappings
in pmap_enter() and pmap_emulate_reference().
1998-03-12 02:59:22 +00:00
thorpej 30766180a3 Nuke these; they are long-since obsolete. 1998-03-12 01:28:01 +00:00
thorpej 152a4bfa60 Increase the maximum userspace address to 4TB. Leave the stack at 8G
for now, but make a note that we might want to move it down to 4G later.
1998-03-12 01:25:52 +00:00
thorpej e046925c3a Massive cleanup and partial rewrite of the NetBSD/alpha pmap module.
Major change is that page table page management has been completely
rewritten.  Page tables are now accessed via K0SEG (no more KVA space
wasted on user page tables), and a much larger user address space is
supported.

Many thanks to Chris Demetriou and Ross Harvey for helpful insight and
debugging assistance.
1998-03-12 01:24:52 +00:00
thorpej 900e1c90bd Nuke ALPHA_STSIZE and ALPHA_MAX_PTSIZE. Add macros to compute and operate
on segments mapped by L1 and L2 PTEs.
1998-03-12 01:21:21 +00:00
thorpej 7225aae835 Move check for user-pmap-still-using-Lev1map from pmap_enter_ptpage()
to pmap_enter().
1998-03-09 22:31:23 +00:00
thorpej daa9cfae50 Don't do the Segtabzero-for-dev-zero hack. 1998-03-09 20:43:28 +00:00
thorpej e456fc0538 Simplify/speed up pagemove() somewhat by using the Virtual Page Table. 1998-03-09 20:17:03 +00:00
thorpej 78a173bada Define VPT_INDEX(), which computes the index into the Virtual Page Table
of the PTE that maps the specified virtual address.

Thanks to Chris Demetriou and Ross Harvey for clarifying the VPT.
1998-03-09 19:57:57 +00:00
thorpej b3d7fd8f3f Just use vtophys() to get the PCB phys addr. 1998-03-07 04:20:45 +00:00
thorpej 9c236919e9 Rewrite pmap_extract(), and use it as appropriate in vtophys() rather
than (almost) duplicating the code.
1998-03-07 03:37:02 +00:00
thorpej cd7d081d02 Export a pointer to the Virtual Page Table. 1998-03-07 03:15:43 +00:00
thorpej f7d64ef778 Clean up a comment. 1998-03-07 03:15:06 +00:00
thorpej f55b280ffc Clean this up a bit. 1998-03-07 01:44:08 +00:00
thorpej dcbc04e7af Rename Sysptmap and Sysmap to Lev2map and Lev3map, respectively, and
add some comments describing in better detail what they are and how they
are used.
1998-03-07 01:43:54 +00:00
thorpej 60e6d2e48f Update a comment in pagemove(). 1998-03-07 01:26:04 +00:00
thorpej ff155df72a Nuke kvtopte(). Also, change pagemove() to lookup the from and to PTEs
in each iteration of the loop, since PT pages may not necessarily be
contiguous.
1998-03-07 01:11:39 +00:00
thorpej 60d30d3838 Nuke kvtopte() and ptetokv(). 1998-03-07 01:10:05 +00:00
thorpej 58a7bd9288 Nuke the vatopa() macro. 1998-03-07 00:42:07 +00:00
thorpej 059d0c72de pmap_ste() -> pmap_l2pte(), pmap_pte() -> pmap_l3pte() 1998-03-06 23:41:01 +00:00
thorpej 8081bd3017 Move pmap_pte*() macros into the header file, nuke pmap_ste_v(), add
pmap_lev1pte().
1998-03-06 23:19:26 +00:00
thorpej 53e3bf87b9 Fix think'o in last kcopy() change. 1998-03-05 02:10:57 +00:00
thorpej a2db880e8c In kcopy(), make sure we save and restore the old fault handler; kcopy()
is called from uiomove(), which may be in the code path of servicing
a non-fatal page fault caused by a copyin() or copyout().
1998-03-04 02:11:58 +00:00
cgd 09dbd9234d fix typo in last commit (noticed on inspection) 1998-03-02 21:36:55 +00:00
cgd 7ff7b02fac allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf 1998-03-02 20:01:05 +00:00
cgd 9da165424c allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf 1998-03-02 19:57:00 +00:00
ross 03169f0089 Second part of cdev_decl() migration. Declare cputype variable.
Add config info for a12 switch driver and console driver.
1998-03-02 08:04:04 +00:00
ross 41a61f7c9e Update interrupt name table for a12 crossbar. 1998-03-02 07:47:52 +00:00
ross b8d5ca6c78 Centralize cdev_decl() for these MI drivers + a12dc in machine/conf.h (cgd)
(This does not introduce any config or option dependencies.)
1998-03-02 07:44:18 +00:00
ross ff94450f84 Use the more consistent register field names & add ctags(1) keys. 1998-03-02 07:07:41 +00:00
ross 6e6f663204 Rewrite of interrupt dispatch logic. Add ctags(1) keys for *a12*.h files. 1998-03-02 07:03:20 +00:00
ross 13aeff8570 Fix attachment message. 1998-03-02 06:59:38 +00:00
ross 1ada245647 Support attachment of xb and a12dc, define most of the remaining
core logic register fields.
1998-03-02 06:56:16 +00:00
ross 469f9b6126 Clean up attachment code and prototypes. 1998-03-02 06:53:34 +00:00
thorpej 7a571c643b Rename a few macros to better describe what they are:
- kvtol1pte() -> l1pte_index()
- vatoste() -> l2pte_index()
- vatopte() -> l3pte_index()
1998-03-02 00:49:01 +00:00
thorpej 54bb4f9e6e Rewrite pmap_enter() to have a more sane structure, useful for when
page table page management is rewritten.
1998-03-02 00:22:54 +00:00
ross 4ebd177543 Remove the A12 from the rogue's gallery of the promcons-addicted. 1998-03-01 08:17:36 +00:00
ross 39254d4d4b Poll console at 50 Hz, not 1024 Hz! (4 tlb and imb coherency ops per poll
make this exceedingly expensive even on an alpha)  Note: only 3 systypes
still use promcons.
1998-03-01 07:40:11 +00:00
ross 2170c2a46d Force elf symbol sections to an addressable boundary. 1998-02-28 10:38:55 +00:00
cgd 18a1481f7a Use NFS_BOOT_DHCP rather than NFS_BOOT_BOOTP. The former is more
flexible, and the boot blocks use DHCP already(!!!) and it'd be good
for the kernel to be consistent with them.
1998-02-28 02:01:32 +00:00
thorpej ba3ddd48ad Move the code that enters and removes entries from the pv_table into
functions pmap_enter_pv() and pmap_remove_pv().
1998-02-28 01:07:05 +00:00
thorpej 9bbe89ea3f Garbage-collect the kpt_page stuff; it was basically unused in this
pmap, and isn't applicable to how dynamically allocated kernel page
tables will work on the Alpha.
1998-02-27 22:25:25 +00:00
thorpej faf1155de5 Revamp pv_table management:
- Make pv_table an array of struct pv_head's, which contain LIST_HEADs
  for the pv_entry's, as well as page attributes (mod, ref, ptpage).
- Use <sys/queue.h> to manipulate pv_entry lists.
- Fix several obvious bugs in pmap_collect_pv().
- Use K0SEG to access pv_page's.
1998-02-27 19:39:03 +00:00
thorpej f17bbcfffa Changes necessitated by the fact that all pmaps have their own level 1
page tables: use curpcb to determine which level 1 map defines the
current VM context, and use that level 1 map when mapping and unmapping
the PROM.
1998-02-27 04:03:00 +00:00
thorpej c4e7c88520 Step 1 of the Grand Alpha Pmap Rototill:
- Clean up pmap_bootstrap() some, and make a slight change to how the
  PROM mappings are saved.
- Give each pmap its own level 1 page table, rather than sharing a global
  level 1 page table.  This will eventually allow for Very Large user
  address spaces.
- Keep a list of all pmaps, so that when kernel level 2 page tables are
  allocated, all level 1 tables may be updated.
- Add a couple of functions for allocating and freeing page table pages.
- Add a few comments about ASN allocation.
1998-02-27 03:59:58 +00:00
thorpej 5d56ce57ba Several changes related to all pmaps having their own level 1
page table:
- Update the current hwpcb pointer in the SWITCH_CONTEXT macro, so that
  we know it's always correct.
- Optimize cpu_switch(): if we're switching to ourselves, skip the
  actual context swap.
- Clean up some comments and remove some code rendered obsolete by
  the fact that address spaces are now selected by switching to a
  new level 1 page table.
1998-02-27 03:53:49 +00:00
thorpej cb6972d4d3 Implement alpha_pal_swpctx(). 1998-02-27 03:44:53 +00:00
perry 1ed8ea9966 note second parm of sysarch() is now void *, + trivial KNF, etc. 1998-02-25 21:41:55 +00:00
thorpej 58509e699f Add support for UVM. 1998-02-24 07:38:01 +00:00
thorpej 772da350d4 Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
1998-02-19 04:18:30 +00:00
mycroft 3b9429b248 Minor changes to make all the float.h files match. 1998-02-18 11:01:27 +00:00
cgd f19c0ee648 nuke pmap_map(). it's an internal MD function, and it's unused 1998-02-18 01:44:32 +00:00
thorpej 8354e68508 Remove "class" declarations, and add "devclass" declarations where
appropriate.  Fix several inconsistencies between device class and
attributes.  Mostly from Chris Demetriou.
1998-02-16 22:12:45 +00:00
thorpej b4e77b173a Add support for non-contiguous physical memory, using MACHINE_NEW_NONCONTIG.
These changes also recover memory that is located before the kernel in
the first system software segment on systems which do not use the PROM
for console I/O.  Written by Chris Demetriou and myself.
1998-02-16 03:59:55 +00:00
cgd 1584dc4420 The pmap_emulate_reference warning about the page not being managed should
be a panic instead.  If it's hit, "random" memory is going to be corrupted.
1998-02-14 02:04:05 +00:00
cgd 1538076f47 fix pasto in last (sigh) 1998-02-14 01:18:46 +00:00
cgd ab67040f58 fix for (harmless) bogon introduced in last commit 1998-02-14 01:17:19 +00:00
cgd e719e8f703 adjust kernel core dump code for changes in kcore.h, also clean up
slightly.
1998-02-14 00:53:26 +00:00
cgd 69d88fbfd6 replace the single phys_ram_seg_t with a count. an array of segment
descriptors will be placed after this structure in the core file.
1998-02-14 00:17:57 +00:00
enami 2c12105cda Remove comment which says that fxp is untested (it is known to work now).
Also, make model name closer to what driver prints startup.
1998-02-13 04:33:30 +00:00
cgd 25d056473c Clean up kernel initialization. Use the bootinfo structure (or innate
knowledge) earlier, and gather all information needed earlier.  Mark the
init code carefully re: when it can print stuff out, when it can expect
the firmware to stop working, etc.  Be more careful about using the PROM
console and other PROM facilities, and hint that in the future all use
of firmware/boot program callbacks by the kernel should go away (since
the world may not be mapped the way the firmware/boot program wants!).
1998-02-13 02:09:03 +00:00
thorpej b22ad9fe1a Define a lookup table for Alpha platform variation names. 1998-02-13 01:29:09 +00:00
thorpej bdc328cb13 Use the platform family name in alpha_unknown_sysname(). 1998-02-13 00:27:37 +00:00
thorpej bd60d9c62d Rewrite the way the platform model string is determined:
- Attempt to find the model string in the HWRPB's DSR area.  Failing that
  (if the HWRPB version is too old)...
- Look up the system variation in a variation/string table.  Failing that
  (unknown variation)...
- Create a default model string using the variation number.

Also, factor out a bunch of common code.
1998-02-13 00:12:45 +00:00
thorpej 44df600994 Define the structure of the HWRPB's Dynamic System Recognition area. 1998-02-13 00:07:25 +00:00
thorpej 7fbc685c06 Make it a little more clear that the "eb164" systype doens't necessarily
mean that a machine is a DEC EB164 (it may be an AlphaPC 164, which is
different, from the firmware's perspective).
1998-02-12 20:46:47 +00:00
thorpej 314f40f8d8 We can't count on the CIA revision register telling us if we're a 21171
or 21172, so make the chip/revsion output a little more sane.
1998-02-12 20:43:45 +00:00
cgd 5a1a26d325 set 'hwrpb' in a way that works exactly the same way as the previous
code, but looks significantly less gross.
1998-02-12 02:54:02 +00:00
cgd c7ba12ab93 rename struct rob's "rpb" element to "rpb_phys" for clarity. also,
change its type from a pointer to a never-defined structure to a
u_int64_t.
1998-02-12 02:27:48 +00:00
cgd 92d17b5b50 clean up the way bootinfo information is passed and used: move the version
number passed by the boot block into a register, change the kernel's
bootinfo handing so that it always uses bootinfo to get bootinfo-ish values
(filling them in if the boot blocks didn't pass them), and make versioning
a small bit more sane.
1998-02-12 01:53:18 +00:00
thorpej c26f962957 Use kernel_map in bus_dmamem_{map,free}(). 1998-02-11 03:08:31 +00:00
thorpej 30aa56fc66 Use M_DMAMAP where appropriate. 1998-02-11 01:37:51 +00:00
cgd e21b7a5995 leave space for bootstrap stack when calculating kernstart 1998-02-11 00:05:33 +00:00
thorpej 1951c4b19b Bump KNMEMCLUSTERS slightly, and make it more obvious how to tune it
(lifted from i386 port).
1998-02-10 03:53:01 +00:00
thorpej 68d3b764ce Make it easier to keep the scaled VM_*_SIZE values in sync w/ the
constants.
1998-02-10 03:52:05 +00:00
thorpej 5887833ac7 Kernel for babylon.netbsd.org. 1998-02-10 00:48:14 +00:00
thorpej 8e69ee392a Fixup includes. 1998-02-04 23:41:45 +00:00
thorpej 612aea038c Use the common _bus_dmamap_sync() as the _dmamap_sync method in the
bus_dma_tag_t.
1998-02-04 07:37:28 +00:00
thorpej 1a2b1a18f2 The _dmamap_sync method is no longer optional. 1998-02-04 07:36:10 +00:00
thorpej b1d8bffad8 Flush the CPU write buffer in _bus_dmamap_sync(). 1998-02-04 07:35:30 +00:00
thorpej 8abe76d2f0 Add offset and length parameters to bus_dmamap_sync(), used for specifiying
partial syncs of a DMA mapping.
1998-02-04 05:12:46 +00:00
thorpej 99cc8482d1 Change the last argument of bus_dmamap_sync() from bus_dmasync_op_t to int,
and allow more than one synchronization operation to be specified in
a single call.  Dissallow mixing of PRE and POST operations.
1998-02-04 01:57:27 +00:00
thorpej 2d403996b2 Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC to
BUS_DMA_COHERENT.
1998-02-04 00:10:30 +00:00
thorpej 5fd0d10994 Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC toBUS_DMA_COHERENT. 1998-02-04 00:04:25 +00:00
mycroft b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
thorpej cfa47dfc11 Add support for installing boot blocks into ISO-9660 file system images. 1998-02-01 06:59:30 +00:00
thorpej fea34a1cf2 Bump the ramdisk size to 3M. 1998-02-01 02:55:42 +00:00
thorpej 4efe4fc0da le* at isa? isn't ready for prime-time yet. 1998-02-01 00:24:26 +00:00
ross d0cce6d144 Take Jason's most excellent advice on platform.model. 1998-01-31 10:55:42 +00:00
ross 1e62e0ffd9 Remove the #include of rpb.h from clock.c and set hz from the hwrpb
in alpha_init() instead of from a hardwired 1024 in cpu_initclocks().
1998-01-31 10:32:47 +00:00
cgd 58fb6574f9 valloclim() was unused; kill it. #undef valloc() at the end of
allocsys().
1998-01-31 02:20:44 +00:00
ross 6270ed1711 Add the A12 fast ethernet controller, an if_de.c hacked (prior to
bus_dma's appearance in the tree) to support sram bounce buffers.
When a busified if_de.c appears, this module can join awd.c at the
end of that long walk on a short pier.
1998-01-31 01:43:40 +00:00
ross 3a83745247 In some hp300-derived pmaps, in pmap_page_protect(), don't walk off the
end of the list of physical->virtual entires into NULL space if the last
entry is (mysteriously) wired in the pmap. Add a DEBUG printf on alpha.
1998-01-31 01:32:55 +00:00
ross 1559f49cd1 Correct a number of apparent errors in a few reboot paramemter block fields. 1998-01-29 22:28:52 +00:00
ross ccafd3dcb9 Define the A12 names. 1998-01-29 22:26:24 +00:00
ross f2d2b6bf68 defopt for AVALON_A12 and specifiers for all the platform modules. 1998-01-29 22:23:06 +00:00
ross 18beceb2f9 Recognize Avalon A12 cputype code. 1998-01-29 22:20:15 +00:00
ross 43a3471986 While here in alpha/stand, add a technically required imb coherency op
just before transferring to the kernel entry point.
1998-01-29 22:13:25 +00:00
ross c1972a428c Avoid VMS palcode ops by using a different technique for cpu_number(),
and don't execute the VMS->OSF palcode switch if the OSF palcode
is already running...which will be the case if the console is not
the venerable SRM.
1998-01-29 22:09:37 +00:00
ross 8430acf1e7 Add a12 platform support. The A12 is a scalable, distributed memory parallel
processor.
1998-01-29 21:46:33 +00:00
ross 12f93343cd Add basic platform support for NetBSD on the Avalon A12. I'm running this
CVS commit on one right now...
1998-01-29 21:42:50 +00:00
ross 683fada0e3 Clean up duplicated code sequences and add an imb (a coherency operation)
whenever the console code is mapped and unmapped.
1998-01-29 21:11:58 +00:00
ross 0c4d28f49e Fix an alpha-specific page daemon wedge...the new pmap_clear_reference()
may be faster, but it was supposed to _clear_ PMAP_ATTR_REF, not _set_ it.
1998-01-29 05:44:57 +00:00
thorpej 2538ed1062 Use offsetof() from libkern.h 1998-01-28 02:23:04 +00:00
thorpej 5ac7e550d1 Implement bus_dmamap_load_mbuf(). 1998-01-27 02:35:58 +00:00
mycroft 15ae963bea When dumping, print out the device number as major,minor. 1998-01-24 16:46:23 +00:00
thorpej cacd48c0d6 Print the correct error number if nfs_mount() fails. From Chris Demetriou. 1998-01-23 19:13:28 +00:00
thorpej 9c3ef8899b Don't conditionally define the sgmap_log_entry structure, and turn off
SGMAP logging by default.
1998-01-21 22:36:10 +00:00
thorpej 3d9cd8a05a Extent names are const. 1998-01-21 22:34:38 +00:00
thorpej 12809e3434 If mapping only one segment of DMA memory into KVA space, use K0SEG. 1998-01-19 03:12:20 +00:00
thorpej c6d1f2e018 G/c LANCE DMA allocation goop. 1998-01-19 02:57:28 +00:00
thorpej e5e8573d5c Allocate the LANCE DMA area and set it up here. This is still not
optimal (really should be done further down the food chain), but we
can't really do that in a nice way right now, and this is much better
than what we had before (which was to steal memory pages before the
VM system was bootstrapped).
1998-01-19 02:56:05 +00:00
thorpej bf92ae27ef Pass a pointer to the "get this slot's DMA tag" function pointer to
the tc instance just like we do with the interrupt functions.
1998-01-19 02:54:24 +00:00
thorpej 806e953f2c Get the per-slot DMA tag a bit differently. 1998-01-19 02:53:29 +00:00
thorpej 70da5cdba9 G/c an unused function pointer. 1998-01-19 02:53:03 +00:00
drochner 32d94859ea adapt to changed <dev/ic/i8042reg.h> 1998-01-18 14:45:10 +00:00
thorpej e62d894d7a Implement a prefetch spill page for SGMAP DMA. This works around a slight
annoyance on systems that prefetch the next page during memory -> device
DMA if the DMA comes within a certain distance of the end of the current
page.  This could cause machine checks since the PTE after the last page
would not have the valid bit set.

(I'm not going to complain about this slight kludge too much, since prefetch
makes DMA much faster...)
1998-01-18 00:05:33 +00:00
thorpej 8df306036a Initialize s/g DMA registers in the same order as the CIA chipset's:
(1) window base
	(2) window mask
	(3) translation base
1998-01-17 22:46:55 +00:00
thorpej 3366b987d0 Put SGMAP-related stuff in the DMA map structure directly, rather than
indirecting through a pointer.
1998-01-17 21:53:52 +00:00
thorpej 63db8935a6 Fix initialization of DMA window 0:
- Make sure the page table is aligned to at least 32k.
- Don't consider the MEMCS signal when checking for a window hit.
1998-01-17 03:43:59 +00:00
thorpej 9554b5a243 Update for "minptalign" argument to alpha_sgmap_init(). 1998-01-17 03:40:32 +00:00
thorpej 399f3639cf Don't assume that we'll be using direct-mapped DMA for PCI. 1998-01-17 03:39:51 +00:00
thorpej 361179df26 Make debugging decisions at run-time, and place a handy DDB breakpoint
after a transfer has been mapped in the page table.
1998-01-17 03:38:51 +00:00
thorpej 2981fec2f0 Allow specification of a minimum page table alignment to alpha_sgmap_init().
This is to work around an apparent hardware bug in some 2117x chipsets
where the page table must be aligned to at least 32k.
1998-01-17 03:37:22 +00:00
thorpej 6254765e6a Make this compile again after recent config changes. 1998-01-15 22:22:09 +00:00
thorpej 86adfd8033 Switch to MI IDE drivers, add ATAPI devices. 1998-01-15 07:17:19 +00:00
thorpej c60855e116 Switch to the MI IDE drivers. 1998-01-15 07:09:24 +00:00
thorpej f127dfb6f0 Undo the wdc -> awdc mapping kludge. 1998-01-15 07:02:21 +00:00
thorpej 76e4297b91 No longer needed; we use the MI IDE driver now. 1998-01-15 07:01:51 +00:00
cjs 61826c3946 Make INSTALL a fully-loaded kernel (for booting from network or CD), and
INSTALL-FLOPPY a stripped-down version to fit on a floppy.
1998-01-13 23:49:31 +00:00
thorpej 5419debcb7 Adjust for config changes. 1998-01-12 10:21:02 +00:00
thorpej c5f6a2dbb3 Add (commented out) COMPAT_13 1998-01-12 07:09:24 +00:00
thorpej 83c4c24058 Add "non-volatile" memory cluster usage bit. 1998-01-12 07:07:19 +00:00
perry 6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
thorpej 1256fac296 Rearrange alpha_init() somewhat, setting the page size much earlier, and
keeping track of where the kernel lives in K0SEG.  Place early data
structure allocation into an allocsys() function, like other ports, so
that it can be used to first calculate the amount of memory needed
for those data structures.
1998-01-09 21:34:47 +00:00
thorpej bb4988dca2 If MACHINE_NEW_NONCONTIG is defined, activate the pmap_steal_memory()
interface.
1998-01-09 19:13:09 +00:00
drochner 9c3e23d351 Compile in BOOTP support for diskless boot. 1998-01-09 17:10:16 +00:00
drochner 874db3d0e0 Selection of network configuration method for diskless boot can be
controlled by config options now. Remove setting of nfs_boot_rfc951,
it is set by default if "option NFS_BOOT_BOOTP" is defined.
1998-01-09 17:06:35 +00:00
thorpej e47378c640 - pmap_collect_pv() is broken; #ifdef it out (it's not currently ever
called anyway, but now at least the reason is documented).
- rearrange a few things to make it easier to add support for non-contigous
  physical memory.
1998-01-09 08:27:09 +00:00
thorpej b115c27722 Get rid of some old cruft. 1998-01-09 08:18:22 +00:00
thorpej 5170264d4e Gather pv_table and pmap_attributes things togther, and macro'ize
access to them a little better.

Also, improve the performance of pmap_is_{referenced,modified}() and
pmap_clear_{reference,modify}() somewhat.
1998-01-09 06:54:17 +00:00
thorpej 14807c2914 Use avail_start/avail_end. 1998-01-09 06:37:04 +00:00
thorpej f9b6954f55 Call vm_set_page_size() after initializing PAGE_SIZE. 1998-01-09 06:35:17 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
perry 3e0fad1868 RCSID Police. 1998-01-05 06:28:44 +00:00
thorpej b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
thorpej 8b5e0b6e06 Remove a couple of unneeded VM-related headers. 1997-12-31 19:32:55 +00:00
cjs 89951259ed Add kernfs; remove more stuff we don't need. 1997-12-31 16:44:37 +00:00
mjacob feb6e077d4 do not incread vm_kmem_size that radically for 1GB or better machines 1997-12-16 21:59:41 +00:00
mjacob b52361ff54 add missing COMPAT_13 that kleink putzed 1997-11-30 23:18:59 +00:00
mjacob 549ecbd70a make SCSIVERBOSE default 1997-11-26 03:13:53 +00:00
mjacob 61f3754047 add SYSVMSG and SYSVSEM to GENERIC kernel 1997-11-26 03:13:12 +00:00
kleink 66c2794142 Add _BSD_SUSECONDS_T_ and _BSD_USECONDS_T_; do some space vs. tab formatting
cleanup
1997-11-23 20:20:53 +00:00
mjacob 261191603a copyright foo 1997-11-19 15:35:36 +00:00
lukem 6c986561ee * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
1997-11-17 01:57:23 +00:00
ross 711247adf8 Eliminate %: use from alpha/trap.c; the policy is to get rid of these
anyway. I _still_ have my doubts about the kprintf %: code, though.
1997-11-17 00:52:49 +00:00
ross 9dcfc52387 Put in Jason's recommended fix for the null-curproc-in-pmap.old.c problem. 1997-11-17 00:11:22 +00:00
mjacob 940f8fcfd1 remove unneeded and conflicting prototype 1997-11-13 18:06:01 +00:00
thorpej ce4c770f88 Make sure CPP, AR, AS, and RANLIB are defined. 1997-11-12 23:11:50 +00:00
thorpej a421995756 Define LORDER, NM, and TSORT here, like we do the rest of the tools. 1997-11-12 22:25:31 +00:00
mjacob 479bc8877c Protect userland applications from the inline splraise function. 1997-11-10 18:23:50 +00:00
thorpej e22396f499 Clean up the messages displayed when either platform support is not
configured into the kernel, or when the platform is not supported.
Use the defopt'ed options, rather than NDEC_... and remove the needs-flag
hack that's existed for a while.
1997-11-06 00:41:45 +00:00
thorpej 4730a8cbec Bug fixes and cleanup from Chris Demetriou <cgd@pa.dec.com>:
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
  supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
  by the way it's used).

The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.)  The __indr_reference
change was made for consistency.
1997-11-04 23:09:23 +00:00
ross 6f6bb84844 Check for null curproc in pmap_changebit. Fixes the IDE-on-alpha crash
problem reported by Chris Csanady <ccsanady@bob.scl.ameslab.gov>.
this
1997-11-04 07:16:25 +00:00
ross 0ea4820367 --Add handcrafted stack frame directives to locore.s palcode vector
--entries / remove kernel entry from locore / reorganize vector entry
--code. Enables access to stack frames transitively w.r.t. palcode
--vectors, e.g. upward traceback works, inverting (possibly several)
--kernel vectors. Until now, all trackbacks ended at the first-reached
--instance of trap(), which was totally useless as there is no mystery
--to trap->panic->cpu_reboot
1997-11-03 04:22:00 +00:00
lukem 3e8e744696 getopt returns -1 not EOF 1997-11-01 06:49:14 +00:00
thorpej 32146049fa Don't forget to account for scrollskip when computing the current row. 1997-10-27 01:37:33 +00:00
thorpej 023044a749 Clean up printing of chipset revision/capabilities. 1997-10-27 01:08:42 +00:00
thorpej 611012d836 Make the copy_region methods do overlapping copies properly. Fixes
port-alpha/4216 (Chris Demetriou).
1997-10-25 01:21:57 +00:00
thorpej 19c77efe96 In vga_erasecols(), fix botched count and reversed arguments to
bus_space_set_region_2().  From Chris Demetriou <cgd@pa.dec.com>.
1997-10-24 23:03:02 +00:00