Commit Graph

401 Commits

Author SHA1 Message Date
eeh
7e8421fa5b Also attach apropriate devices named "serial". 2001-07-19 23:55:50 +00:00
wiz
cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
eeh
55e676fb15 Remove another unused file. 2001-06-25 23:07:03 +00:00
eeh
47b3df529a Remove unused file. 2001-06-25 21:28:03 +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
mrg
46762d3560 fix lint exposed by GCC 3.0 20010604 (prerelease). 2001-06-04 20:56:51 +00:00
lukem
d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
chs
11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
mrg
2f3c8dae5a correct some comments. <80 char debug statements. 2001-05-18 22:01:57 +00:00
mrg
f42ff7ccae minor cleanups. 2001-05-18 22:01:19 +00:00
mrg
a9f7a4e194 move the sbus IOMMU work around into the sbus code, so that the psycho
doesn't have to lose a page.
2001-05-18 21:35:23 +00:00
mrg
0996d006da do not force ebus interrupts to have bit 0x20 set. 2001-05-18 19:17:50 +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
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
mrg
af58b235e0 adapt to systems with out interrupt-map & interrupt-map-mask properties. 2001-03-21 01:33:47 +00:00
hubertf
cda43785c6 Add comment on what 'overtemp' is about. OK'd by eeh. 2001-03-16 10:47:25 +00:00
eeh
b612a766a7 Handle overtemp intr. 2001-03-14 00:52:19 +00:00
thorpej
85868e3c09 Pay attention to BUS_DMA_STREAMING when builing an IOMMU TTE. 2001-03-09 20:05:39 +00:00
mrg
f1d2503dc5 rework pci_attach_hook() to just deal with the INO, not the full
interrupt number.  properly find interrupts for the E250.  modify
pci_intr_map() accordingly.  retire psycho_intr_map().  deal with
INO values upto 0x3f, not upto 0x32.  restructure sabre_init() and
psycho_init() to be more similar, and display each psycho's IGN.
psycho_intr_establish() deals with INO upto 0x3f, values from 0x32
and higher get 0 for IPL.

tested on E250 & U5.
2001-03-06 08:09:16 +00:00
mrg
7a1cb1dbc2 use pci_bus_devorder() and pci_dev_funcorder() 2001-03-02 06:34:06 +00:00
mrg
c452d0b725 adjust some comments to reality. 2001-02-28 15:21:08 +00:00
eeh
85cffb544d Improve legibility and iommu_dvmamap_sync(). 2001-02-24 18:49:06 +00:00
eeh
3daccde8d4 Print out more useful data if there are interrupt issues. 2001-02-11 00:02:58 +00:00
eeh
2411eab448 Fix D$ aliasing issues in a DIAGNOSTIC check. 2001-02-06 19:04:57 +00:00
martin
a7206004fc Faster error handling for iommu_dmamap_load_raw; avoid loading the map
and unloading on error when we clearly can't get out without an error.
2001-01-28 01:26:57 +00:00
eeh
6c3bf28ffd Fix dvma problem caused by previous. Seems like the dvma segment calculation
in iommu_dmamap_unload() was not quite right.
2001-01-27 03:40:39 +00:00
martin
f4eec8f31f iommu_dvmamap_load_raw: add a check for creating maps larger than
expected by the creator of the dma map and fail apropriately. This
makes the syssrc/dev/pci/if_vr.c driver work.
2001-01-25 21:41:10 +00:00
martin
97b57e69cc Make bus_dmamap_load_mbuf and bus_dmamap_load_uio use independend
segment lists for their mapping; make iommu_dmamap_unload deal with
this type of maps.

