Commit Graph

27935 Commits

Author SHA1 Message Date
nyan
ac453a7645 MFi386: removed IDE_DELAY option. 2001-09-16 05:24:05 +00:00
nyan
352dfc76e4 MFi386: sys/boot/i386/loader/main.c revision 1.24. 2001-09-16 05:22:51 +00:00
nyan
4e578f4f40 MFi386: sys/boot/i386/libi386/Makefile revision 1.20. 2001-09-16 05:22:27 +00:00
obrien
51c1813267 Fix the improper backout. 2001-09-16 01:05:15 +00:00
obrien
520edaeecc Back out rev 1.38. Even though it saves a little space on the line,
it confuses indent(1).

Requested by:	bde
2001-09-15 23:50:31 +00:00
rwatson
448e9232ac o Correct authorization check in CANSIGIO(), which suffered from incorrect
transcription during the (pcred,ucred) merge; this was not used for
  the kill() system call, so does not affect direct explicit process
  signalling.

Pointed out by:	fenner
2001-09-15 22:34:46 +00:00
obrien
f4750b1066 Allow __FBSDID() to be used without ; 2001-09-15 21:10:25 +00:00
dfr
4f7d5730b0 Rearrange so we search for I/O port space as early as possible (i.e.
before console probing). Also fix a confusion between EFI's page size
which is fixed at 4096 and our own page size which is variable at compile
time.
2001-09-15 18:31:49 +00:00
dfr
573409ef19 Add a fake memory descriptor for the I/O port space. 2001-09-15 18:29:42 +00:00
dfr
d7abcfbcae Avoid the region used for thread0's trapframe when setting up the stack
for ia64_init. If we use this area for ia64_init's stack, it ends up
containing garbage which causes cpu_fork to die horribly later.
2001-09-15 18:23:51 +00:00
nyan
84fc83cc31 Merged from sys/i386/isa/pcaudio.c revision 1.62 (KSE changes). 2001-09-15 15:37:52 +00:00
nyan
664c8246d0 Merged from sys/i386/apm/apm.c revision 1.123 (KSE changes). 2001-09-15 15:33:28 +00:00
dfr
0593e3e8a0 Use the MI console code to initialise the console. 2001-09-15 15:31:59 +00:00
dfr
983e3898da Implement inx() and outx() functions for accessing I/O ports. 2001-09-15 12:30:56 +00:00
dfr
2047d2151b Add ia64_mf_a() which executes an mf.a instruction. 2001-09-15 12:30:19 +00:00
dfr
f270e439ef * Use Intel's EFI headers instead of home-grown ones.
* Use the bootinfo's memory map if present instead of hard-coding SKI's
  memory map.
* Record the location of the I/O Port Space if present in the memory map.
2001-09-15 12:29:46 +00:00
dfr
251ae3c2b1 Allow C++ comments in headers - the EFI headers are full of them. 2001-09-15 12:28:02 +00:00
peter
3a353f88b0 In the devfs case, have initproc attempt the easy cases of mounting /dev.
This works if /dev exists, or if / is read/write (nfsroot).  If it is
too hard, leave it up to init -d (which will probably fail if /dev does
not exist, but there isn't much else we can do short of making a union
mount on /).

This means we get a proper /dev if you boot a 5.x kernel on a 4.x world,
which I happen to do often (the ramdisks on our install netboot servers
have 4.x userland worlds on them).
2001-09-15 11:15:22 +00:00
dfr
01ee11f408 Fill out some gaps in ia64 DDB support. This involves generalising DDB's
breakpoint handling slightly to cope with the fact that ia64 instructions
are not located on byte boundaries.
2001-09-15 11:06:07 +00:00
dfr
5330a2f5be The ia64 kernel is now linked dynamically so parse its _DYNAMIC structure. 2001-09-15 11:02:10 +00:00
yokota
613cff6e43 Handle "identifier strings" right. Each ISA PnP card must have a
mandatory "card" identifier string.  A logical devices on the ISA PnP
card may optionally have a "device" identifier string. Do not confuse
them.

The "card" identifier string is assigned to a logical device as the
default description string when the device is found. (If the "card"
identifier string has not been found, use the EISA PnP ID string.
Strictly speaking, this is an error.)  We will override it when a
"device" identifier string is found later.
2001-09-15 10:18:56 +00:00
mr
fc0a6c1596 Add a wrapper for linux_getsid -> getsid Syscall. 2001-09-15 09:57:30 +00:00
dfr
60a2e27040 Fill in the bootinfo's memory map. 2001-09-15 09:53:56 +00:00
mr
99ae75a097 Implement LINUX_[SEM|IPC]_[STAT|INFO]
to make /compat/linux/usr/bin/ipcs -s happy.

PR:		kern/29698 (part)
Reviewed by:	audit
2001-09-15 09:50:38 +00:00
mr
57403f5f90 Conditionalize building of ex2fs module by WANT_EXT2FS_MODULE 2001-09-15 09:35:10 +00:00
dfr
dc5f37d985 Sync the PCI NIC sections with i386. 2001-09-15 09:09:13 +00:00
dfr
44cdde0e70 Remove dead code. 2001-09-15 08:25:16 +00:00
tanimura
f5b6a4e5d7 Catch up to the last commit of KSE. 2001-09-15 08:14:23 +00:00
peter
2392b3448b Sync some differences that were different between the copies of the files
that were in nfs/nfs.h and nfsserver/nfs.h in the p4 tree.
2001-09-15 04:41:56 +00:00
yokota
fa36559949 Refine ACPI/PnP BIOS probe/attach routines a bit.
- Add workaround for the problematic PnP BIOS which does not assign
  irq resource for the PS/2 mouse device node; if there is no irq
  assigned for the PS/2 mouse node, refer to device.hints for an
  irq number. If we still don't find an irq number in the hints
  database, use a hard-coded value.
- Delete unused ivars.
- Bit of clean up in probe/attach.
- Add PnP ID for the PS/2 mouse port on some IBM ThinkPad models.
2001-09-15 04:38:20 +00:00
msmith
1815e2ca4a Disable devices that are not present; at a later stage we can then enable
them if the device arrives.

This should solve the problem where devices that have been disabled eg. in
the BIOS show up with nonsense resources and hang the bootstrap process.
2001-09-15 04:14:31 +00:00
dillon
db0017d0e3 Add __FBSDID() macro to support rcs identifiers in source files. 2001-09-15 03:41:00 +00:00
imp
47b4d88f66 I don't think pc98 has acpi at all, so ifdef the acpi attachments for
now.
2001-09-15 00:03:32 +00:00
greid
395572e2f3 - Correctly increment the channel refcount in dsp_open() such that it is
no longer possible to unload the driver module while sound is playing
  (which resulted in a panic).
- Fix a similar problem with the sndstat device that I found while looking
  at the above.
- Append a newline character to error messages in pcm_unregister()

Reviewed by:	cg
MFC after:	10 days
2001-09-14 20:26:03 +00:00
mjacob
eb6b3d396e The code that sees a drive (at mount time) not in buffered mode and
attempts to set buffered mode was printing out "unable to set buffered
mode" no matter what. Oops.

Spotted by:	Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
MFC after:	3 weeks
2001-09-14 19:00:51 +00:00
asmodai
a0f990cffc Place CPU_UPGRADE_HW_CACHE in the right section. 2001-09-14 12:32:04 +00:00
asmodai
178f3543e3 Remove pointer to ftp.freesoftware.com. 2001-09-14 12:22:30 +00:00
asmodai
c8a50a32e8 For old gcc/gcc-based compilers and non gcc compilers make sure to
hide the __attribute__ gcc keyword.

