Commit Graph

50 Commits

Author SHA1 Message Date
eeh
5c6bf5ad03 Overhaul streaming buffer handling:
sysio streaming buffer flushes write a single 8-byte aligned 8-byte
	value.

	psycho streaming buffer flushes write a 64-byte aligned 64-byte block.

So separate out the streaming buffers into their own structure and pass those
in to all iommu operations.  This also means we only flush the correct
streaming buffer for psycho rather than needing to flush both just in case.
2002-06-20 18:26:23 +00:00
eeh
7fba99a774 Cleanup. 2002-03-21 00:48:43 +00:00
eeh
47ef6a5146 Overhaul bus space.
bus_space_handle_t now holds an address and two ASIs, one for normal accesses
and one for streaming accesses.  This allows to map individual handles
different ways, so some can use MMU bypass accesses and others use virtual
addresses.  bus_space_map() will now create handles that use bypass accesses
unles BUS_SPACE_MAP_LINEAR is passed in.  So only pass in BUS_SPACE_MAP_LINEAR
if you absolutely *need* to use bus_space_vaddr().  This removes at least one
extra level of indirection and should reduce TLB misses.

32-bit kernels have problems accessing 64-bit addresses, so they always use
virtual addresses.
2002-03-20 18:54:46 +00:00
eeh
ce92edb48a bus_space_map2() no longer exists. 2002-03-14 20:51:35 +00:00
eeh
bb99dc52c7 Manage both streaming caches on psycho/psycho+. 2001-10-07 20:30:40 +00:00
eeh
98ecb5b215 getprop* -> PROM_getprop* 2001-09-26 20:53:05 +00:00
eeh
766a9b8c9c Change bus_space_mmap() signature to the official one. 2001-09-24 23:49:31 +00:00
eeh
1fead733d9 PCI overhaul. 2001-07-20 00:07:12 +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
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
mrg
703ec39a02 fix warnings in DEBUG & DIAGNSTIC code. 2000-12-06 01:47:49 +00:00
fvdl
2ccdc61f62 Avoid (safe) cast warnings. 2000-12-04 20:19:49 +00:00
eeh
b19423f823 Pass along bus frequency. 2000-11-01 06:19:59 +00:00
mrg
f39b5cf92e wrap long lines. 2000-10-19 12:25:04 +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
4b21f66d57 work around a bug passing arguments to iommu_dvma_load_raw() 2000-07-07 12:53:29 +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
eeh
6c5d2dbbac With these changes the kernel seems almost stable again. 2000-06-24 20:48:36 +00:00
eeh
be308420d4 Get rid of vaddrs.h. 2000-06-24 04:20:58 +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
3b90b5c5c4 Add support for bus_dma_load_raw() so the le driver will work again. 2000-05-17 02:31:12 +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
cfadc0991a Get a kernel without DDB to build. 2000-04-10 13:34:18 +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
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +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
thorpej
1946167939 Update for pmap_enter() API change. No functional difference. 1999-11-13 00:30:26 +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
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
mrg
cc49a21298 use common IOMMU routines. 1999-06-05 05:30:43 +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
ae1a84a61f place iommu definitions in iommureg.h 1999-05-23 07:24:02 +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
mycroft
9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
eeh
3c8b9d7307 Some devices don't have a `device-type' property we can use to allocate
an IPL.  Check for those by name.  Give the rest a default IPL of 2.
(Added `SUNW,CS4231' to the list.)
1999-03-18 03:23:53 +00:00
eeh
9c06e4a454 Need to put IGN in SBUS slot interrupt vectors as well. (From Kapil Chowksey) 1999-01-10 23:32:57 +00:00
eeh
a112a2a4cc It slices. It dices. It does everything except exec a sparc32_compat init. 1998-09-05 23:57:24 +00:00
pk
c20e88b71e #include <dev/sbus/sbusvar.h> 1998-09-05 16:50:37 +00:00
pk
181a8253a0 Nuke temporary `getpropA()'. 1998-09-05 16:23:08 +00:00
eeh
cf9a8a5a53 Periodic update: now starts probing devices. 1998-09-02 05:51:35 +00:00
eeh
26d2d906c7 Some more 64-bit cleanup. Now everything compiles. 1998-08-30 15:32:16 +00:00
eeh
a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
eeh
d94474ccc9 General update:
Added genassym.cf
	Removed lderr which should never have gotten in
	Removed lots of dead code from locore.s
	Added some softint stuff to intr.c
	Added support for halt -p
	esp and le both use bus_dmamap_*() functions now
		instead of kdvma_mapin()
	groundwork for PCI (but we still have no drivers for
		any sun4u PCI devices)
1998-07-07 03:05:02 +00:00
eeh
01e2e698b6 Import of sparc64. 1998-06-20 04:58:50 +00:00