Commit Graph

152897 Commits

Author SHA1 Message Date
jmmv 3ecc718811 Mark MULTIBOOT_SYMTAB_SPACE obsolete instead of silently removing it.
Per cube@'s suggestion.
2006-10-25 15:52:28 +00:00
jmmv ccf856e4f9 Remove references to the GRUB patch required to load NetBSD kernels.
Finally they can be booted by mainstream GRUB-Legacy versions -- those
included with any Linux distribution!
2006-10-25 14:02:11 +00:00
jmmv 13f9baab4e MULTIBOOT_SYMTAB_SPACE is gone because the kernel is now clever enough to
not need this hack.
2006-10-25 13:58:02 +00:00
jmmv 8d30a46449 Remove the usage of Multiboot's "a.out kludge" to tell the boot loader to
reserve some more space for the BSS section than the binary says.  This
trick was used to leave room after the kernel's image to copy the symbol
table following the format required by ksyms_init.  (It was also used to
workaround a bug in the physical address fields of the binary, but this has
been long fixed.)  Yes, the MULTIBOOT_SYMTAB_SPACE option goes away; yay!

Instead, copy the required data after the kernel in a way that avoids having
to reserve space and use the new ksyms_init_explicit function to avoid the
need to construct a minimal ELF image.

Fixes ksyms when using an "unpatched" GRUB (one that does not contain the
fix to honour the "a.out kludge" for ELF images, even when present) -- i.e.
ddb and lkms.  As a side effect, the new code is much clearer to read and
digest.

Closes PR port-i386/32865.
2006-10-25 13:56:15 +00:00
jmmv 133d7c5ba4 Add a function (ksyms_init_explicit) to add a symbol table when we know the
exact address of the symtab and strtab ELF sections contents beforehand.

This will be used in i386's Multiboot code to add the initial kernel ksyms
without having to prepare a minimal ELF image that matches the format
expected by the reguluar ksyms_init function.

This part was reviewed by cube@ and successfully passes a full i386 release
build.
2006-10-25 13:46:36 +00:00
elad 75939147ff Kill some KAUTH_GENERIC_ISSUSER. 2006-10-25 12:48:44 +00:00
pooka a72d8a71e5 If the control descriptor is closed, mark userspace dead and wakeup
all waiters *before* trying to get the syncer lock necessary for
dounmount().  This prevents a deadlock if the userspace server dies
while the syncer is running.
2006-10-25 12:04:14 +00:00
elad 59e67acd85 kauth_cred_geteuid() is okay for the purposes of these checks. Revert
conversion to kauth_authorize_generic() done some time ago.
2006-10-25 11:59:34 +00:00
mrg 66365a4f3c - note that __idle_u should go away but doing so breaks things
- fix several comments to reality
- clean up the #ifdef NO_VCACHE code slightly
- use call instead of set/jmpl
- remove a couple of unnecessary stores to curlwp
2006-10-25 11:56:56 +00:00
elad eae258eadf Use kauth(9) (device scope tty open). 2006-10-25 11:30:45 +00:00
skrll 2ec9405f64 Fix the code to deal with new gcc propagating const-ness from structs to
members. All fixups of the mcontext are done in the trapframe.
2006-10-25 11:06:02 +00:00
skrll da3d10d5b0 Whitespace fixes. 2006-10-25 07:07:48 +00:00
he 87a71ab54f Propagate const, prompted by new gcc. 2006-10-25 07:04:13 +00:00
mrg 712a3f3aae wrap a long line 2006-10-25 04:44:39 +00:00
thorpej 3c6ae35ab2 - Add a new disk ioctl (DIOCGDISKINFO) to get the disk-info dictionary
for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
  DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
  new disk_ioctl() function.
2006-10-25 04:04:45 +00:00
christos 12be2d1032 remove a bit of code and a label and explain why in a comment; no code size
change.
2006-10-24 23:41:01 +00:00
mlelstv 999ac788ac don't segfault on NULL pointer if number of rounds is
not specified in passwd.conf.
2006-10-24 22:49:19 +00:00
elad 2d8eaf9b86 Various cleanups.
Make some "#ifdef DIAGNOSTIC" blocks always compiled in; others
convert to KASSERT() where appropriate.