Reviewed and helped by:	peter
2001-09-14 11:01:09 +00:00
asmodai
62072c7467 style(9) correct #define's followed by a space to be followed by a tab
instead.

MFC after:	2 weeks
2001-09-14 10:50:11 +00:00
peter
d7a9ef4aa1 Set thread0->td_pcb, this is probably why jake was getting a null deref. 2001-09-14 09:41:26 +00:00
dfr
2168ec3a50 Plug in ELF backend. 2001-09-14 08:28:17 +00:00
dfr
fba6b92ecd Add ELF backend to the build. 2001-09-14 08:27:49 +00:00
dfr
83cd82c3c4 Make this do the right thing (mostly). We should still reserve the pages
that the kernel loads into using the EFI AllocatePages call.
2001-09-14 08:26:00 +00:00
marcel
c727378338 Fix off by one error introduced by the use of the ifnet_byindex()
macro. The commit log clearly states that the index given to the
macro is one higher than previously used to index the array. This
wasn't represented in the code and resulted in kernel page faults.

Reported by: Andrew Atrens <atrens@nortelnetworks.com>
2001-09-14 08:04:25 +00:00
imp
b6aaff7afb Bump version to 500023 to reflect massive changes necessary for the
KSE Milestone 2 commit.
2001-09-14 05:24:50 +00:00
imp
58130a1fd0 Merge sys/isa/sio.c 1.343
KSE changes

Reviewed by: julian, bde, jhb
2001-09-14 05:05:08 +00:00
imp
18728e5844 Merge from sys/dev/syscons/syscons.c 1.373
kse changes

# Note: There are a number of trivial and non-trivial diffs between this and
# sys/dev/syscons/syscons.c that I didn't try to account for.

Reviewed by: julian, bde, jhb
2001-09-14 05:02:12 +00:00
imp
82d5083ea4 Merge from sys/i386/isa/sprk.c 1.50, 1.51
KSE changes and acpi attachment

Reviewed by: julian, bde, jhb
2001-09-14 04:58:30 +00:00
imp
a0b86da6e8 Merge KSE changes from sys/dev/syscons/scterm-sc.c 1.17
# there are more "trivial" diffs in this file that have accumulated over time
# and I didn't try to fix those.

Reviewed by: julian, bde, jhb
2001-09-14 04:54:38 +00:00
imp
83dc9aa764 KSE changes for olpt driver
Reviewed by: julian, bde, jhb
2001-09-14 04:50:27 +00:00
imp
97c9cb2b95 Merged sys/i386/isa/npx.c 1.110, 1.111, 1.112 KSE
Reviewed by: julian, bde, jhb
2001-09-14 04:46:57 +00:00
imp
f5ce39c17a s/thread'/thread's/ 2001-09-14 04:40:44 +00:00
imp
ee0b60ccf1 Changes necessary for KSE world
Reivewed by: julian, bde, jhb
2001-09-14 04:35:50 +00:00
imp
273a4d1187 Merge changes from sys/i386/isa/mse.c 1.56 and other tweaks for KSE
Reviewed by: julian, kde, jhb
2001-09-14 04:34:54 +00:00
imp
9c512364a3 Merge from sys/isa/fd.c 1.221 and a few minor tweaks to make compile
with the post KSE world.

