Commit Graph

425 Commits

Author SHA1 Message Date
eeh
5f1ffa71fc License cleanup. 2004-03-27 16:21:53 +00:00
nakayama
3a065cad6a Eliminate cast 64-bit address to u_long. 2004-03-22 12:24:37 +00:00
pk
2a26804b1a Reach over to the sparc openfirm & openprom implementation. 2004-03-21 14:25:51 +00:00
pk
6521621036 Switch to the sparc prom library. 2004-03-21 14:10:08 +00:00
pk
ef98c2defb Reach over to the sparc versions. 2004-03-21 14:05:43 +00:00
pk
af0050c56b Drop optionsnode, fbnode and stdinnnode. 2004-03-19 15:22:43 +00:00
pk
ea53363e84 Rename PROM_getprop*() => prom_getprop*(). 2004-03-17 17:04:58 +00:00
pk
fcac5c14aa Pass the buffer size to PROM_getpropstringA(), as in sparc. 2004-03-17 15:22:57 +00:00
pk
aafd051f4f For now, implement prom_getoption() in autoconf.c. 2004-03-16 23:05:45 +00:00
pk
9c0a7ff277 For now, implement prom_getidprom() and prom_getether() in autoconf.c 2004-03-16 13:14:34 +00:00
simonb
55965d25ad Use "#define<tab>" consistently. 2004-03-14 21:12:08 +00:00
chs
cec587ddf6 checkpoint of MP work from dennis and myself. includes cross-processor
interrupt framework, a sledgehammer TLB invalidation and misc MP fixes.
doesn't work at all yet.
2004-03-14 18:18:54 +00:00
petrov
b062992f9d Correct VA_ALIAS_MASK. From Chuck Silvers. 2004-02-26 20:24:29 +00:00
drochner
289fa68010 provide a definition NETBSD32_MID_MACHINE which tells for the a.out MID
to look for in 32-bit emulation
2004-02-20 16:11:44 +00:00
petrov
d63b2431fa Some cleanup and move ddb_regs declaration to db_interface.c 2004-01-06 20:41:23 +00:00
petrov
e459d2a294 Spinup secondary cpus. Based on codes sent to me by Dennis Chernoivanov
and Chuck Silvers.
2004-01-06 09:38:19 +00:00
jdolecek
089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
petrov
20dfeedb2e Remove prototypes of non-existant functions, ansify and knf. 2003-12-08 00:52:48 +00:00
cdi
d49bc81070 Use per-cpu pcb, curlwp and fplwp rather than global ones. This brings
GENERIC.MP configuration to a usable state.

Approved by petrov@.
2003-11-25 05:14:58 +00:00
petrov
b56164b9ed Set curcpu() for SMP. 2003-11-20 08:04:04 +00:00
petrov
5af3af05f4 Compile GENERIC.MP. 2003-11-15 05:24:51 +00:00
petrov
8ab0c67f4e Lower PIL_AUD so /dev/audio will not interrupt and interfere with
scheduler. Fixes kern/23382.
2003-11-09 21:52:31 +00:00
tsutsui
112c91d583 Use #if defined(_KERNEL_OPT) to protect #include "opt_xxx.h"
from building LKM etc. Suggested by mrg.
2003-11-09 05:29:59 +00:00
kleink
91af1eaa96 #define __HAVE_LONG_DOUBLE on platforms which implement a distinct
`long double' type.
2003-10-28 00:55:28 +00:00
christos
1293ac6b7f remove buildcontext 2003-10-27 00:16:42 +00:00
christos
a5d24112bb more siginfo glue 2003-10-26 08:06:56 +00:00
kleink
422697679e * Move the definitions for types other than single-precision and double-
precision back to machine-dependent headers.  C99 has no strict
  requirement which, if any, extended-precision type `long double' must
  match, and even between 80-bit formats there are differences in
  implementation (m68k vs. x86).
* On arm, consider __VFP_FP__.
2003-10-23 23:26:06 +00:00
kleink
004922cd70 Don't use NULL in integer-type assignments/comparisons. 2003-10-21 12:08:11 +00:00
christos
d0e3551301 Add mcontext32_t and friends. This is WIP. 2003-10-13 23:45:14 +00:00
christos
44f376e8fc move MI stuff to the MI include 2003-09-26 18:09:38 +00:00
mrg
9e599bdb11 change PROM_getprop() from taking a "void **" for the storage, to a
"void *", and do the extra de-reference directly in the function.  this
avoids having to cast dozens of different types to "void **", which sets
of GCC3's strict-aliasing.  testing by martin@
2003-08-27 15:59:49 +00:00
uwe
5c666394c9 Drop fbvar.h from INCS now that it's been cvs rm'ed here. 2003-08-26 11:51:13 +00:00
uwe
5efaa48bea Framebuffer code common to sparc and sparc64 was merged and moved to
dev/sun 3 years ago.  Remove these redundant and out-of-date copies.
All code now uses dev/sun/fbvar.h
2003-08-25 19:24:49 +00:00
chs
939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
chs
792f9a7f05 remove some leftover cruft. 2003-08-10 02:30:51 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
martin
69cd0c4a54 struct proc * -> struct lwp * 2003-06-29 13:33:51 +00:00
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
fvdl
7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
martin
ce380782ec My reading of the gdb code seems to indicate it expects 125 registers
from sparc64, not 72 (sparc value). Bump kgdb buffer size a bit too.
2003-05-18 21:00:57 +00:00
kleink
776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
martin
ae2073f3d8 Make all non-trivial bus space functions "static __inline" (consistently)
and turn all macros with local blocks and declarations into functions.
This fixes PR 19975.
2003-05-05 09:36:51 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
scw
8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
christos
a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
dsl
f1a857b8af change 'data' arg of fo_ioctl to void * to match file.h 2003-04-16 08:56:42 +00:00
petrov
488c2452ee clean-up unused definition. 2003-04-14 01:44:06 +00:00
thorpej
cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej
d3f30fc625 We use 8K VM pages on Sun4U, so make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK
into compile-time constants.
2003-04-01 16:05:30 +00:00