Commit Graph

11 Commits

Author SHA1 Message Date
Thomas Moestl
9fb2b0d55e Add a few new functions/macros: intr_disable() and intr_restore() to
disable interrupts completely, and stxa_sync(), which performs a store
immediately followed by a membar #Sync with interrupts disabled (this
is needed for writes to diagnostic registers).
2002-02-13 15:40:05 +00:00
Jake Burkholder
c0e12e9356 Add a mov() macro, which is used in conjunction with the register defines
for setting reserved global registers from c.
2002-01-08 04:36:01 +00:00
Jake Burkholder
f664fe9075 Add "memory" to the clobber list for membars.
Submitted by:	tmm
2001-12-29 06:51:50 +00:00
John Baldwin
7e1f6dfe9d Modify the critical section API as follows:
- The MD functions critical_enter/exit are renamed to start with a cpu_
  prefix.
- MI wrapper functions critical_enter/exit maintain a per-thread nesting
  count and a per-thread critical section saved state set when entering
  a critical section while at nesting level 0 and restored when exiting
  to nesting level 0.  This moves the saved state out of spin mutexes so
  that interlocking spin mutexes works properly.
- Most low-level MD code that used critical_enter/exit now use
  cpu_critical_enter/exit.  MI code such as device drivers and spin
  mutexes use the MI wrappers.  Note that since the MI wrappers store
  the state in the current thread, they do not have any return values or
  arguments.
- mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is
  assigned to curthread->td_savecrit during fork_exit().

Tested on:	i386, alpha
2001-12-18 00:27:18 +00:00
Jake Burkholder
4d5e57d87d 1. Implement ascopyto() and ascopyfrom() for copying to an alternate address
space from kernel space and from an alternate address space to kernel
   space.
2. Remove the unused and unprototyped physcopy() and physzero() and replace
   with the more versatile ascopy() and aszero(), inspired by the above.
   These can be used to copy and zero physical pages of memory without mapping
   them into kernel space first.
3. Use magic numbers for the offsets in the jmpbuf structure like other
   platforms.
4. Use SET.

Submitted by: 	tmm (1, 4)
2001-11-18 02:47:26 +00:00
Thomas Moestl
11dd9255e9 Add bus_space and busdma support for sparc64. 2001-11-09 20:05:53 +00:00
Jake Burkholder
275e4fcf0a Add a flushw() macro. 2001-09-03 22:13:53 +00:00
Jake Burkholder
f70bfa97c0 Spell ta 1 correctly as ta %xcc, 1. Use %pil for critical enter/exit
instead of pstate.ie.  Note that popc is not implemented in hardware
on certain ultras, so we can't use it for inline ffs (suck).
2001-08-18 18:07:37 +00:00
David E. O'Brien
73a4930297 The author isn't a [UC] Regents. Correct the copyright language. 2001-08-09 02:09:34 +00:00
Jake Burkholder
89bf8575ee Flesh out the sparc64 port considerably. This contains:
- mostly complete kernel pmap support, and tested but currently turned
  off userland pmap support
- low level assembly language trap, context switching and support code
- fully implemented atomic.h and supporting cpufunc.h
- some support for kernel debugging with ddb
- various header tweaks and filling out of machine dependent structures
2001-07-31 06:05:05 +00:00
Jake Burkholder
98bb5304e1 Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture.  This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports.  Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
  architecture, including empty versions of all the machine dependent
  structures
- a machine independent atomic.h, which can be used until a port has
  support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
  when called and print out the name of the function that needs to
  be implemented.  functions which are normally in assembly files are
  not included, but this should reduce the number of different undefined
  references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.

Requested by:   alfred, imp, jhb
2001-07-31 05:45:16 +00:00