Reviewed by: julian, bde, jhb
2001-09-14 04:30:39 +00:00
imp
c4428a2545 Merge from sys/i386/i386/machdep.c 1.480 (Julian's KSE changes)
Reviewed by: julian, bde, jhb
2001-09-14 04:27:42 +00:00
obrien
1d2d921ea8 Re-apply rev 1.178 -- style(9) the structure definitions.
I have to wonder how many other changes were lost in the KSE mildstone 2 merge.
2001-09-13 22:52:42 +00:00
jhb
82bc2ba4e0 Fix locking on td_flags for TDF_DEADLKTREAT. If the comments in the code
are true that curthread can change during this function, then this flag
needs to become a KSE flag, not a thread flag.
2001-09-13 22:33:37 +00:00
jhb
32d08d4215 Adjust some locking comments. 2001-09-13 22:29:23 +00:00
julian
874cf1f6ad Fix typo.
noticed by: jhb
2001-09-13 22:02:48 +00:00
julian
cea3874b3b fix typo
pointed out by: jhb
2001-09-13 21:59:40 +00:00
julian
cbf26dae08 shift a few flags around.. (physically, not logically) 2001-09-13 21:55:15 +00:00
mr
30b1089d33 PR: kern/29698 (part)
Reviewed by:	audit
Implement SEM_STAT (like IPC_STAT but treats semid as sema-index).
The linuxerator will need it.
2001-09-13 21:06:41 +00:00
mr
2afc0f9696 PR: kern/29698 (part)
Reviewed by:	audit
Add tunables for the sem* and shm* syscontrols for tuning on boottime
until they become dynamic.
SAP R/3 doesn't like the compiled in defaults.
2001-09-13 20:20:09 +00:00
dfr
78bcb999c4 Update code which creates bootinfo. 2001-09-13 12:49:02 +00:00
dfr
7b40715e82 * Enable dynamically linked kernel. This involves adding a self-relocator
to locore to process the @fptr relocations in the dynamic executable.
* Don't initialise the timer until *after* we install the timecounter to
  avoid a race between timecounter initialisation and hardclock.
* Tidy up bootinfo somewhat including adding sanity checks for when the
  kernel is loaded without a recognisable bootinfo.
2001-09-13 12:39:15 +00:00
mr
566e7fc3d3 Add ext2fs module 2001-09-13 08:27:23 +00:00
imp
cd3f175e88 <jkh> "Hey Rocky, watch me eject this pccard outta my laptop!" "What,
again?  That NEVER works!"  "This time for sure!"

Minor overhaul of how we do interrupts for the pci interrupt routing
case to cope with card ejection better (read: make it not hand on so
many cards):
	o Reintroduce func_intr and func_arg and use the to store the
	  interrupt handler to call.
	o Create a pcic_pci_func_intr to call the real interrupt handler
	  iff the card hasn't been ejected.
	o Remove some checks in pcic_setup_intr now that it is used
	  exclusively for isa routed interrupts.
	o Defer the eject event until later too, but make sure we can't
	  do any client driver ISR calling in the interrum.
	o Add some simple code to make sure that we don't attach more
	  than one child.  This should fix pccardd starting twice
	  problem (ala single user -> multi-user when you started pccardd
	  by hand in SU).

MFC: after jkh thinks I've put the crack pipe away.
2001-09-13 08:26:55 +00:00
imp
fea5cf0639 Even better compatibility with 4.x. #define thread proc, since for
this file, that's a reasonable workaround.  Also, include sys/proc.h
for 4.x.
2001-09-13 03:08:19 +00:00
imp
b1f1f4bc91 Better way to do compatibility between the two versions. 2001-09-13 02:12:14 +00:00
imp
f8449a4d63 Fix KSE breakage to this file:
Make it compile again on 4.x.
2001-09-13 01:55:23 +00:00
jhb
b6c24ae1e6 Restore these files to being portable:
- Use some simple #define's at the top of the files for proc -> thread
  changes instead of having lots of needless #ifdef's in the code.
- Don't try to use struct thread in !FreeBSD code.
- Don't use a few struct lwp's in some of the NetBSD code since it isn't
  in their HEAD.
The new diff relative to before KSE is now signficantly smaller and easier
to maintain.
2001-09-12 23:39:36 +00:00
jhb
c1c40c6cff - Whitespace fixes.
- Fix an old bug: p_comm is an array not a pointer, so it can't be NULL.`
2001-09-12 22:32:03 +00:00
jhb
7029820884 Whitespace fix. 2001-09-12 22:16:18 +00:00
darrenr
dbedb20a4e IPFilter munges multicast address packets on the loopback interface.
Submitted by:	Frank Zolf
Approved by:	jkh
MFC after:	0
2001-09-12 22:06:36 +00:00
jhb
c033f80c47 Whitespace fixes. 2001-09-12 22:00:06 +00:00
darrenr
a180ed322d Add IPFLITER.LICENCE to the kernel (requested by rwatson) 2001-09-12 22:00:03 +00:00
jhb
2a7190bd15 Style(9) fixes. 2001-09-12 21:57:30 +00:00
jhb
b7943aa8cf Restore style(9) fixes from commit prior to previous commit. 2001-09-12 21:56:28 +00:00
julian
1bda6a607a If an incoming struct proc could have been NULL before, tehn don't
automatically change the code to add

struct proc *p = td->td_proc;

because now 'td' is probably capable of being NULL too.
I expect to see more of this kind of error during the 'weeding'
process. It's too easy to make. (junior hacker project.. look for these :-)

Submitted by:	mark Peek <mp@freebsd.org>
2001-09-12 20:26:57 +00:00
dfr
e457c6698c A command file for SKI which runs the loader up to the first instruction
of the loaded kernel.
2001-09-12 15:08:49 +00:00
ru
62afc35080 Create backup copies using install(1). 2001-09-12 10:25:50 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
dfr
83e00d4274 Build ficl on all architectures. 2001-09-12 08:35:05 +00:00
dfr
49cae21f8a Add a version of the loader which runs under SKI, the HP ia64 simulator.
This loader is quite functional and can load and run kernels. The kernels
don't quite work right after loading but that should be easily fixable.
2001-09-12 08:34:27 +00:00
gj
1a73f5c1e9 Increase AUTHNAME to 42 bytes for users of T-Online, which requires 41
bytes.

MFC after:	2 weeks
2001-09-12 08:27:54 +00:00
kato
9c673fcc99 Merged from sys/i386/i386/machdep.c revision 1.479. 2001-09-12 08:15:24 +00:00
imp
bacdf7b232 Call pcic_teardown_intr to make sure that we disestablish the
interrupt for the card.

This seems to fix hangs on my machine.

MFC: pending re approval.
2001-09-12 05:57:31 +00:00
marcel
7bf6a0b91b o Fix struct ssc_time and enable the SSC call to get the RTC.
o  Print a message that the TODR is not set in sscclock_set.
2001-09-12 03:31:26 +00:00
peter
1df17fc5a3 Fix the kern.module_path issue that required the trailing '/' character
on each module path component.  Fix a one-byte buffer overflow at the
same time that got highlighted in the process.
2001-09-12 00:50:23 +00:00
dd
0ffe11eeb6 Correct a debugging message. 2001-09-11 12:20:24 +00:00
peter
72f88f6d25 On second thoughts, make kldxref failures non-fatal. 2001-09-11 01:13:49 +00:00
peter
808991de7c Implement the long-awaited module->file cache database. A userland
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files.  I have tested this on both Alpha and i386.

Submitted by:	bp
2001-09-11 01:09:24 +00:00
jhb
fc67023242 - Axe holding_giant as it is not used now anyways and was ok'd by
dillon in an earlier e-mail.
- We don't need to test the console right before we vfprintf() the panicstr
  message.  The printing of the panic message is a fine console test by
  itself and doesn't make useful messages scroll off the screen or tick
  developers off in quite the same.

Requested by:	jlemon, imp, bmilekic, chris, gsutter, jake (2)
2001-09-10 21:04:49 +00:00
dfr
550fb30486 Rename kernel entry point from locorestart to __start. 2001-09-10 15:34:00 +00:00
dfr
5fb7d8a11a Back out the last change - it was made to the wrong Makefile. 2001-09-10 14:47:34 +00:00
dfr
ade9f272a1 * Make a start on a realistic definition for bootinfo.
* Switch to proc0's stack and backing store before calling ia64_init
  so that we don't rely on the loader's stack at all.
* Change kernel entry point name from locorestart to __start.
2001-09-10 13:40:00 +00:00
peter
b8191006ed Fix a warning on alpha (real problem) and make pstat -t work as a bonus.
'struct tty' was out of sync in user and kernel due to dev_t/udev_t
mixups.  This takes advantage of the fact that dev_t changes type in
userland, so it isn't too pretty.
2001-09-10 12:05:47 +00:00
kris
7d13aa56bf Don't call log() without a format string.
MFC after:	2 weeks
2001-09-10 12:00:47 +00:00
sos
88f682cd6b Add kernel side support for DAO burning. 2001-09-10 11:43:20 +00:00
sos
b383ffdffa Add new ioctl's and rearrange a bit for DAO mode support. 2001-09-10 11:42:27 +00:00
dd
afcc728682 Make the nsops' variable in semop' unsigned. This prevents an
overflow if uap->nsops (which is already unsigned) is over INT_MAX;
consequently, the bounds check below becomes valid.  Previously, if a
value over INT_MAX was passed in uap->nsops, the bounds check wouldn't
catch it, and the value would be used to compute copyin()'s third
argument.

Obtained from:	NetBSD
2001-09-10 11:36:08 +00:00
kris
bd6f9cb9b6 Fix some signed/unsigned integer confusion, and add bounds checking of
arguments to some functions.

Obtained from:	NetBSD
Reviewed by:	peter
MFC after:	2 weeks
2001-09-10 11:28:07 +00:00
peter
335f7eeb63 Fix a warning. Dont convert away from const to just re-add it in the
wrapped function.
2001-09-10 10:48:19 +00:00
peter
ad6be0c2bd Fix a warning in bsearch(). Like index() etc, it de-qualifies its
arguments.  Caveat Emptor.  However, the only two consumer of it (cam)
deals with it correctly and preserves the constness.
2001-09-10 10:33:46 +00:00
peter
589893114c Fix a warning. l_name is managed by us and is malloc/free'ed.
It is the userland declaration of l_name that is inconvenient for us.
2001-09-10 07:53:04 +00:00
peter
f52510b076 Add on UPAGES to ki_rssize since it is there as result of the process
and can be swapped out with the process.
2001-09-10 07:29:32 +00:00
dfr
e755df50cd Implement support for MAXMEM option and hw.physmem environment variable
which can be used to artificially reduce the memory size of a machine
for debugging (or other) purposes.
2001-09-10 07:03:59 +00:00
marcel
4ee6142f0a Fix LINT breakage caused by previous commit. The linux_rt_sendsig
and linux_sendsig functions guarded their debugging output with
ldebug(sigreturn). This has been mistaken for a cut-n-paste bug,
and was replaced by ldebug(rt_sendsig) and ldebug(sendsig) resp.
Since the sendsig functions are not syscalls, this brokei any
build that defines DEBUG.

The fix maps both functions to the unused syscall 0 so that they
can be enabled/disabled independently from sigreturn, but not
independently from each other.
2001-09-10 07:00:17 +00:00
peter
51f2eacde0 This will have to be revised, but allow putting 'makeoptions GCC3=true'
in a kernel config file.  This should minimize the tearing-out-hair process
while updating the kernel for gcc-3 compliance.
2001-09-10 06:23:33 +00:00
peter
96b9a12bd2 Rip some well duplicated code out of cpu_wait() and cpu_exit() and move
it to the MI area.  KSE touched cpu_wait() which had the same change
replicated five ways for each platform.  Now it can just do it once.
The only MD parts seemed to be dealing with fpu state cleanup and things
like vm86 cleanup on x86.  The rest was identical.

XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional
stub in place.

Reviewed by:	jake, tmm, dillon
2001-09-10 04:28:58 +00:00
peter
86ba257920 gcc-3 has objections about the bluetrap6 and bluetrap13 inline asm
functions.  Apparently multi-line string asm arguments are deprecated.
2001-09-10 04:22:20 +00:00
peter
fb82fa5364 Fix some malformed macro concatenation that gcc-3 has objections about. 2001-09-10 04:20:34 +00:00
brooks
26bb68b752 Lots of style(9) related white space fixes. Mostly missing spaces
after if, for, while, switch, '{', and '}' plus a bunch of bogus
whitespace at the end of lines.
2001-09-10 02:36:18 +00:00
brooks
2b67e21a9e Add support for monitor mode. This means that after enabling the
correct mode via ancontrol, you can use bpf to sniff raw 802.11 frames.
Who want's to port AirSnort. ;-)

Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com> (author)
		David Wolfskill <david@catwhisker.org> (port to current)
2001-09-10 02:05:10 +00:00
peter
9648bb82ea Remove/comment tokens after #endif (#endif NETATALK) 2001-09-10 01:33:03 +00:00
peter
0eadf02e1c Fix a minor buglet/typo here that gcc3 complains about. 2001-09-10 01:27:23 +00:00
peter
38ebacb983 #endif /* comment */ 2001-09-10 01:23:39 +00:00
iedowse
ddaced1703 The "dirpref" directory layout preference improvements make use of
an array "fs_contigdirs[]" to avoid too many directories getting
created in each cylinder group. The memory required for this and
two other arrays (fs_csp[] and fs_maxcluster[]) is allocated with
a single malloc() call, and divided up afterwards.  However, the
'space' pointer is not advanced correctly, so fs_contigdirs and
fs_maxcluster end up pointing to the same address.

Add the missing code to advance the 'space' pointer, and remove
an unnecessary update of the pointer that follows.

This is likely to fix the "ffs_clusteralloc: map mismatch" panics
that have been reported recently.

Submitted by:		Luke Mewburn <lukem@wasabisystems.com>
2001-09-09 23:48:28 +00:00
imp
9bcbcfd13b When booting verbose, print the config space for this device. This
will help debugging problem systems as it will reduce the number of
commands the user needs to type and send me the output of.
2001-09-09 17:42:58 +00:00
imp
efea72f8e3 If flags were specified for the device, print them in the probe
message.  Some scsi devices have rather elaberate flags, and it is
hard to know which ones were specified in pccard.conf when debug
information only includes the dmesg.
2001-09-09 17:28:02 +00:00
wpaul
3e0a4f6409 regenerate this file too (forgotten after last usbdevs update) 2001-09-09 17:00:32 +00:00
dfr
774ebbef7e Fix some problems with the reference/modified tracking which I introduced
with the last change to the way the pmap_emulate_reference() works. This
should fix a number of memory corruption problems and also should stop the
mtimes of executables changing all the time.
2001-09-09 16:36:59 +00:00
dd
5c5bedf0e5 Use protected variables names in prototypes visible to the userland as
per style(9) and most other header files in sys/.
2001-09-09 14:57:17 +00:00
dd
210985c3bd Add a missing newline to an error message.
PR:		30436
Submitted by:	Joerg Lehners <Lehners@Informatik.Uni-Oldenburg.DE>
2001-09-09 14:48:52 +00:00
dwhite
aed5856aa9 Add support for the Accton USB320-EC Ethernet adapter.
MFC after:	14
2001-09-09 03:08:30 +00:00
dwhite
2cd8d9ae61 Regen. 2001-09-09 03:07:32 +00:00
dwhite
1f8b62fe2e Add entry for Accton USB320-EC Ethernet adapter.
MFC after:	14
2001-09-09 03:07:15 +00:00
marcel
1a83573de8 Correct intended fix to my foul-up.
linux_uid16.c is in sys/compat/linux not in sys/i386/linux.
2001-09-08 23:26:40 +00:00
semenu
8c98d68610 Stole unicode translation table from mount_msdos. Add kernel code
to support this translation.

MFC after:	2 weeks
2001-09-08 23:03:52 +00:00
marcel
22c38894cb Catch up with common usage:
o  Define ELFMAG and SELFMAG as an alternative to test the ELF magic.
   ELFMAG is the magic; SELFMAG is the size of the magic. Use with
   strncmp() or memcmp().
o  Define SHT_NUM as the number of predefined sections.

Note: style(9) deviation for consistency.
2001-09-08 22:59:30 +00:00
semenu
4c1e708040 Fix opening particular file's attributes (as described in man page).
This is useful for debug purposes.

MFC after:	2 weeks
2001-09-08 22:59:12 +00:00
semenu
4d49e9cd2b Reference devvp on ntnode creation and dereference on removal. Previous
code  lead to page faults becouse i_devvp went zero after VOP_RECLAIM, but
ntnode was reused (not reclaimed).

MFC after:	2 weeks
2001-09-08 22:57:03 +00:00
semenu
72ce608646 Fix errors and warnings when compiling with NTFS_DEBUG > 1
MFC after:	2 weeks
2001-09-08 22:53:27 +00:00
peter
9e2e4a1bbe Add linux_sysctl.c, and linux_uid16.c to the x86 platforms. 2001-09-08 22:35:28 +00:00
peter
b3b3a6b1c9 Missing part of dillon's coredump commit. cpu_coredump() was still
passing IO_NODELOCKED to vn_rdwr(), this would cause operations on the
unlocked core vnode and softupdates nastiness if an a.out binary cored.
2001-09-08 22:18:58 +00:00
dillon
d73b3c59f0 This brings in a Yahoo coredump patch from Paul, with additional mods by
me (addition of vn_rdwr_inchunks).  The problem Yahoo is solving is that
if you have large process images core dumping, or you have a large number of
forked processes all core dumping at the same time, the original coredump code
would leave the vnode locked throughout.  This can cause the directory vnode
to get locked up, which can cause the parent directory vnode to get locked
up, and so on all the way to the root node, locking the entire machine up
for extremely long periods of time.

This patch solves the problem in two ways.  First it uses an advisory
non-blocking lock to abort multiple processes trying to core to the same
file.  Second (my contribution) it chunks up the writes and uses bwillwrite()
to avoid holding the vnode locked while blocking in the buffer cache.

Submitted by:	ps
Reviewed by:	dillon
MFC after:	2 weeks
2001-09-08 20:02:33 +00:00
marcel
df61d9eb64 Round of cleanups and enhancements. These include (in random order):
o  Introduce private types for use in linux syscalls for two reasons:
   1. establish type independence for ease in porting and,
   2. provide a visual queue as to which syscalls have proper
      prototypes to further cleanup the i386/alpha split.
   Linuxulator types are prefixed by 'l_'. void and char have not
   been "virtualized".

o  Provide dummy functions for all syscalls and remove dummy functions
   or implementations of truely obsolete syscalls.

o  Sanitize the shm*, sem* and msg* syscalls.

o  Make a first attempt to implement the linux_sysctl syscall. At this
   time it only returns one MIB (KERN_VERSION), but most importantly,
   it tells us when we need to add additional sysctls :-)

