Commit Graph

3089 Commits

Author SHA1 Message Date
nathanw 4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
wiz db579612f4 Definition, not defintion. From miod@openbsd. 2003-09-26 22:25:21 +00:00
simonb 550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
mycroft 864b96269c Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
mycroft 3d7395ab71 Update for new attach method. 2003-09-25 01:12:43 +00:00
skd e7e68c0c6d Backed out single step emulation.
Approved by thorpej@netbsd.org.
2003-09-21 15:14:51 +00:00
cl c32b8e7a57 add MD part of SA/pthread pagefault handling on alpha 2003-09-18 22:36:32 +00:00
skd f5c4ea935a Added kernel support for single stepping, adapted from FreeBSD.
Approved by christos.
2003-09-18 05:26:41 +00:00
kleink d440784b30 __{BEGIN,END}_DECLS-wrap prototypes. 2003-09-11 09:40:11 +00:00
itojun fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
dsl 154703d1f9 Use memset (instead of bzero) to clear bss.
bootxx_lfs now fits in the available space.
2003-08-29 12:58:39 +00:00
dsl 99ace74e7b Create linker map file so it is possible to see which library members
are included and why.
2003-08-29 12:56:59 +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 fd825b0f1e avoid taking the kernel lock for MPSAFE syscalls.
add missing unlock in fancy case.
2003-08-24 16:36:10 +00:00
itojun 8ebd15f8cd add udav* 2003-08-22 07:52:48 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +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
bouyer 7c840df334 Add esiop at pci to GENERIC which already have siop at pci.
esiop has been tested enouth now.
esiop not added to INSTALL kernels because of possible space constraint.
siop should be able to drive all adapters supported by esiop.
2003-08-06 12:32:03 +00:00
matt 2f71595941 Make this compile with gcc3. Change kernel_pmap_store to array of struct
pmap instead of array u_long.  A bit of space is wasted but it supresses
the -Wcast-align warning.
2003-08-02 19:10:04 +00:00
itojun 3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej 063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
nathanw 0d39bb5cdc In setmcontext(), set MDP_FPUSED in l->l_md.md_flags when the provided
context has FPU state.
2003-07-24 19:17:51 +00:00
lukem 9d93561319 a .#included .c file needs __KERNEL_RCSID(1, ... 2003-07-15 02:13:13 +00:00
lukem 10926a715a add __KERNEL_RCSID() (using 1, for #included .c files) 2003-07-14 23:25:35 +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 f73e5a517d #ifdef _KERNEL_OPT police 2003-06-29 18:11:14 +00:00
simonb b8aadd3696 Only one function is this file wasn't ANSIfied, convert it. 2003-06-29 15:17:40 +00:00
simonb 2bda3187f5 Fix 'struct lwp *' lossage. 2003-06-29 15:14:11 +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
he 4d99002423 #ifdef _KERNEL_OPT police. 2003-06-28 08:42:41 +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
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
thorpej 0eff671820 Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
2003-06-14 17:01:06 +00:00
martin ce22b9eb8c Add support for SMBFS. 2003-06-01 20:30:49 +00:00
martin c299932d8d Add nsmb. 2003-06-01 20:19:38 +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 e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +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
enami 550608176e - Adjust arguments to pmap_steal_memory() for new interface.
- We no longer able to use uvm_pageboot_alloc() before pmap_bootstrap()
  is called.  Use pmap_steal_memory() directly instead.

Approved by Jason R. Thorpe.
2003-05-09 05:33:52 +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
fvdl 6bd0c9f44d Move definition of ISA_DMA_BOUNCE_THRESHOLD to dev/isa/isareg.h. 2003-05-05 12:55:41 +00:00
gmcgarry cd3c6906c0 Add wsfont support. Addresses PR#18388. 2003-05-04 01:18:56 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +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
tsutsui 6147df324d Add some entries added to GENERIC recently. 2003-04-27 13:31:11 +00:00
ragge d8c8fa8111 Add pseudo-device ksyms. 2003-04-26 14:10:04 +00:00
ragge 69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00