Commit Graph

97288 Commits

Author SHA1 Message Date
Justin T. Gibbs
91d00a4fce When outputing a code listing, properly display
macros that expand to multiple instructions.
2003-12-17 00:01:11 +00:00
Justin T. Gibbs
708d2cb029 Modify assembler to ignore carriage returns in input.
This should make those using the assembler under cygwin
happy.
2003-12-16 23:54:07 +00:00
Robert Watson
1d1daa2f00 Re-linewrap help file on securelevels in sysinstall: sysinstall is
mostly used on 80x25 displays, and the actual window is about ten
characters narrower than that, resulting in the need for horizontal
scrolling.  No functional change.

RELENG_5_2 candidate.
2003-12-16 22:55:28 +00:00
Søren Schmidt
14d7f69797 Fix compilation on 64bit archs. 2003-12-16 19:41:38 +00:00
Bill Paul
c78ee30919 Implement NdisGetBufferPhysicalArraySize(), which apparently is a
synonym for NDIS_BUFFER_TO_SPAN_PAGES().
2003-12-16 18:56:33 +00:00
Maxim Konovalov
1c86761b2a o IN_MULTICAST wants an address in host byte order.
PR:		kern/60304
Submitted by:	demon
MFC after:	1 week
2003-12-16 18:21:47 +00:00
Scott Long
b4fdd9becf Once upon a time, DEVFS was optional, major numbers where static, and /dev
needed to be statically populated with device nodes.  The first two are no
longer true, which makes the third pretty moot.  In fact, we don't seem to
put device node bits into the distribution archives at all anymore.
So..... remove the god-aweful nasty hack that force unmounted devfs during
installation so that static device nodes could land in /dev.  Now that the
vnode cleaner handles this case better this isn't strictly needed, but
axeing code in sysinstall is almost always benficial.  Thanks to Don Lewis
for pointing out this attribute of sysinstall.
2003-12-16 17:58:24 +00:00
Bruce M Simpson
b6679af8f0 Add device IDs for the Bluetake BW002, yet another Atmel AT76C503A
variant. These are found in a flavour of MiniITX board which I'm
playing with right now.
2003-12-16 17:54:41 +00:00
Jeff Roberson
958557e9c7 - In vget() if LK_NOWAIT is specified we should return EBUSY and not ENOENT.
Submitted by:	Stephan Uphoff <ups@stups.com>
2003-12-16 17:08:27 +00:00
Jeff Roberson
d85213669b - When doing a forced unmount, VFS attempts to keep VCHR vnodes valid by
reassigning their v_ops field to specfs, detaching from the mountpoint, etc.
   However, this is not sufficient.  If we vclean() the vnode the pages owned
   by the vnode are lost, potentially while buffers reference them.  Implement
   parts of vclean() seperately in vgonechrl() so that the pages and bufs
   associated with a device vnode are not destroyed while in use.
2003-12-16 17:05:05 +00:00
Ruslan Ermilov
887cb17fac Print unambiguous paths with -R -v. 2003-12-16 15:17:30 +00:00
Bruce M Simpson
5406529771 style(9) pass and type fixups.
Submitted by:	bde
2003-12-16 14:13:47 +00:00
David E. O'Brien
2572485481 One might want to correctly generate 32-bit code on an Opteron.
Submitted by:	peter
2003-12-16 05:40:06 +00:00
Peter Grehan
7b33c6ef7a Disable the per-vm_page PTE cache. This was not being invalidated
correctly, resulting in the dreaded "vm_pageout_flush: partially
invalid page" panic. The caching issue will be revisited in the
future, but opt for safety over performance in the meantime.

Tested by: gallatin
2003-12-16 03:55:57 +00:00
Tim J. Robbins
ce55c2612c Avoid sign extension when casting signed characters to unsigned wide
characters in ntfs_u28(). This fixes the conversion of filenames containing
single-byte characters with the high bit set.
2003-12-16 01:52:54 +00:00
Bruce M Simpson
458a88207a Purge crmbuf.c as the routines are now in uipc_mbuf.c.
Reviewed by:	sam
Sponsored by:	spc.org
2003-12-15 21:50:45 +00:00
Bruce M Simpson
37621fd5d9 Push m_apply() and m_getptr() up into the colleciton of standard mbuf
routines, and purge them from opencrypto.