o  Bump the kenel version up to 2.4.2 (this is not the same as the
   KERN_VERSION MIB, BTW).

o  Implement new syscalls, of which most are specific to i386. Our
   syscall table is now up to date with Linux 2.4.2. Some highlights:
   -  Implement the 32-bit uid_t and gid_t bases syscalls.
   -  Implement a couple of 64-bit file size/offset bases syscalls.

o  Fix or improve numerous syscalls and prototypes.

o  Reduce style(9) violations while I'm here. Especially indentation
   inconsistencies within the same file are addressed. Re-indenting
   did not obfuscate actual changes to the extend that it could not
   be combined.

NOTE: I spend some time testing these changes and found that if there
      were regressions, they were not caused by these changes AFAICT.
      It was observed that installing a RH 7.1 runtime environment
      did make matters worse. Hangs and/or reboots have been observed
      with and without these changes, so when it failed to make life
      better in cases it doesn't look like it made it worse.
2001-09-08 19:07:04 +00:00
marcel
bc484946ce o Introduce private types for use in linux syscalls for two reasons:
1. establish type independence for ease in porting and,
   2. provide a visual queue as to which syscalls have proper
      prototypes to further cleanup the i386/alpha split.
   Linuxulator types are prefixed by 'l_'. void and char have not
   been "virtualized".