Coded by Eduardo, tested (and minimaly tweaked) by me.
2001-01-23 20:31:28 +00:00
martin
84af4fa114 Enable IO space mapping by default.
Fixes PR 11940.
2001-01-19 21:25:19 +00:00
martin
6695531e85 Fix format warnings to make it compile again. 2001-01-14 09:43:33 +00:00
pk
301b806db0 ebus_find_node(): plug memory leak; make debug output meaningfuller. 2001-01-08 22:15:47 +00:00
sommerfeld
851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
mrg
43251365b4 com_attach_subr() prints the newline for us. 2000-12-20 16:19:09 +00:00
mrg
703ec39a02 fix warnings in DEBUG & DIAGNSTIC code. 2000-12-06 01:47:49 +00:00
fvdl
95ed1f82c4 Make gcc like a cast. 2000-12-04 20:29:34 +00:00
fvdl
2ccdc61f62 Avoid (safe) cast warnings. 2000-12-04 20:19:49 +00:00
fvdl
2fb588e51d Warning police. Mostly useless format warnings. Switch Makefile for
kernel compiles to the warning flags that other ports also use.
2000-12-04 16:01:18 +00:00
fvdl
a21f36eeb2 Make softintr_establish prototype match other ports, avoiding compile
warnings.
2000-12-03 14:49:50 +00:00
mrg
0485f611f1 remove dead debugging code. 2000-11-18 03:49:38 +00:00
eeh
efaf3dbb74 Remove unnecessary header file that causes linker issues. 2000-11-10 17:47:55 +00:00
mrg
3ea4c67b6b remove unused variable 2000-11-10 11:57:26 +00:00
eeh
17b69d1833 Attach the sunkbd line discipline to zstty. 2000-11-09 00:02:54 +00:00
eeh
052afce2a5 Use new MI console magic framework. 2000-11-08 23:40:31 +00:00
eeh
2b8da88d55 Remove debug printfs. 2000-11-08 23:24:12 +00:00
eeh
23a0c49039 Adapt to the new line discipline scheme. 2000-11-02 00:21:03 +00:00
eeh
b19423f823 Pass along bus frequency. 2000-11-01 06:19:59 +00:00
mrg
82d7f3e331 #include <machine/sparc64.h> for prom_printf() prototype. 2000-10-20 05:32:35 +00:00
mrg
f39b5cf92e wrap long lines. 2000-10-19 12:25:04 +00:00
mrg
d66f9f3321 add a cast to fix a warning. 2000-10-19 05:38:35 +00:00
eeh
3a2599ebec Don't take ref/mod faults on DMA segments mapped in to the kernel. 2000-09-28 15:28:43 +00:00
eeh
a5a8082482 Use prom_printf() for debugging instead of printf() since the console may
not be functional.
2000-09-28 15:23:06 +00:00
eeh
805ffd07cc Sun Keyboard/Mouse line discipline support. 2000-09-21 23:14:40 +00:00
eeh
ac3f296768 Guts of the Sun Keyboard/Mouse line disciplines.
N.B. They don't recognize L1-A yet.
2000-09-21 22:25:08 +00:00
eeh
a0f2ab32f7 Make 64-bit clean. 2000-08-26 16:02:06 +00:00
nathanw
5127aa189d In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
2000-08-24 20:04:28 +00:00
pk
194a6c2d97 remove pfourreg.h. 2000-08-23 12:08:16 +00:00
pk
408d2f01d0 Brooktree DAC support now lives in sys/dev/sun. 2000-08-23 10:08:48 +00:00
pk
837ef2bae6 This driver is now in sys/dev/sbus. 2000-08-23 10:07:46 +00:00
pk
aa81eb0f8b This file is now in sys/dev/sun. 2000-08-23 10:07:25 +00:00
pk
c85ada8053 These drivers are now in sys/dev/sun 2000-08-23 10:05:46 +00:00
pk
317a570728 These devices will never be found on sun4u machines. 2000-08-22 21:43:35 +00:00
eeh
aeb88321db Call the parent bus dvmamap_unload function to clear the cache rather
than do it ourselves.
2000-08-01 00:22:41 +00:00
mrg
a254dae933 ebus sc_is is a pointer now, already. 2000-07-27 14:17:10 +00:00
pk
2079f86890 On-board devices on psycho machines seem to have the `interrupt' property
in the parent bus format (i.e. an INO) rather than being represented as
an PCI interrupt line. Provide a hack to work around this in pci_attach_hook().
2000-07-26 17:46:56 +00:00
pk
34270e85bd Use probeget() in pci_config_read() for the psycho, to avoid bus
faults when probing PCI space.
2000-07-18 11:37:31 +00:00
pk
073e24cd1b Set up register bank sharing bwteen psycho A & B based on matching
physical addresses.  Allocate IOMMU state separately and refer to it
from both psycho_softc's.
2000-07-18 11:35:03 +00:00
pk
9de310aebe Use per-PBM control/status register addresses provided by the PROM.
Print version/implementation info.
2000-07-14 15:13:35 +00:00
pk
04fe9636ba Provide details on the `psy_csr' register. 2000-07-14 15:09:51 +00:00
pk
8258c0e780 Fix padding in struct pci_ctl. 2000-07-14 13:17:12 +00:00
pk
7e8f67ad97 No need to fetch the psycho's own registers as thet are already passed
down from the parent bus.  Also account for the difference in `reg'
properties in psycho vs sabre chips.
2000-07-12 21:49:44 +00:00
pk
f56554a578 If there is no "interrupt-map" property on the ebus node, assume the
child "interrupt" properties are already in a format suitable for
the parent bus.
2000-07-12 21:07:36 +00:00
eeh
f10d7699fc Break into debugger by typing `+++++', 2000-07-10 20:24:23 +00:00
eeh
048f1387db Function signature for bus_intr_establish() changed. 2000-07-10 01:11:14 +00:00
eeh
e5cd515b89 Upgrate interrupt handling:
1) use interrupt vectors for specific zs chips rather than polling
	   all of them.

	2) use softintr_schedule() and schedule it for a particular device
	   rather than poll all devices.