Reviewed by:	sam
Obtained from:	NetBSD
Sponsored by:	spc.org
2003-12-15 21:49:41 +00:00
Søren Schmidt
dd8fa07d07 Print the LBA on failing R/W commands. 2003-12-15 20:43:17 +00:00
John Baldwin
c124fa0567 Add a note to say that the ACPI module has been turned back on now.
Requested by:	Joel Ray Holveck <joelh@piquan.org>
2003-12-15 19:19:16 +00:00
Mike Makonnen
8657fd166c Remove _giant_mutex and its associated macros. 2003-12-15 12:38:06 +00:00
Mike Makonnen
2543fd4700 Comment out most of pthread_setschedparam. Pthread priorities didn't
work before anyways, and I didn't want to fix broken code I had no
way of testing. It was necessary however, in order to get rid of GIANT_LOCK.
Pthread priorities will have to wait a little longer to get fixed.
2003-12-15 12:31:46 +00:00
Maxim Konovalov
cf8bfa740b Add a bunch of Russian holidays.
PR:		docs/50013
Submitted by:	osa
2003-12-15 11:51:26 +00:00
Ruslan Ermilov
2fbf6cf055 MFS: Make struct arpcom the first entry in softc. (There are at least
two functions in sys/net/if.c that assume that softc starts with arpcom.)
This makes setting of ethernet address via ifconfig(8) work as expected.
2003-12-15 11:28:15 +00:00
David E. O'Brien
6778cdfd3f Consistently define __LP64__ on all our 64-bit platforms. 2003-12-15 10:34:01 +00:00
Peter Wemm
61cf13a8cf amd64 doesn't define __LP64__ in the compiler, but it definately needs
this definition.  It fixes gnome for starters.  I haven't tried *emacs yet.
Like IA64, amd64 uses registers for the first few arguments and then
the stack for the rest.  This means the 64 bit promotion of the NULL (0)
value is lost and its just pushed on as an 'int' in a varargs call.
When the consumer walks the list and expects to pull off void * pointers
via va_arg, then all hell breaks loose.

Marcel: thanks a million for finding this!
2003-12-15 10:25:18 +00:00
Peter Grehan
ad1c13f493 - The last change conflicted with disks on a live system, as opposed to
the psim simulator. Look for the "file" property which only exists
on psim disks, and as a bonus, print the contents of this at boot-time,
which is the host file being used for the disk image.
- remove remaining warnings.
2003-12-15 09:53:53 +00:00
Mike Makonnen
c830473999 When creating a pthread in the suspended state their were two
problems: (1) The wrong flag was being checked for in the attribute
	  (2) The pthread's state was not being set to indicate it was
	      suspended.

Noticed by: Igor Sysoev <is@rambler-co.ru>
2003-12-15 09:35:02 +00:00
Don Lewis
adb9b459bd Pass MTX_DEF instead of 0 as the last argument to mtx_init().
Submitted by:	Gavin Atkinson <gavin+freebsdc@ury.york.ac.uk>
2003-12-15 01:36:54 +00:00
Greg Lehey
458252a742 initsd: For striped and RAID-[45] plexes, don't restrict the I/O
transfer size to the stripe size.  This is a different
        situation from reviving, where this limitation is necessary.
        In initsd we're simply writing binary zeroes to the entire
        disk, so the only effect of limiting the transfer is to slow
        things down.
2003-12-15 00:45:53 +00:00
Greg Lehey
80d23b9669 free_plex, free_volume: Don't try to destroy the underlying device if
it doesn't exist.  This can occur under
                        certain failure situations.
2003-12-15 00:44:05 +00:00
Greg Lehey
684873a192 vinumclose: Fix day-one bug. Subdisks and plexes were not being
marked closed.  This made it impossible to stop Vinum
	    after explicitly opening a plex or subdisk.
2003-12-15 00:42:03 +00:00
Bill Paul
a417109f1f Silence irritating watchdog timeout messages: if we call
ndis_send_packets() but there's no link yet, we get an immediate
callback to ndis_txeof(), which clears if_timer. But ndis_start()
sets if_timer right after the call to ndis_send_packets(). Set
if_timer before calling ndis_send_packets().