o  Provide dummy functions for all unimplemented syscalls, except for
   the osf1 syscalls. This can only be done if the osfulator
   implements at least all syscalls used by the linuxulator. Remove
   dummy functions for syscalls that are now truely unimplemented.

o  Set the syscall namespace as follows: Mark a syscall as OSF1 if
   the Linux kernel has prefixed the syscall with 'osf_' and has
   provided special implementations for it. Otherwise mark the
   syscall as LINUX by default. Some of the LINUX syscalls remain
   marked as BSD or POSIX.

o  Rename syscalls so they match the names used in the Linux kernel.
   Also, provide more accurate prototypes. This generally improves
   cross-referencing and reduces head-scratching.

o  Fix the (g|s)etresuid syscalls. They mapped to (g|s)etresgid.

o  Sanitize the the shm*, sem* and msg* syscalls. Their prototypes
   were dictated by the way these syscalls were used in the i386
   code. That has been fixed. NOTE: linux_semctl now passes it's
   'arg' parameter by value and not by reference.

o  Fix prototype of linux_utime. It takes a struct timeval, not a
   struct utimbuf.

o  Fix the linux_sysfs syscall. It's index is not 255, but 254.

o  Implement the following syscalls:
     linux_sysctl

o  Add the following new syscalls:
     (g|s)etresgid
     linux_pivot_root (dummy)
     linux_mincore (dummy)
     linux_pciconfig_iobase (dummy)
     linux_getdents64
2001-09-08 18:49:31 +00:00
marcel
85f7b74d7f o Introduce private types for use in linux syscalls for two reasons:
1. establish type independence for ease in porting and,
   2. provide a visual queue as to which syscalls have proper
      prototypes to further cleanup the i386/alpha split.
   Linuxulator types are prefixed by 'l_'. void and char have not
   been "virtualized".

o  Remove dummy functions for syscalls that are now truely
   unimplemented.

o  Rename syscalls so they match the names used in the Linux kernel.
   Also, provide more accurate prototypes. This generally improves
   cross-referencing and reduces head-scratching.

o  Provide seperate implementations for the 16-bit uid_t and gid_t
   based syscalls as Linux used to have. The new 32-bit uid_t and
   gid_t based syscalls now map to their FreeBSD equivalents.

o  Fix the linux_ipc syscall so that it doesn't force the shm*, sem*
   and msg* syscalls to have the same syscall. The prototypes for
   these syscalls now match the those used on Alpha. While here,
   add the same kludge for MSGRCV as is present in the Linux kernel.

o  Implement the following syscalls:
     linux_stat64, linux_lstat64 and linux_fstat64
     linux_sysctl

o  Added syscalls numbered 198 - 221. This include:
     - the 32-bit uid_t and gid_t bases syscalls
     - 64-bit file offset/size based syscalls
2001-09-08 18:48:40 +00:00
iwasaki
936a16ea86 Don't call tsleep from AcpiOsStall(), call DELAY() always instead.
Process switching during calling AcpiOsStall() caused fatal trap 12 at
sleeping/wakeup on some machines.
2001-09-08 17:03:26 +00:00
dfr
6ac93bff0d Add missing entry to memory type name table and adjust field widths. 2001-09-08 12:32:12 +00:00
dfr
72380c0707 Add a command 'memmap' to print out the EFI memory map. 2001-09-08 12:21:37 +00:00
green
841babd11d Convert the CMedia driver to using a device mutex and INTR_MPSAFE. 2001-09-08 05:20:52 +00:00
marcel
ce430d113c Wrap array accesses in macros, which also happen to be lvalues:
ifnet_addrs[i - 1]  -> ifaddr_byindex(i)
        ifindex2ifnet[i]    -> ifnet_byindex(i)

This is intended to ease the conversion to SMPng.

Forgotten by: jlemon
2001-09-08 04:20:45 +00:00
dfr
c981ef049f Add options to select between 4k, 8k and 16k page sizes on ia64. The
default is now 8k.
2001-09-07 11:03:39 +00:00
dfr
5cd3ebd8eb Typo in comment. 2001-09-07 11:01:39 +00:00
dfr
90f6eac893 * Track ref/mod information properly when a mapping changes.
* Fix a panic in pmap_remove() for a non-current pmap.
2001-09-07 11:00:21 +00:00
dfr
db9d3370ef Remove old setjmp/longjmp stubs. 2001-09-07 10:59:05 +00:00
dfr
99af25f895 Hook up the native EFI filesystem reader. 2001-09-07 08:52:53 +00:00
dfr
b750cc500a Set currdev and loaddev variables. 2001-09-07 08:52:26 +00:00
dfr
622326c63f Add a libstand filesystem for accessing EFI native filesystems. 2001-09-07 08:51:48 +00:00
dfr
6f1a1519fd Reformat. 2001-09-07 08:49:47 +00:00
julian
9ade8e4044 Remove some un-needed code that was accidentally included in
the 2nd previous KAME patch.

Submitted by:	SUMIKAWA Munechika <sumikawa@ebina.hitachi.co.jp>
2001-09-07 07:24:28 +00:00
julian
3cc9960fd1 Patches from KAME to remove usage of Varargs in existing
IPV4 code. For now they will still have some in the developing stuff (IPv6)

Submitted by:	Keiichi SHIMA / <keiichi@iij.ad.jp>
Obtained from:	KAME
2001-09-07 07:19:12 +00:00
julian
f307b418db First pass at porting John's "accept" changes to
allow an in-kernel webserver (or similar) to accept
and handle incoming connections using netgraph without ever leaving the
kernel. (allows incoming tunnel requests to be
handled totally within the kernel for example)

Needs work, but shouldn't break existing functionality.

Submitted by:	John Polstra <jdp@polstra.com>
MFC after:	2 weeks
2001-09-07 07:12:51 +00:00
jlemon
c5b125fd9c Fix another shortcircuit return() statement that I missed. 2001-09-07 05:39:47 +00:00
jlemon
fad843fe5a Fix sense of comparison in space test. Also eliminate a compile
warning and remove a previously existing off-by-one error.
2001-09-07 05:32:54 +00:00
msmith
cb3e386fb2 Should check debug.acpi.avoid, not .disable. 2001-09-07 03:54:37 +00:00
green
2939396e31 Correct the path for OsdEnvironment.c. 2001-09-07 03:38:23 +00:00
msmith
477d47f146 Now that this code is MD, we don't need the i386 ifdefs. 2001-09-07 03:00:30 +00:00
msmith
aa26f8f1ff Allow the ACPI subsystem to be disabled with a hint.
Avoid fully initialising the ACPI namespace if we are attempting to avoid
parts of it.  This is a workaround for some systems that still crash
the interpreter.