2000-07-09 21:58:43 +00:00
eeh
f43ab74a43 Shuffle around some fields to waste less space on LP64. 2000-07-09 21:55:24 +00:00
pk
406e0f779f Add a `device class' interrupt level argument (from machine/intr.h)
to bus_interrupt_establish().

It's currently only used in sparc64/dev/psycho.c to assign a CPU interrupt
level to devices in PCI slots.
2000-07-09 20:57:41 +00:00
mrg
b91804af6c split up debug flags so i can turn off some of them 2000-07-07 13:10:34 +00:00
mrg
4b21f66d57 work around a bug passing arguments to iommu_dvma_load_raw() 2000-07-07 12:53:29 +00:00
eeh
3f2289a3d7 Handle bus_dma aligment properly. 2000-07-07 02:50:19 +00:00
pk
f6d8b8e963 We want to index the PCI `interrupt clear' registers with the Interrupt
Number Offset.  (this stuff needs a serious cleanup).
2000-07-05 12:11:59 +00:00
eeh
58c36586cd Use the same IPLs as everyone else. 2000-07-03 17:42:37 +00:00
mrg
585f7645bf iommu_dvmamap_load*(), pass an alignment constraint, as well as
EX_BOUNDZERO, to extent_alloc().  this fixes problems with it
(extent_alloc()) returning incorrect values, when the start of
the extent is not aligned as strongly as the requested area..