Add some sanity checks and comments while here.
2006-10-24 22:38:41 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
martin f559eee297 In the INTSTACK and KSTACK_VA special case treatment in pmap_exctract,
do not add the offset to the result - the calculated PA is the right
value - not the start of the page as in the other cases.
This fixes DMA to kernel stack, and avoids "fabricating a geometry"
warnings.
2006-10-24 21:11:58 +00:00
bjh21 695ea57fe2 parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:09:03 +00:00
drochner f0834e56c6 clean up the USB attachment stuff a bit: use a dedicated interface
attribute ("usbdevif") to attach USB devices, be it a plain device or
a hub, and remove some strangeness caused by the former usb/uhub mess
2006-10-24 21:03:30 +00:00
bjh21 84e47229be parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:03:13 +00:00
drochner 78c0d69e17 kill the "irq" llocator for pcmcia - this doesn't make sense because
irq mapping is done by the controller, and it is not used anywhere afaict
2006-10-24 20:54:10 +00:00
christos 336eaa9131 comment out impossible code. 2006-10-24 20:45:33 +00:00
bjh21 65d685fe36 Use <arm/bootconfig.h>. 2006-10-24 20:39:13 +00:00
bjh21 b4dff5b189 ANSIfy, KNF, remove unnecessary includes. 2006-10-24 20:25:52 +00:00
drochner 21440e4fda minor fix to error handling (from OpenBSD, rev.1.40):
only set devvp->v_specmountpoint on successful mounts
2006-10-24 19:59:52 +00:00
christos 933195ac45 more meaningful variable name. 2006-10-24 19:57:05 +00:00
drochner bffbce1754 import a fix from FreeBSD (rev.1.185):
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count.  This will force the update of
the parent directory's actual link to actually be scheduled.  Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely.  ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
[plus description about problems woth background fsck solved
by this; irrelevant to NetBSD]

For me, the good effect is at least that I'm getting less filesystem
inconsistencies after a crash.

Approved by christos quite a while ago.
2006-10-24 19:36:26 +00:00
drochner 747abe99e5 add zero initializers to make that compile again 2006-10-24 19:16:50 +00:00
cbiere 1d3c56521c Applied patch from PR bin/34790 so that ~/.kshrc is mentioned. 2006-10-24 18:30:25 +00:00
cbiere f105b834ae Applied patches from PR bin/24256 to pass command-line arguments as-is. 2006-10-24 17:33:39 +00:00
he 9ed827d944 The new gcc propagates const-ness from structs to members, so
make local variable const as well.  Avoid writing to the now-const
variable, instead do the masking before in the trapframe register
assignment.

OK'ed by thorpej and nathanw.
2006-10-24 16:53:01 +00:00
oster 7f33898207 Fix a logic bug in the bootblock code.
OK'ed by christos@
2006-10-24 15:56:55 +00:00
gson f43e0dea3d Add missing initializers to placate GCC 4.1-20061021. 2006-10-24 15:32:36 +00:00
itohy fc1ed5259e 3c575CT Ethernet card requires a little more time during reset
and after reset, or the card won't be detected on some machines.
Change the time from 40ms to 50ms.

XXX The card doesn't work correctly yet.
2006-10-24 14:16:39 +00:00
elad d1b4b1326c oops, fix license. (hah!) 2006-10-24 11:53:12 +00:00
tsutsui 49466e5a5e Set RTK_RDESC_CMD_OWN in rtk_cmdstat of RX DMA descriptor after
all other descriptor data is written to avoid possible race condition.
2006-10-24 11:17:49 +00:00
elad 0730babc25 Sync documentation for KAUTH_PROCESS_CANSIGNAL with reality. 2006-10-24 10:23:05 +00:00
hannken 8ea60a7f23 Remove specificdata_setspecific_nowait() as result of discussion on tech-kern.
Add _lwp_getspecific_by_lwp() to get lwp specific data from other lwp's.
Protected by #ifdef _LWP_API_PRIVATE.

Approved by: Jason Thorpe <thorpej@netbsd.org>
2006-10-24 10:05:45 +00:00
gson fb72156a3c Added volatile keyword to variable that might be clobbered by longjmp 2006-10-24 08:29:47 +00:00
mrg 6348cc61a8 regenerate mknative-gcc files for powerpc64-netbsd and GCC 4.1-20061021. 2006-10-24 05:57:31 +00:00
mrg 43ce2a503f avoid shadowing "delay" 2006-10-24 02:48:04 +00:00
mrg 4b539e3eec move a label such that it is only visible in the scopes it is used in. 2006-10-24 02:47:40 +00:00
uwe 07dcd59f52 __pmap_kpte_lookup: verify that ptp is not NULL. 2006-10-24 01:56:33 +00:00
pooka 4f1cd3b286 Apply a little eggwash to a deadlock condition where calling
getnewvnode() while holding on to any vnode lock deadlocks the
system if the file system is being forcibly unmounted.

Normal file systems don't trigger this problem because of two reaons:
1) they don't hold on to vnode locks while idling who-knows-where, so
   the race doesn't trigger
2) they aren't usually unmounted with FORCE; puffs is, in case "someone"
   manages to make a crashy userspace server

Nevertheless, a real solution is slowly being braised.
2006-10-23 23:32:57 +00:00
he ed6e54f4b5 Get rid of the tests with (now) empty bodies, instead just ignore the
return value from sysctl().
2006-10-23 22:42:33 +00:00
he c0c38b0bb7 Complete the initializers. 2006-10-23 22:41:51 +00:00
skrll e90404b342 - mbus_dmamap_create: remove a redundant local.
- mbus_dmamap_sync: restructure/simplify code and add our our version of
  sync_caches that does sync; syncdma; sync. This is now smaller as a
  result.
2006-10-23 21:58:52 +00:00