Also fix mutex locking to prevent ndis_txeof() from running in
the middle of ndis_start().
2003-12-14 22:47:01 +00:00
Bill Paul
232d6b73a0 Whups... remove some debug code that accidentally crept in. 2003-12-14 21:33:07 +00:00
Bill Paul
53947bb732 Rework mbuf<->ndis_packet/ndis_packet<->mbuf translation a little to
make it more robust. This should fix problems with crashes under
heavy traffic loads that have been reported. Also add a 'query done'
callback handler to satisfy the e100bex.sys sample Intel driver.
2003-12-14 21:31:32 +00:00
Joseph Koshy
08d4b26dd8 Document the effect of sysctl tunables controlling p_candebug(9) on
ktrace(2).
2003-12-14 14:54:53 +00:00
Sean Chittenden
12335de1f5 Backout ataraid rcng script. I must have missed ar0 in my scan of /dev
after my first reboot because sure enough, I'm seeing it there now and
ata(4) is doing the right thing(TM).

Pointed out by:	des
2003-12-14 13:36:36 +00:00
Sean Chittenden
7e6b2a1467 Add a script that allows software RAID sets to be created before file
systems are mounted.  An example set of entries for /etc/rc.conf:

ataraid_enable="YES"
ataraid_devices="ar0"
ataraid_ar0_set="ad2 ad3"
ataraid_ar0_type="RAID1"

Because there is no "correct" way of doing ATA raid (ie, geom vs.
atacontrol vs. vinum) that is bikeshed proof, this rcng script stays within
the bounds of atacontrol and assumes that other RAID solutions for GEOM or
vinum will end up in a different rcNG script.

Reviewed by:	green
2003-12-14 09:42:02 +00:00
Jeff Roberson
86e1c22aa4 - Assign the ke_cpu field in kseq_notify() so that all of our callers do not
have to do it.
 - Set the ke_runq to NULL in sched_add() before calling kseq_notify().
   Otherwise we may panic in sched_add() if INVARIANTS is on.
2003-12-14 02:06:29 +00:00
Marcel Moolenaar
a8434283fc In set_mcontext(), take into account that kse_switchin(2) will
eventually be passed an async. context as well as a syscall
context.
While here, fix a serious bug in that if the trapframe is a
syscall frame, but we're restoring an async context, we need
to clear the FRAME_SYSCALL flag so that we leave the kernel
via exception_restore.
2003-12-14 01:59:31 +00:00
Bill Paul
ba102043bc Implement a few new NDIS routines: NdisInitAnsiString(),
NdisAnsiStringToUnicodeString(), NdisWriteConfiguration().

Also add stubs for NdisMGetDeviceProperty(), NdisTerminateWrapper(),
NdisOpenConfigurationKeyByName(), NdisOpenConfigurationKeyByIndex()
and NdisMGetDeviceProperty().
2003-12-14 00:43:40 +00:00
Robert Watson
ce41f4bf59 Comment on initgroups.c:1.8: it can prevent users from logging in if
a user has over 16 groups defined.

Reported by:	"Klaus-J. Wolf" <yanestra@web.de>
2003-12-14 00:42:00 +00:00
Poul-Henning Kamp
0a93720637 Fix a locking problem with MD_ROOT_SIZE.
Retire md(4)'s static major number.
2003-12-13 18:12:58 +00:00
Tom Rhodes
a27f75251a Provide a way to deal with rc.conf which may already be populated in certain
cases.
2003-12-13 16:12:55 +00:00
Hidetoshi Shimokawa
c54d1fe2bd Fix panic.
- Don't call sbp_targ_status_FIFO() twice for LOGIN error.
- Don't access login if it's NULL.
2003-12-13 15:33:45 +00:00
Dag-Erling Smørgrav
4358431405 Install a SIGCHLD handler so select(2) will be interrupted when a child
terminates.  Without this patch, 'make -j1 buildworld' takes about 30%
longer than 'make -B buildworld' on my 2.4 GHz P4; the difference is
probably even larger on faster systems.  With this patch, there is no
perceptible difference in wall time between the two.

