Commit Graph

93 Commits

Author SHA1 Message Date
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej 2ff657adb8 Fix the raise/lower semantics of splsoftclock()/spllowersoftclock(). 1999-08-05 18:28:01 +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 6ec1ededf1 Make a slight rearrangement in how <machine/lock.h> is included. 1999-07-27 23:45:13 +00:00
thorpej cc668e410f Define apporpriate an value for SIMPLELOCK_LOCKED, based on the
semantics of ldstub.
1999-07-27 22:22:33 +00:00
thorpej c1ee8f0a8c Prepend `cpu_' to the machine-dependent atomic locking primitivies. 1999-07-27 21:45:39 +00:00
eeh c6a358d0a8 Lower spl for softints. 1999-07-18 23:54:20 +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 30c351dc59 mmm, missing return types make gcc unhappy. 1999-06-08 10:35:36 +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
eeh 3f7968c736 Fix things up so they compile again. 1999-06-05 20:38:24 +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
eeh 07d5dfdd7b Fix some bugs in some more of those asm macros. 1999-05-31 00:13:16 +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
eeh cd53dbd506 Re-write ASI load/stores to use full 64-bit addresses so we can use device
register addresses with MMU bypass ASIs.
1999-05-30 19:11:33 +00:00
eeh c2f2c064c0 Make pmap_enter() handle little-endian mappings properly. 1999-05-30 19:01:50 +00:00
eeh de1ba9c829 Grab real locks from the sparc port. I suppose we could use casa and casx
instead of ldstub, but since we aren't doing n-way locking it makes little
difference.  N.B. Need to decide what to do with sparc64/sparc64/asm.h which
has name conflicts with sparc64/include/asm.h.  So far most of
sparc64/sparc64/asm.h has been moved to ctlreg.h.
1999-05-30 18:57:27 +00:00
mrg 1b384c6911 clone intr.h from the SPARC. 1999-05-30 02:37:10 +00:00
eeh 35d96171e7 Fix bus_type_t properly and enable ASI accesses for bus_space_{read,write}*() 1999-05-22 20:28:22 +00:00
eeh 56b080bed6 Fixup argument confusion to __asm() statements. long long is two registers
wide in 32-bit mode.  Doh!.
1999-05-22 20:25:49 +00:00
eeh b4b570608d Add some more 32-bit emulation support. 1999-05-12 01:11:54 +00:00
eeh 564db48540 Don't clobber any input regs in __asm statements. 1999-05-11 05:06:17 +00:00
christos 361f7917c8 clean up old GCC.1 stuff; move common definitions to the top. 1999-05-04 13:36:44 +00:00
christos b70c3eb0ca Define __extension__ if __GNUC__ < 2
Define __builtin_*() for lint
1999-05-03 16:21:28 +00:00
thorpej b8073b401b Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
1999-04-26 22:46:44 +00:00
ad 5140c302ce Bring sparc/sparc64 fb code and kernel configuration into line with
rcons changes.
1999-04-13 18:45:40 +00:00
eeh 6492e81ae6 Fix fault handling code to correctly report access_type and fault_type
and get rid of pmap_enter_phys().
1999-03-28 19:01:02 +00:00
eeh 69d1f9d0d3 COMPAT_SPARC32 -> COMPAT_NETBSD32 1999-03-26 04:29:20 +00:00
mrg 54ab2e1e54 clean and up make compile 1999-03-25 17:49:43 +00:00
mrg dc011bcec0 move sparc32 MD bits here. 1999-03-25 16:26:19 +00:00
drochner 76fa1751fe Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
1999-03-23 21:29:03 +00:00
eeh f0503a65c8 Flush D$ on bypass accesses. 1999-03-22 05:35:39 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40: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
hubertf 56f2d188fc RCS ID police 1999-02-15 04:54:34 +00:00
drochner 0e91ebb904 make the last fix work as intended 1999-01-31 11:15:43 +00:00
mrg 7006310cbd retire _LP64; use compiler provided __arch64__, but still defined _LP64 where we used to anyway. 1999-01-31 09:21:18 +00:00
eeh 8ee118c70d Fix problems with bus_space*() macros (thanks M.Drochner). 1999-01-30 17:02:32 +00:00
mycroft 897a8a7f29 Mark [hn]to[nh][ls]() with __const__, so they are subject to CSE. 1999-01-24 12:55:01 +00:00
christos 6d70af37f7 move prototypes to mi locations and add the xrs gunk. 1999-01-21 23:06:25 +00:00
chuck 90ddaed9b5 MNN is no longer optional, remove dead code 1999-01-16 20:43:21 +00:00
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
eeh d5ca0ef2e6 Don't use `long' instead of `int64_t' since the latter may not be in scope. 1999-01-09 23:15:39 +00:00
thorpej da572a137f Argh, fix the ANSI CPP version of the a.out WARN_REFERENCES(). 1998-12-02 21:16:46 +00:00
thorpej a6f7e0c05a Implement WARN_REFERENCES(). 1998-12-02 00:58:42 +00:00
mrg b066708a2e add protos for switchtoctx, fixalign and emulinstr. XXX should all these be here? 1998-11-24 12:49:14 +00:00
oster c74d32c5fc Updating of bdev's and cdev's to support RAIDframe. 1998-11-13 04:47:03 +00:00
eeh 08af05f929 Fix 32-bit gcc scheduling problems. 1998-11-13 03:47:15 +00:00
thorpej cabecee13c Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:43:49 +00:00