Commit Graph

1482 Commits

Author SHA1 Message Date
chs c5e2454205 handle pmap_procwr() on kernel procs (MIPS1).
needed for new signal trampoline stuff.
2003-09-12 15:29:16 +00:00
kleink d440784b30 __{BEGIN,END}_DECLS-wrap prototypes. 2003-09-11 09:40:11 +00:00
mrg 1a086c6b25 introduce an additional switch to enable building GCC3 instead of GCC2:
HAVE_GCC3.  if this is set, we also set USE_TOOLS_TOOLCHAIN=no.  change
the definition of the former to be restricted to whether tools/toolchain
is used or not.
2003-08-27 16:03:17 +00:00
christos cdf5cfc132 Kill another stray setup_stack. Thanks @@@. 2003-08-11 13:27:58 +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
mrg a25b9da024 don't need -mno-half-pic with gcc3 2003-07-26 18:33:51 +00:00
lukem 4b2744bf35 __KERNEL_RCSID() 2003-07-15 02:43:09 +00:00
simonb beadae28a9 Add some dependancies on assym.h; helps "make -j N" kernel builds. 2003-07-04 03:48:01 +00:00
thorpej d876aa082a Nuke the "alchemy_info" stuff, and just use the dev_propdb to set
the mac-addr property for the Au1x00 on-chip MACs.
2003-07-04 01:19:58 +00:00
simonb 1534c8822e ANSIfy, KNF. 2003-06-30 13:39:36 +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
simonb 2bda3187f5 Fix 'struct lwp *' lossage. 2003-06-29 15:14:11 +00:00
simonb 9e8290fbee Use the com softc enabled/disable hooks instead of directly frobbing
Au1x00 registers in com_attach_subr().  Suggested by Jason Thorpe and
tested on both console and extra serial ports.
2003-06-29 13:18:24 +00:00
simonb 261417ff31 Fix 'struct lwp *' lossage. 2003-06-29 12:34:55 +00:00
simonb 33187ba9d0 Show current PC in an panic message. 2003-06-29 12:21:32 +00:00
simonb 6939feda9f KNF nit (parentheses around return value). 2003-06-29 12:20:19 +00:00
simonb a810cb3990 Don't use "extern" with functions. 2003-06-29 11:32:11 +00:00
simonb fe57fb71a2 Fix more needless 'struct proc *' to 'struct lwp *' fallout. 2003-06-29 09:23:14 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
simonb c674f217bf Use STATIC_LEAF and STATIC_XLEAF for the helper functions; there's no
need to export their symbols.
2003-06-27 08:25:43 +00:00
simonb ecdaf1626b Add STATIC_LEAF and STATIC_XLEAF macros, ala the alpha port. 2003-06-27 08:22:05 +00:00
he 57822a30b2 Conditionalize usage of the COM_HW_HAYESP constant on COM_HAYESP.
Add a dummy type argument to the local (au)comcnattach to match the change
in the prototype of the "real" comcnattach.

Reviewed and tested by simonb.
2003-06-27 07:39:34 +00:00
simonb 8eda62491d Need to pass the address of the lock to simple_unlock(). 2003-06-25 05:37:00 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
simonb e02e7ca6de Consistency nit- always use "#if defined(foo)" for checking MIPSn. 2003-06-12 14:35:56 +00:00
simonb f1f77c261e Don't use "return;" as last statement of a void function. 2003-06-11 15:27:57 +00:00
simonb 9e9abd6653 Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.
2003-06-10 06:42:06 +00:00
simonb 789329a94f Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.
2003-06-09 12:20:37 +00:00
simonb 519e8df6a1 Don't use magic numbers in asm code (use MIPS_COP_0_STATUS instead
of "12").
2003-06-09 07:46:20 +00:00
simonb 9f9b329dbc Remove needless line wrap. 2003-06-02 05:55:11 +00:00
simonb 94582f47bd #define<tab> 2003-05-30 06:41:00 +00:00
tsutsui 71ef8e5915 Use common mips/softintr.c for softintr(9) on evbmips.
Ok'ed by simonb.
2003-05-25 14:08:19 +00:00
tsutsui 00415d8082 Prepare common routines for MIPS generic software interrupt. 2003-05-25 13:48:00 +00:00
kristerw f14bf619f4 Make lint happy by changing asm to __asm. 2003-05-24 14:37:31 +00:00
simonb 4f5bd23f68 scdebug_call() takes an LWP and not a proc as it's first argument. 2003-05-23 12:58:18 +00:00
simonb b2aa917e00 Un-wrap a no-longer-too-long panic message, add some extra info to another
panic message.
2003-05-14 10:09:49 +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
thorpej 36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
fvdl d88cf589cb A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
2003-05-09 23:51:25 +00:00
thorpej b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
simonb 8bfe136eca Remove a duplicate load of "a1" in page_zero (a PAGE_SIZE vs NBPG botch). 2003-05-04 04:56:33 +00:00
simonb f426b1ecfe Use 64-bit "sd" in mips_pagezero() if we're compiled for MIPS{3,4,64}
(the actual check is !MIPS1 && !MIPS32).

Do the ".set push", ".set mips3", ".set pop" dance if we use 64-bit
instructions.
2003-05-04 02:53:53 +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
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +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
nathanw ff28c51cc0 Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
2003-04-11 22:02:28 +00:00
simonb 0cdf56e3e6 Fix a tyop in a comment. 2003-04-11 06:24:59 +00:00
thorpej 9bd03b1f69 Cast the arg to MIPS_KSEG0_TO_PHYS() in POOL_VTOPHYS() (thanks, nathan!). 2003-04-09 22:10:58 +00:00
thorpej a0aee79a1d Add the ability for pool caches to cache the physical address of
objects.  Clients of the pool_cache API must consistently use
the "paddr" variants or not, otherwise behavior is undefined.

Enable this on Alpha, ARM, MIPS, and x86.  Other platforms must
define POOL_VTOPHYS() in the appropriate manner in order to enable
the feature.

Part 1 of a series of simple patches contributed by Wasabi Systems
to improve network performance.
2003-04-09 18:22:13 +00:00
thorpej cf9d21bf8e Use PAGE_SIZE rather than NBPG. 2003-04-08 23:39:14 +00:00