raw access to ide disks now works.
2000-07-02 14:00:38 +00:00
mrg
4d14e81c0b remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:37:53 +00:00
mrg
2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb
889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
eeh
2e1e35d58e Enable interrupts. 2000-06-24 23:27:23 +00:00
eeh
6c5d2dbbac With these changes the kernel seems almost stable again. 2000-06-24 20:48:36 +00:00
eeh
8e1fd2e3c6 Remove a couple of references to vaddrs.h that slipped through. 2000-06-24 16:51:34 +00:00
eeh
be308420d4 Get rid of vaddrs.h. 2000-06-24 04:20:58 +00:00
eeh
d24721788a Correct calculation of length for dma segments in iommu_dmamap_load(). 2000-06-22 18:18:19 +00:00
eeh
245619bad4 Have separate data and text segments, make text read-only. 2000-06-19 23:30:32 +00:00
eeh
4ffba8be2a Fix uninitialized pointer bug. 2000-06-19 22:29:15 +00:00
mrg
fab0adad15 iommu_flush becomes iommu_strbuf_flush cuz that's what it does. 2000-06-18 07:17:40 +00:00
mrg
b6026e7c35 kill dead code. 2000-06-18 07:12:39 +00:00
mrg
fde87ed5d6 add a (u_long) cast for quietness 2000-06-18 07:10:23 +00:00
mrg
0bd5307bf8 remove an unused variable. 2000-06-18 07:05:09 +00:00
eeh
0146a569d2 Comment describing the IOMMU DVMA address space layout. 2000-06-12 23:19:05 +00:00
eeh
cc29e9b22c ebus_ca needs to specify enough memory to hold an ebus_softc, not a struct device. 2000-06-12 22:36:59 +00:00
mrg
9918c00a61 formatting nit. 2000-06-12 05:27:27 +00:00
eeh
7539c8d1ce Turn on PCI MEM and DMA. 2000-06-08 23:03:17 +00:00
eeh
860feb4e74 Fix ordering of sync operations depending on whether it's PRE- or POST-. 2000-06-08 17:41:46 +00:00
eeh
a273b333a3 Support large (>1 page) DVMA maps so UltraSPARC IIi will work. 2000-06-08 16:17:29 +00:00
eeh
08af61208e Fix DVMA base address calculations. 2000-06-08 15:23:44 +00:00
mrg
ee41ef7a04 ensure an ebus really does exist in ebus_match; fixes spurious attachments with the ebus on a hme pci card. 2000-06-08 06:52:25 +00:00
cgd
cffb580806 Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
2000-06-04 19:14:14 +00:00
eeh
ca743bac9a Use the PCI function code to distinguish simba bus A from bus B instead
of the current hack.
2000-05-24 20:27:52 +00:00
eeh
17c567f9de Oops. Seems like we do need this file to make pcons work. 2000-05-20 14:23:12 +00:00
eeh
424619ca1a Fix the sparc64 console.
Unlike the other Sun machines, UltraSPARCs can have consoles run on different
chips than zs, so we need to support them.  So, here we go:

	Add a new PROM console driver with a major number and everything.
	This is the default driver if nothing else attaches.  It does not
	use the keyboard driver since the PROM translates keystrokes itself.
	(Unfortunately it also swallows L1-A).

	Have the keyboard driver take over the console when it attaches on a
	serial port.  When a serial port detects a keyboard and attaches the
	keyboard driver, it needs to provide a set of consdev vectors.  They
	keyboard driver will use those to send I/O to the keyboard and mouse.