Implement the ISA_IVAR_LOGICALID for ISA compatibility.  Implement stubs
for other PnP ID-related ivars.
2001-09-07 02:57:29 +00:00
msmith
b6bb56ed4e Move OsdEnvironment.c into MD code; searching for the ACPI tables is not
portable.
2001-09-07 02:55:00 +00:00
msmith
900b040f00 Merge our local branch changes with the 20010831 snapshot. 2001-09-07 02:52:26 +00:00
msmith
47317efb99 This commit was generated by cvs2svn to compensate for changes in r83174,
which included commits to RCS files with non-trunk default branches.
2001-09-07 01:22:25 +00:00
msmith
9d39e615a8 Vendor-branch import of the Intel ACPI CA 20010831 snapshot. 2001-09-07 01:22:25 +00:00
msmith
8ccf25b79d Initialise the adapter status to an invalid state, so that the initial check
of the adapter object will always result in a change event.

This fixes the problem where a laptop booted without an AC adapter ran
at 100% CPU speed by default.

Submitted by:	"Christopher N . Harrell" <cnh@netvmg.com>
2001-09-06 23:33:22 +00:00
jhb
1799601856 Add a hack to acpi_EvaluateInteger() to handle the case of a method
returning a Buffer that contains an Integer rather an an Integer directly.

Submitted by:	msmith
Approved by:	msmith
2001-09-06 23:16:55 +00:00
msmith
ec1ab724cb Allocate system resource IRQs as shareable; this is the typical case. 2001-09-06 22:34:40 +00:00
jhb
054237d0be Call sendsig() with the proc lock held and return with it held. 2001-09-06 22:20:41 +00:00
imp
fc76d31ce4 Don't panic when we don't know the exact chip that is being used.
Also, add support for the following parts:
	O2micro 6912/6972, 6922, 6933
	Cirrus Logic PD6834
	TI PCI-1260 and PCI-1421
MFC: Soon
2001-09-06 20:55:25 +00:00
imp
067e1a9963 Surf the net again and find more device IDs:
Cirrus Logic PD6834
O2micro OZ6836
O2micro OZ6912/6972
O2micro OZ6922
O2micro OZ6933
TI1260			Note: These two aren't on TI's site, but are in
TI1260B			http://www.yourvote.com/pci/vendors.txt

Plus comments for other chips found in Windows INF files, and also
referenced in various spots on the net:

 *   Intel		82092AA		0x12218086	16bit
 *   smc/Databook	DB87144		0x310610b3
 *   SMC/databook	smc34c90	0xb10610b3
 *   Omega/Trident	82c094		0x00940123?
 *   Omega/Trident	82c194		0x01941023
 *   Omega/Trident	82c722		0x07221023?
 *   Opti		82c814		0xc8141045
 *   Opti		82c824		0xc8241045
 *   NEC		uPD66369	0x003e1033
2001-09-06 20:50:10 +00:00
imp
9f52d66759 minor commentary 2001-09-06 20:43:12 +00:00
dfr
a8e78b194e Add struct tags to avoid warnings in kernel code. 2001-09-06 18:11:16 +00:00
sos
7ebc549651 Fix the size of medium code, the old one failed for DVD's.
This might introduce problems on normal CD's (again) sigh...
2001-09-06 17:44:04 +00:00
nyan
126bc821c0 Use MACHINE_ARCH instead of MACHINE to fix pc98 module. 2001-09-06 12:53:53 +00:00
yokota
7f7bf018aa Update the atkbdc, atkbd, and psm drivers to probe/attach
more cleanly and consistently in all APCI, PnP BIOS, and "hint"
cases.

NOTE: this doesn't necessarily solve the problem that the PS/2
mouse is not detected after the recent ACPI update.
2001-09-06 12:09:26 +00:00
sos
d2f14e461c Fix verbose probe message.
PR: 29360
2001-09-06 09:50:25 +00:00
scottl
c8d35d00a7 Don't use a silly test to define INTR_ENTROPY.
Submitted by:	peter
2001-09-06 08:57:51 +00:00
sos
a4f76035a1 Add support for set/getting the region code on DVD drives.
PR: 28604
2001-09-06 08:52:28 +00:00
jlemon
f729fe0a4a Wrap array accesses in macros, which also happen to be lvalues:
ifnet_addrs[i - 1]  -> ifaddr_byindex(i)
        ifindex2ifnet[i]    -> ifnet_byindex(i)

This is intended to ease the conversion to SMPng.
2001-09-06 02:40:43 +00:00
jlemon
32d9aeaf2d Cosmetic cleanups and rearrangement for code to come. There should be
no functional change in this commit.
2001-09-06 00:44:45 +00:00
peter
7681feaabc Sigh. Dig up text from a signature in a 1994 Usenet post I made and redo
the ..uhh... ``console test'' to avoid another 50 emails about GPL issues.
2001-09-05 23:51:06 +00:00
brooks
9a81106528 Attach if_vlan to the build process. 2001-09-05 23:47:46 +00:00
brooks
6fafba46d7 vlan.h is obsolete, don't create it anymore. 2001-09-05 23:47:02 +00:00
brooks
28aafd1768 Deconditionalize vlan support. 2001-09-05 23:33:58 +00:00
brooks
115d713955 Update tx(4) to always enable vlan(4) support.
Approved by:		semenu
2001-09-05 23:04:53 +00:00
imp
7a8588e685 Patric Gualat tells me that I can't do basic bit math. He's right.
When either bit 3 or 4 is set, we need to *SET* bit 5, not clear it in
the card control register.  This makes TI PCI-1030, 1130 and 1131 not
work anymore without this fix.

MFC: soon
2001-09-05 22:26:14 +00:00
brooks
096b80272c Don't specify the number of vlan interfaces any more, they are created
at runtime.
2001-09-05 21:19:56 +00:00
brooks
7da2447808 Make vlan(4) loadable, unloadable, and clonable. As a side effect,
interfaces must now always enable VLAN support.

Reviewed by:	jlemon
MFC after:	3 weeks
2001-09-05 21:10:28 +00:00
scottl
06023d7a89 Bring the aac driver *much* closer to style(9).
Reviewed by:	ken
2001-09-05 20:43:02 +00:00
jhb
684261300a Include <sys/_lock.h> for the definition of struct lock_object. Don't
understand why this wasn't added when _mutex.h was added.