Submitted by:	bde
MFC after:	3 days
2003-12-13 15:26:27 +00:00
Bill Paul
fc2ada1918 Correct the implementation of NDIS_BUFFER_TO_SPAN_PAGES(). 2003-12-13 09:07:35 +00:00
Bill Paul
153a70182b Support yet another variant of WinXP .INF files. 2003-12-13 08:48:35 +00:00
Paul Saab
591d10119e White space cleanup 2003-12-13 07:54:07 +00:00
Bill Paul
d3eb09f083 subr_ndis.c:
- fix ndis_time() so that it returns a time based on the proper
  epoch (wacky though it may be)
- implement NdisInitializeString() and NdisFreeString(), and add
  stub for NdisMRemoveMiniport()

ntoskrnl_var.h:
- add missing member to the general_lookaside struct (gl_listentry)

subr_ntoskrnl.c:
- Fix arguments to the interlocked push/pop routines: 'head' is an
  slist_header *, not an slist_entry *
- Kludge up _fastcall support for the push/pop routines. The _fastcall
  convention is similar to _stdcall, except the first two available
  DWORD-sized arguments are passed in %ecx and %edx, respectively.
  One kludge for this __attribute__ ((regparm(3))), however this
  isn't entirely right, as it assumes %eax, %ecx and %edx will be
  used (regparm(2) assumes %eax and %edx). Another kludge is to
  declare the two fastcall-ed args as local register variables and
  explicitly assign them to %ecx and %edx, but experimentation showed
  that gcc would not guard %ecx and %edx against being clobbered.
  Thus, I came up with a 3rd kludge, which is to use some inline
  assembly of the form:

	void		*arg1;
	void		*arg2;

	__asm__("movl %%ecx, %%ecx" : "=c" (arg1));
	__asm__("movl %%edx, %%edx" : "=d" (arg2));

  This lets gcc know that we're going to reference %ecx and %edx and
  that it should make an effort not to let it get trampled. This wastes
  an instruction (movl %reg, %reg is a no-op) but insures proper
  behavior. It's possible there's a better way to do this though:
  this is the first time I've used inline assembler in this fashion.

The above fixes to ntoskrnl_var.h an subr_ntoskrnl.c make lookaside
lists work for the two drivers I have that use them, one of which
is an NDIS 5.0 miniport and another which is 5.1.
2003-12-13 07:41:12 +00:00
Bill Paul
7359dfc0b1 Implement some more NDIS and ntoskrnl API calls:
subr_ndis.c: NdisGetCurrentSystemTime() which, according to the
Microsoft documentation returns "the number of 100 nanosecond
intervals since January 1, 1601." I have no idea what's so special
about that epoch or why they chose 100 nanosecond ticks. I don't
know the proper offset to convert nanotime() from the UNIX epoch
to January 1, 1601, so for now I'm just doing the unit convertion
to 100s of nanoseconds.

subr_ntoskrnl.c: memcpy(), memset(), ExInterlockedPopEntrySList(),
ExInterlockedPushEntrySList().

The latter two are different from InterlockedPopEntrySList()
and InterlockedPushEntrySList() in that they accept a spinlock to
hold while executing, whereas the non-Ex routines use a lock
internal to ntoskrnl. I also modified ExInitializePagedLookasideList()
and ExInitializeNPagedLookasideList() to initialize mutex locks
within the lookaside structures. It seems that in NDIS 5.0,
the lookaside allocate/free routines ExInterlockedPopEntrySList()
and ExInterlockedPushEntrySList(), which require the use of the
per-lookaside spinlock, whereas in NDIS 5.1, the per-lookaside
spinlock is deprecated. We need to support both cases.

Note that I appear to be doing something wrong with
ExInterlockedPopEntrySList() and ExInterlockedPushEntrySList():
they don't appear to obtain proper pointers to their arguments,
so I'm probably doing something wrong in terms of their calling
convention (they're declared to be FASTCALL in Widnows, and I'm
not sure what that means for gcc). It happens that in my stub
lookaside implementation, they don't need to do any work anyway,
so for now I've hacked them to always return NULL, which avoids
corrupting the stack. I need to do this right though.
2003-12-12 22:35:13 +00:00