2000-05-19 05:26:16 +00:00
mrg
4bd0bb352b this file has not been used for a long time. 2000-05-19 01:09:21 +00:00
mrg
0cd44feb0e fix if/ifdef mistake 2000-05-17 10:28:14 +00:00
mrg
20bc66f592 - add some psycho interrupt debugging stuff (#if 0'ed out)
- fix arguments passed in psycho_dmamap_load_raw()'s declaration, and
  what it passes to it's parent bus.
2000-05-17 10:17:01 +00:00
mrg
eee5e33e8a - in iommu_remove(), move len adjustment outside if statement, leaving
just one copy of this.
- remove duplicate setting of sgsize in iommu_dvmamap_load().
- fix DIAGNOSTIC check in iommu_dvmamap_load_raw() to panic() in unexpected
  conditions only (not normal ones), and also add an extra case.
2000-05-17 09:53:53 +00:00
mrg
53fa9da4df move zs_attach() to after the setting of the console device, to avoid
having cn_dev being 0 and thus cnopen() being called recursively.  this
fixes this problem for zs-based console's only.
2000-05-17 09:28:22 +00:00
mrg
651712a140 add a note about US IIi and PCI_INTERRUPT_LINE register 2000-05-17 09:25:58 +00:00
mrg
6dad37e26a expand a comment slightly. 2000-05-17 09:25:27 +00:00
eeh
3b90b5c5c4 Add support for bus_dma_load_raw() so the le driver will work again. 2000-05-17 02:31:12 +00:00
thorpej
463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
mrg
0ce52a2a08 implement U2P PCI support in psycho_init. this is completely untested. 2000-05-06 04:15:35 +00:00
mrg
dab52c26ad - add a note about streaming buffers and US IIi not having them.
- make some debugging messages in iommu_remove() saner and add some more.
- decrement 'len' in the no streaming buffer case, also.
- in iommu_dvmamem_map(), do not enter these mappings into the IOMMU,
  only into the CPU (the former is done at _load time).
- make a panic that shouldn't happen a DIAGNOSTIC.
2000-04-25 14:59:38 +00:00
mrg
1013298c2a whole bunch of changes:
- merge IOMMU DVMA code from sbus/psycho into iommu.c.  this code was
  identical and a few minor inconsistencies had crept in.  this way
  keeps them all in sync.
- with this code gone from psycho, merge the psycho.c and psycho_bus.c
  files.  same with ebus/ebus_bus.c.  delete the _bus.c files.
- add a _ds_boundary member to the dma segment structure, so that later
  dma mappings can find this value.
- set _ds_boundary in machdep.c:_bus_dmamem_alloc().
- kill much dead code.
2000-04-22 17:05:59 +00:00
mrg
5aa4575432 - convert to DPRINTF() style debug messages.
- kill dead code.
- use the sbus dv_xname to construct a dvma map map, to pass to
  extent_alloc(), to help support multiple sbusses
2000-04-22 12:36:29 +00:00
pk
e5ab0feccc Have prom_cngetc() wait until input has been typed. 2000-04-19 08:15:06 +00:00
mrg
19a31e7b5e add a newline to this fake autoconfig line. 2000-04-19 02:26:08 +00:00
mrg
2aba26f773 - auxio cleanup and sbus support.
- make GENERIC64 include GENERIC and set the 3 optoins it needs.  suggested
  by hubert feyrer.
- add a comment that we maybe should use the `bpp' driver, not the lpt, on
  the ebus because the `bpp' driver does DMA already.
- ebus_attach_args got a member renamed
2000-04-15 03:08:12 +00:00
mrg
e4ca29ac00 kill dead code 2000-04-15 03:07:38 +00:00
mrg
af6a8541e4 add some casts to (u_long) to shut up gcc. cleanup unused variables 2000-04-14 08:29:03 +00:00
mrg
fd85c1c4a2 avoid a potential memory leak. 2000-04-13 14:39:34 +00:00
mrg
fa13d97855 this does not need auxreg.h 2000-04-13 09:54:43 +00:00
mrg
b60fe7f45a store all the physical address bits. 2000-04-13 09:53:49 +00:00
mrg
e7f3d69787 this does not need auxreg.h 2000-04-13 09:52:46 +00:00
mrg
cb2b15a484 - UltraSPARC IIi does not have streaming buffers; don't try to find it's
diag regsiter to work out why the (non-existant) strbufs don't work.
- check for malloc failure in _all_ places.
- setup the PCI control register as recommended in the IIi users manual.
2000-04-10 16:11:23 +00:00
mrg
79f22c2c51 UltraSPARC IIi CPU has bits 6-10 of the INO hardwired to 1. when we
install an interrupt handler, make sure we set these bits to 1.  now,
interrupt_vector in locore can find our registered interrupt handlers
and at least try to setup a call to them.
2000-04-10 16:07:50 +00:00
mrg
f7618dcb04 add 4 more bits for the PCI control register 2000-04-10 16:04:02 +00:00
pk
cfadc0991a Get a kernel without DDB to build. 2000-04-10 13:34:18 +00:00
mrg
e2ed27832e with these two, POWEROFSEVEN now compiles cleanly. 2000-04-08 15:15:41 +00:00
mrg
4583d39d24 correct the pci ino->ipl table. shut up gcc once more. 2000-04-08 04:35:01 +00:00
mrg
5b5f175f38 - store the ebus's parent so we can find the IOMMU
- use generic iommu routines in the ebus code (uses the above)
- add some more comments.
2000-04-08 04:33:09 +00:00
mrg
d360a37afd - remove unused variable.
- include <sparc64/sparc64/cache.h> to get cache_flush() prototype.
- remove an unnecessary cast.
2000-04-08 04:17:31 +00:00
mrg
34d04ff6db include <ddb/db_output.h> to get the db_printf() prototype. 2000-04-08 03:09:00 +00:00
mrg
748cfc6b99 rearrange a little to accommodate real SUNW,psycho support. 2000-04-08 03:08:20 +00:00
mrg
70e38e4034 actually, i wrote these in 2000 2000-04-08 03:07:07 +00:00
thorpej
4044b5a41c Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
2000-04-07 16:58:53 +00:00
mrg
580ccd66ad make this work with years-old new-style mdsetimage, etc. 2000-04-06 13:39:26 +00:00
mrg
c4436b3c73 add some comments, clean this up a bit. 2000-04-05 14:30:44 +00:00
mrg
21adbdd7d0 after enabling the streaming buffer, check to see that it is actually
there and enabled.  if it appears to be missing or not enabled, do
not use it.
2000-04-05 14:26:51 +00:00
mrg
ff95126059 add a couple of comments. 2000-04-05 14:23:45 +00:00
mrg
b986c284fe correct a message 2000-04-05 14:23:27 +00:00
mrg
cb71509569 be slightly more verbose when attaching ebus devices. 2000-04-05 12:30:42 +00:00
mrg
add6dbf96c clean this up some. 2000-04-05 08:03:03 +00:00
mrg
9933bfdf9c driver for the PCI/ebus AUXIO registers. 2000-04-05 07:52:48 +00:00
mrg
f3468bd3d8 use DPRINTF() style debug messages; s/sbus/iommu/ in a few remaining places. 2000-04-05 05:59:03 +00:00
mrg
fe2a55b12c include opt_ddb.h. use generic iommu enter/remove/flush routines 2000-04-05 03:08:03 +00:00
mrg
ef18ba9083 include opt_ddb.h 2000-04-05 03:05:15 +00:00
thorpej
7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
pk
3eb54fdef9 We need cons_attach_input(). 2000-03-21 10:56:23 +00:00
pk
436638ab3a Call rcons_ttyinit() on first open. 2000-03-20 11:27:16 +00:00
pk
2ca556b136 Nuke dead code. 2000-03-19 14:41:48 +00:00
pk
f5839cdae8 Minimal changes to accomodate the console input channel attachment
changes in the keyboard driver (see /sys/dev/sun/kbd*)
2000-03-19 13:29:14 +00:00
eeh
3b51289caa Revamp interrupts again:
Fix a bug causing interrmittent panics in interrupt dispatch.
	Use interrupt vectors for softints.
	Add a new send_softint interface.
	Improved D$ flushing.
	Improve traptrace and other debugging enhancements.
2000-03-16 02:36:56 +00:00
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
thorpej
a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
thorpej
fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
thorpej
52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
pk
cd1f76b21b Remove old-style boot device recognition. 2000-01-14 14:27:14 +00:00
mrg
ca66e6b619 - pass slot number to sbus_get_intr() as a new argument.
- in sbus_get_intr(), if we are not an onboard device (ie, sbus card),
  encode the slot number into the sbi_pri so that we can later extract
  it and use it to find the interrupt map & clear registers for this
  device.
- remove "intr" support as it is really pre-sun4u only.
- don't "pause" for so long in sbus interrupt debug messages..

with the slot number being passed back from sbus_get_intr(), the FS/BE
card in an ultra2 now appears to get interrupts and gets beyond
waiting for the scsibus probe!
1999-11-25 05:03:53 +00:00
mrg
abc579187f prefix a variable with "pci_" 1999-11-24 01:53:38 +00:00
pk
a4e956ce77 Also pull in <pci/pciidereg.h>. 1999-11-21 11:17:35 +00:00
thorpej
1946167939 Update for pmap_enter() API change. No functional difference. 1999-11-13 00:30:26 +00:00
eeh
793cc7a41b Update to post 1.4. 1999-10-11 01:57:43 +00:00
thorpej
58858e0968 Suns use black-on-white as the default rcons colors. 1999-08-26 20:50:08 +00:00
thorpej
eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
thorpej
3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
eeh
9cf2782159 Move the DVMA mapin/mapout functions from the SBus driver to the iommu driver. 1999-06-20 00:51:29 +00:00
mrg
0525e9c7ef add ebus attachment for cs4231. this does not work as it requires ebus DMA and will panic if enabled. but it should otherwise be mostly complete. 1999-06-07 14:59:14 +00:00
mrg
aa506f8098 copyright foo. in the future, we will all be binary-redistributable. 1999-06-07 05:40:08 +00:00
eeh
1884f05354 Another general cleanup:
Remove the entire idea of fasttrap interrupts since V9 traps are really cheap,
the CPUs are really fast, and the completely different trap frames would make
these handlers really difficult to implement.

pmap_changeprot() was only used by the clock and one other place; deprecate it.

probeget() and probeset() now take 64-bit addresses even in 32-bit mode so we
can probe IO locations by physical addresses.

Some pmap cleanup.

Some more copyright cleanup.
1999-06-07 05:28:03 +00:00
eeh
186c3eba2b Make pbrobeget() and probeset() work for 64-bit values as well. To do this
the arguments are changed so the address is first and the ASI second so we
can have the address in %o0:%o1 and not worry about unused registers.

Also a bit of copyright cleanup.
1999-06-05 21:58:16 +00:00
mrg
756c2cde22 map in registers, configure interrupts, this appears to be OK now. 1999-06-05 14:19:44 +00:00
mrg
e8ccf39491 find ebus device INO values via the "interrupt-map" and "interrupt-map-mask" properties. 1999-06-05 14:18:26 +00:00
mrg
cc49a21298 use common IOMMU routines. 1999-06-05 05:30:43 +00:00
mrg
da265ce045 clean up a bit, implement pci_conf_{read,write}() with probe[gs]et() (not yet used). 1999-06-05 05:29:50 +00:00
mrg
bb0d20abc4 lpt at ebus. 1999-06-05 05:28:36 +00:00
mrg
2ee43849be catch up with probe[gs]et() changes. 1999-06-05 05:05:11 +00:00
mrg
8613b8e39d avoid uninitalised pointers. 1999-06-04 14:29:38 +00:00
mrg
a1c100d377 clone this from the macppc port. 1999-06-04 13:51:57 +00:00
mrg
10b89455c7 pull iommu code out of sbus code so we can share it with the PCI.
define some useful PCI macros.
1999-06-04 13:48:48 +00:00
mrg
03adf4aad1 PCI driver for the UltraSPARC. this only works on the Ultra5/10 machines
(`SUNW,sabre') for now, and it doesn't really quite work there yet anyway.
the bus space/dma code is cloned from the sbus driver.  the IOMMU code also
is cloned from the sbus code, but separated out into iommu.c so that we can
share it with the sbus driver.  hopefully, much of the bus space/dma code
can also be re-shared with the sbus driver and the ebus driver but for now
these copies will do.

support for the real UltraSPARC PCI (`SUNW,psycho') is unwritten, though
most of this code is shared with it.

we can probe PCI config space and try to configue devices, but interrupts
don't work yet...
1999-06-04 13:42:14 +00:00
mrg
36237341af support for the UltraSPARC `Extension Bus' found on the PCI machines.
the bus space/dma code is cloned from the PCI code to do the same thing
which itself was cloned from the sbus bus space/dma code.  the bus dma
code is non-functional at this point.
1999-06-04 13:29:13 +00:00
eeh
b14c7f77cb Garbage collect. 1999-05-31 00:14:00 +00:00
eeh
64b891fc8d Add code to support using %tick as the system clock if no "counter-timer" node
is found.
1999-05-30 19:13:33 +00:00
thorpej
5832084eaf bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space.  Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE.  We do this for a couple of reasons:

	(1) On systems that have H/W mod/ref attributes, the hardware
	    may not be able to track mod/ref done by a bus master.

	(2) On systems that have to do mod/ref emulation, this prevents
	    a mod/ref page fault from potentially happening while in an
	    interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.
1999-05-25 23:14:03 +00:00
mrg
1bd01d4677 pull struct strbuf + defines into iommureg.h. properly merge previous commit. 1999-05-24 00:25:31 +00:00
ad
080560c8c6 - Setting initial position of cursor is up to caller.
- Set cursor position properly for SPARC. From Juergen Hannken-Illjes.
1999-05-23 17:59:39 +00:00
mrg
ae1a84a61f place iommu definitions in iommureg.h 1999-05-23 07:24:02 +00:00
eeh
193cc31772 Separate out the generic console handling from zs.c 1999-05-23 02:46:35 +00:00
eeh
92ad9c4080 Start putting in hooks for non-zs console devices. 1999-05-23 02:45:19 +00:00
eeh
f1066c97ad If the zs has not yet attached use the PROM for console input. 1999-05-22 20:34:56 +00:00
eeh
60b89ebf96 Well, looks like the MI allocsys() broke the dvmamap, so instead of using a
single map move it to the bus controller driver so each bus can handle its own
IOMMU without conflicts.
1999-05-22 20:33:55 +00:00
ad
a4f0570f7d SPARC console is black on white, and is centered by default. 1999-05-19 21:05:59 +00:00
ad
02bc362e3e Add arg to rcons_init() that when set causes screen to be cleared. 1999-05-19 20:34:19 +00:00