Noticed by:	jlemon
2001-09-05 18:19:09 +00:00
jlemon
c05780a8fc Remove superfluous statement. 2001-09-05 17:05:19 +00:00
cg
9d8a805762 add a method for recording of specific channels for devices with more than
one hardware record channel.  new devices, /dev/dsprX.Y where X is unit
number and Y is channel index.
2001-09-05 16:28:41 +00:00
obrien
5f2415a1e9 style(9) the structure definitions. 2001-09-05 16:20:30 +00:00
cg
1a16a8c5cb don't try to dump nonexistent data when recording 2001-09-05 14:49:44 +00:00
dfr
b0318c4f62 Merge linker set relocations with the rest. 2001-09-05 13:36:41 +00:00
peter
da827f5fba It is the last-second trivial changes that kill me every time.
Fix nested comment. :-(

Submitted by:	obrien
2001-09-05 05:35:42 +00:00
obrien
0e8186d4dc style(9) the structure definitions. 2001-09-05 05:18:35 +00:00
yokota
fb9afad90e Rework the ISA PnP driver pnp and the PnP resource parser to fix
the following bugs.

- When constructing a resource configuration, respect the order
  in which resource descriptors are read, in order to establish
  the correct mapping between the descriptors and configuration
  registers.
  "Plug and Play ISA Specification, Version 1.0a", Sec 4.6.1, May 5,
  1994.  "Clarifications to the Plug and Play ISA Specification,
  Version 1.0a", Sec 6.2.1, Dec. 10, 1994.

- Do not ignore null (empty) descriptors; they are valid descriptors
  acting as filler.
  "Clarifications to the Plug and Play ISA Specification, Version 1.0a",
  Sec 6.2.1.

- Correctly set up logical device configuration registers for null
  resources.
  "Clarifications to the Plug and Play ISA Specification, Version 1.0a"

- Handle null resources properly in the resource allocator for the
  ISA bus.
2001-09-05 03:54:33 +00:00
peter
5bf117ddc5 Attempt to refine the __IDSTRING() macros so that they dont collide with
each other.  This will allow multiple __RCSID() entries in the same file
and even __RCSID() in headers.  **HOWEVER**, the usefulness of this in
headers is somewhat marginal in non-ELF since they would go into the
data section where they cannot be easily compressed or stripped.
It (id's in headers) is also not useful in the non-GCC case since it is
hard to generate unique variable names.  I have an idea on that though.

Now for mcs: http://mirrors.ccs.neu.edu/cgi-bin/unixhelp/man-cgi?mcs+1
2001-09-05 02:50:32 +00:00
obrien
34ad4938d7 style(9) the structure definitions. 2001-09-05 01:36:46 +00:00
obrien
2f864814ff Fix the definition generation code from rev 1.15 that generates non-style(9)
compliant structure definitions.
2001-09-05 01:27:53 +00:00
obrien
40da6b02e6 style(9) the structure definitions. 2001-09-05 01:22:14 +00:00
obrien
138bfe8027 Style(9) 2001-09-05 01:06:28 +00:00
brooks
c1c22aa958 Add cloning support for the tap(4) device similar to that in the tun(4)
device.

Submitted by:   Maksim Yevmenkin <myevmenk@digisle.net>
2001-09-05 01:06:21 +00:00
wpaul
4c891359ca Regenerate. 2001-09-04 22:00:49 +00:00
wpaul
618942d5c6 Add support for the BCM5401 and BCM5411 10/100/1000Mbps copper gigE PHYs.
This basically updates the brgphy driver to support 10/100 modes in
addition to 1000Mbps modes.
2001-09-04 22:00:33 +00:00
mjacob
a073ff8672 I don't know what I was thinking- if I have two separate busses on on
SIM (as is true for the 1280 and the 12160), then I have to have separate
flags && status for *both* busses. *Whap*.

Implement condition variables for coordination with some target mode
events. It's nice to use these and not panic in obscure little places
in the kernel like 'propagate_priority' just because we went to sleep
holding a mutex, or some other absurd thing.

Remove some bogus ISP_UNLOCK calls. *Whap*.

No longer require that somebody do a lun enable on the wildcard device
to enable target mode. They are, in fact, orthogonal. A wildcard open
is a statement that somebody upstream is willing to accept commands which
are otherwise unrouteable. Now, for QLogic regular SCSI target mode, this
won't matter for a damn because we'll never see ATIOs for luns we haven't
enabled (are listening for, if you will). But for SCCLUN fibre channel
SCSI, we get all kinds of ATIOs. We can either reflect them back here
with minimal info (which is isp_target.c:isp_endcmd() is for), or the
wildcard device (nominally targbh) can handle them.

Do further checking against firmware attributes to see whether we can,
in fact, support target mode in Fibre Channel. For now, require SCCLUN
f/w to supoprt FC target mode.

This is an awful lot of change, but target mode *still* isn't quite right.

MFC after:	4 weeks
2001-09-04 21:53:12 +00:00
mjacob
444444fb66 Note for ATIOs returned because of BDRs or Bus Resets for which bus this
applies to.  Do more bus # foo things.

Acknowledge Immediate Notifies right away prior to throwing events upstream
(where they're currently being ignored, *groan*)

Capture ASYNC_LIP_F8 as with ASYNC_LIP_OCCURRED. Don't percolate them
upstream as if they were BUS RESETS- they're not.
2001-09-04 21:48:02 +00:00
mjacob
1cce258334 If we're on an interrupt stack, mark things so that we don't try
and cv_wait for mailbox commands to complete if we start them from
here.

Fix residuals for target mode such that we only check the residual and
set it in the CTIO if this is the last CTIO (when we're sending status).

MFC after:	4 weeks
2001-09-04 21:45:57 +00:00
mjacob
b3abf4db3b I don't know what I was thinking- if I have two separate busses on on
SIM (as is true for the 1280 and the 12160), then I have to have separate
flags && status for *both* busses. *Whap*.

Implement condition variables for coordination with some target mode
events. It's nice to use these and not panic in obscure little places
in the kernel like 'propagate_priority' just because we went to sleep
holding a mutex, or some other absurd thing.

MFC after:	4 weeks
2001-09-04 21:33:06 +00:00
imp
de46a25377 Don't report power interrupts. 2001-09-04 20:10:23 +00:00
imp
e53cbcb019 MFS: put debug writes behind boot verbose. 2001-09-04 20:08:33 +00:00
mjacob
252e9ce275 Fix SET_IID_VAL/SET_BUS_VAL macros to usable.
MFC after:	4 weeks
2001-09-04 19:42:13 +00:00
iedowse
44040d9261 Fix a memory leak in __getcwd() that can occur after a filesystem
has been forcibly unmounted. If the filesystem root vnode is reached
and it has no associated mountpoint (vp->v_mount == NULL), __getcwd
would return without freeing 'buf'. Add the missing free() call.

PR:		kern/30306
Submitted by:	Mike Potanin <potanin@mccme.ru>
MFC after:	1 week
2001-09-04 19:03:47 +00:00
imp
6035e77df9 Make the csc and function interrupts ISA on shutdown. This should
help with the hanging problem on reboot.  Note: we need to do the
other things as well.  Also, turn off the bits in the stat change
interrupt mask and the cardbus interrupt mask as well in an attempt to
shut off all interrupt sources.
2001-09-04 17:46:31 +00:00
wpaul
67ffe2e203 Add support for Conexant LANfinity miniPCI controllers. People who have
laptops with this chip should test this and report back as I don't have
access to this hardware myself. People with -stable systems should try
the patch at:

	http://www.freebsd.org/~wpaul/conexant.patch.gz

Submitted by:	Phil Kernick <Phil@Kernick.org>
2001-09-04 17:10:11 +00:00
iwasaki
878a79c3e6 Reenable RTC interrupts after wakeup. Some laptops have a problem
with system statistics monitoring tools (such as systat, vmstat...)
because of stopping RTC interrupts generation.
Restore all the timers (RTC and i8254) atomically.

Reviewed by:	bde
MFC after:	1 week
2001-09-04 16:02:06 +00:00
sos
c4a32defbf Remove long overdue obsolete file ide_pcireg.h 2001-09-04 15:52:00 +00:00
sos
b96ac482b2 There is no option IDE_DELAY and havn't been for a long time.. 2001-09-04 15:50:46 +00:00
iwasaki
9230460351 Add `-I.' option to CFLAGS so that we can compile asm code together
with `-nostdinc' option.
2001-09-04 15:46:32 +00:00
iwasaki
a19dd226fc Just print a message in acpi_tz_monitor() only when new active state
is different from the previous active state.
This reduce tons of 'acpi_tz0: _AC0: temperature 64.0 >= setpoint 64.0'
messages.

Reviewed by:	msmith
2001-09-04 15:40:12 +00:00
alfred
7ffd260ead Fix sysctl comment field, s/the the/then the
Pointed out by: ru
2001-09-04 15:25:23 +00:00
dfr
feff1475b3 Enable bootforth. 2001-09-04 14:48:59 +00:00
dfr
838d91e725 Avoid an alignment fault on 64bit architectures.
Reviewed by: dcs
2001-09-04 13:13:12 +00:00
peter
bea02ebe6c Mostly cosmetic. Move various variables from .s files to .c files so that
gdb generates debug info for them.
2001-09-04 11:05:33 +00:00
obrien
70210b8344 style(9) the structure names 2001-09-04 09:23:23 +00:00
dfr
31b78d3bf3 Make sure we copy over the linker set sections to the EFI executable. 2001-09-04 08:59:38 +00:00
dfr
07738f1f32 Add definition for arch-ia64. 2001-09-04 08:51:15 +00:00
dfr
64c5352bc7 Add ia64 system dependancies. 2001-09-04 08:50:23 +00:00
peter
16c92cf0c3 Zap #if 0'ed map init code that got moved to the MI area.
Convert the powerpc tree to use the common code.
2001-09-04 08:42:35 +00:00
peter
119d201aab Nuke #if 0'ed "setredzone()" stub. We never used it, and probably
never will.  I've implemented an optional redzone as part of the KSE
upage breakup.
2001-09-04 08:36:46 +00:00
phk
cd1c70dfaa Kill the NCCD constant by modernizing the ccd driver.
Submitted by:	sobomax
Reviewed by:	phk
2001-09-04 08:33:30 +00:00
grog
98d26ed691 Remove an accidentally forgotten #ifdef. This could cause depletion
of mutexes if a lot of plexes are created and destroyed.
2001-09-04 06:30:05 +00:00
julian
8208e8ca4f MFS: change name of sysctl to something more diplomatic. 2001-09-04 06:29:35 +00:00
imp
4ef4acca33 Kill init_t type, and minor white space changes to match original -stable version 2001-09-04 05:57:00 +00:00
imp
6b5eb4a0bd Add support for changing the way that ToPIC csc interrupts are routed.
# Note: The ToPIC 100 and the ToPIC 97 datasheets are in disagreement
# as to if this bit is supposed to be set or cleared to enable INTA routing
# so I made my best guess.

Also, comments about the various chipsets, including some grumpy ones
about how vague the O2micro datasheets are.
2001-09-04 05:50:08 +00:00
imp
b2ea2b171b Move to using a chip function + function pointers to deal with the
function and csc interrupt routing path (eg, ISA or PCI) so that we
can more easily switch between the two.

When we don't have a card ISR, put the function interrupt into ISA
mode.  This effectively masks the interrupt since it happens once, and
not again until we have an ISR.  This should help hangs, and might
help people that unwisely update the kernel w/o updating pccardd.
This is done at mapirq time.

Force CL-PD6729/30 to use ISA interrupt routing and maybe even detect
the number of pccard slots properly (this is still WIP).  We aren't
going to support PCI interrupts for this release.  A future release
should support them, however.  Shibata-san's 3.3V fixes are not
included.

Add a hack which should, in i386, rewrite IRQ 0 cardbus bridges to be
IRQ 255, which should cause interrupts to be routed.  This is mostly
untested since my one tester disappeared after reporting nothing
changed.

Implement, but do not use, a power method called cardbus.  It looked
like a great way to get around the 3.3V problem, but it seems that you
can only use it to power cardbus cards (I get no CIS when I enable it,
so maybe we're programming things bogusly).

GC the intr and argp stuff from the slot database.

Improve the ToPIC support with the power hacks that Nakagawa-san
published in FreeBSD Press and that Hiroyuki Aizu-san ported to
-stable.  The ToPIC hacks were for 3.3V support in ToPIC 100, but it
looks like the '97 also has identical registers, so use them too.

Add some #defines for the cardbus power stuff.

Finally implement making CSC on the Ricoh chips ISA or PCI.  This will
allow polling mode to work on vaios, I think.

Add some minor debugging.  This should likely be cleaned up or put
behing a bootverbose.

Some of this work, and earlier work, was influanced by Chiharu
Shibata-san's power handing patches posted to bsd-nomads:15866.

MFC: Soon, if possible.
2001-09-04 04:47:58 +00:00
non
4512b6c39a We should not pass the size of the memory to bus_alloc_resource().
We should use 1 to request default iomem.

Pointed-out-by: imp
2001-09-04 04:32:48 +00:00
imp
f492deda52 Values for the Toshiba ToPIC's Function Control Register.
These were lifted from Nakagawa-san's article in FreeBSD Press, as
well as posts from hiroyuki Aizo-san and Chiharu Shibata-san.
2001-09-04 04:30:04 +00:00
jake
9d49b96aed Add rwindow.c, forgotten earlier. 2001-09-04 01:18:39 +00:00
jake
19f993b903 Make this compile. 2001-09-04 01:17:39 +00:00
jake
7cffb02347 Remove some stale definitions and update for new assembler code. 2001-09-03 23:19:18 +00:00
jake
63fd66633f Add ktr traces to copy{in,out} and cpu_switch.
Context switch the cwp value.  The register usage in cpu_switch will
be updated shortly to better reflect the fact that the current window
may change.
2001-09-03 23:18:02 +00:00
jake
653a513c7f Add comments following what other architectures have.
Fiddle the register values in the trapframe so children returning from
fork() return 0 (and success).
2001-09-03 23:15:54 +00:00
jake
f9d393e059 Change tf_arg to uintptr_t from void * to reflect the fact that
non-pointer values may be passed in it.  Add appropriate casts.

The interrupt type is now passed in tf_arg instead tf_type.
2001-09-03 23:13:42 +00:00
jake
e317d982f6 Implement a slightly different window spill/fill algorithm for dealing
with user windows in kernel mode.  We split the windows using %otherwin,
but instead of spilling user window directly to the pcb, we attempt to
spill to user space.  If this fails because a stack page is not resident
(or the stack is smashed), the fault handler at tl 2 will detect the
situation and resume at tl 1 again where recovery code can spill to the
pcb.  Any windows that have been saved to the pcb will be copied out to
the user stack on return from kernel mode.

Add a first stab at 32 bit window handling.  This uses much of the same
recovery code as above because the alignment of the stack pointer is used
to detect 32 bit code.  Attempting to spill a 32 bit window to a 64 bit
stack, or vice versa, will cause an alignment fault.  The recovery code
then changes the window state to vector to a 32 bit spill/fill handler
and retries the faulting instruction.

Add ktr traces in useful places during trap processing.

Adjust comments to reflect new code and add many more.
2001-09-03 23:10:45 +00:00
jake
c0bffaa6e1 Move the alternate global register stack to struct globaldata. 2001-09-03 22:58:05 +00:00
jake
e6fc6fd6cd Add ktr traces. 2001-09-03 22:57:21 +00:00