Commit graph

28139 commits

Author SHA1 Message Date
John Baldwin f955d6dc66 Don't attempt to initialize the pcaudio device on open. The attach routine
already does the initialization (though it didn't set pca_initialized, so
we always initialized twice) and since attach calls make_dev(), there's no
way that pcaopen() can be called before pcaattach().
2001-10-08 23:35:40 +00:00
John Baldwin 74e4502e62 Replace 'curproc' with 'td->td_proc'. 2001-10-08 21:05:46 +00:00
John Baldwin 2a89a48fbd Allow atomic ops to be somewhat safely used in userland. We always use
lock prefixes in the userland case so that the binaries will work on both
SMP and UP systems.
2001-10-08 20:58:24 +00:00
Doug Rabson a3490d55d1 Make printtrap() more informative. 2001-10-08 20:21:04 +00:00
Matthew Dillon 917efbaaba WS Cleanup 2001-10-08 19:51:13 +00:00
Mark Peek f379be7abf Page align the data segment. 2001-10-08 10:43:34 +00:00
Cameron Grant a791cfee44 use pcm_getbuffersize()
only creat a mic recording channel if the codec supports it
2001-10-08 06:10:39 +00:00
Cameron Grant 50388172c5 use pcm_getbuffersize()
use seperate dma tags for buffers and control info
2001-10-08 06:01:13 +00:00
Cameron Grant 39dbd126c7 use pcm_getbuffersize() 2001-10-08 05:59:54 +00:00
Marcel Moolenaar 8daca20f62 s/alpha/${MACHINE_ARCH}/g 2001-10-08 01:41:45 +00:00
Mark Peek 351bd3334f Add a call to init_param() to initialize some necessary variables. 2001-10-08 00:44:21 +00:00
Matthew Dillon 962922dcd2 Remove panics for rename() race conditions. The panics are inappropriate
because the IN_RENAME flag only fixes a few of the huge number of race
conditions that can result in the source path becoming invalid even
prior to the VOP_RENAME() call.  The panics created a serious security
issue whereby an attacker could fairly easily cause the panic to
occur, crashing the machine.

The correct solution requires a great deal of work in the namei
path cache code.

MFC after:	0 days
2001-10-08 00:37:54 +00:00
Cameron Grant 82ab7a3bc2 * register the correct number of channels
* include hw buffer size in sndstat info
2001-10-07 23:31:52 +00:00
Cameron Grant a9d2ee22ac use mixer channel numbers, not channel masks- this should fix sb/sbpro mixer
problems.
2001-10-07 23:28:34 +00:00
Doug Rabson e4ef1eb797 Implement inline versions of ntohl etc. 2001-10-07 21:09:35 +00:00
Dag-Erling Smørgrav 3da3249106 Dissociate ptrace from procfs.
Until now, the ptrace syscall was implemented as a wrapper that called
various functions in procfs depending on which ptrace operation was
requested.  Most of these functions were themselves wrappers around
procfs_{read,write}_{,db,fp}regs(), with only some extra error checks,
which weren't necessary in the ptrace case anyway.

This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c
(renaming it to proc_rwmem() in the process), and implements ptrace()
directly in terms of procfs_{read,write}_{,db,fp}regs() instead of
having it fake up a struct uio and then call procfs_do{,db,fp}regs().

It also moves the prototypes for procfs_{read,write}_{,db,fp}regs()
and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files
except procfs_machdep.c as "optional procfs" instead of "standard".
2001-10-07 20:08:42 +00:00
Dag-Erling Smørgrav 23fad5b6c9 Always succeed if the target process is the same as the requesting process. 2001-10-07 20:06:03 +00:00
Dag-Erling Smørgrav 26c293c7ee These flags aren't just for procfs - in fact, these days theye are primarily
used by ptrace(2) - so tweak the accompanying comments a little.
2001-10-07 19:47:37 +00:00
Dag-Erling Smørgrav 080cf92b85 Remove some useless preprocesor paranoia. 2001-10-07 19:41:19 +00:00
Dag-Erling Smørgrav 8d5f9fac24 In procfs_readdir(), when the directory being read was a process directory,
the target process was being held locked during the uiomove() call.  If the
process calling readdir() was the same as the target process (for instance
'ls /proc/curproc/'), and uiomove() caused a page fault, the result would
be a proc lock recursion.  I have no idea how long this has been broken -
possibly ever since pfind() was changed to lock the process it returns.

Also replace the one and only call to procfs_findtextvp() with a direct
test of td->td_proc->p_textvp.
2001-10-07 19:37:13 +00:00
Doug Rabson e0e2fed358 * Use srlz.i to serialise changes to psr.ic
* Don't enable psr.i at the same time as psr.dt and psr.ic

These changes improve stability considerably.
2001-10-07 18:40:01 +00:00
Matt Jacob 1c3749836f Add some somewhat vague documentation for this driver and a list
of Hardware that might, in fact, work.
2001-10-07 18:26:47 +00:00
Doug Rabson a067d21032 Make the interrupt routing a bit less chatty unless bootverbose is set. 2001-10-07 18:25:43 +00:00
Matt Jacob 71793c0dc4 Some patches from Doug for ia64 support- the principle one being the
appropriate cache flush that provides MEMORY_BARRIER in between handoffs
between host && RISC processor for the shared memory request/response
queues.

Submitted by:	dfr@nlsystems.com
2001-10-07 18:18:50 +00:00
Luigi Rizzo 7d4b046991 Export interrupt statistics via sysctl.
MFC-after: 3 days
2001-10-07 17:03:56 +00:00
Ian Dowse c6cd7661ed Mention that ed requires miibus.
Suggested by:	Eugene Grosbein <eugen@grosbein.pp.ru>
2001-10-07 16:39:40 +00:00
Ian Dowse 80f42b555d Fix a typo in do_sigaction() where sa_sigaction and sa_handler were
confused. Since sa_sigaction and sa_handler alias each other in a
union, the bug was completely harmless. This had been fixed as part
of the SIGCHLD changes in revision 1.125, but it was reverted when
they were backed out in revision 1.126.
2001-10-07 16:11:37 +00:00
Doug Rabson ca11f4e176 Remove bogus include. 2001-10-07 14:20:01 +00:00
Benno Rice 225845627b Whitespace fixes. 2001-10-07 13:27:27 +00:00
Benno Rice a6bfff4582 Add new files needed by previous commit. 2001-10-07 13:24:56 +00:00
Benno Rice cae2c81dc2 Mega-patch for OpenFirmware loader support.
- Flesh out ofw_readin routine.
- Add OpenFirmware load and exec routines.
- Make sure memory allocation for the kernel is done correctly.
- Change the way the heap is allocated so as to make it easier to deallocate
  when we hand over.
- Add a command to print memory maps similar to the one for ia64.

With this patch, I can now load and hand over to a kernel on my iMac.  There
are some problems with OpenFirmware routines failing after the hand over that
still need to be addressed.
2001-10-07 13:22:25 +00:00
Yoshihiro Takahashi f2eeb19063 Rewrite the pc98 bus_space stuff.
The type of bus_space_tag_t is now a pointer to bus_space_tag structure,
and the bus_space_tag structure saves pointers to functions for direct
access and relocate access.

Added bsh_bam member to the bus_space_handle structure, it saves access
method either direct access or relocate access which is called by
bus_space_* functions.

Added the mecia device support. If the bs_da and bs_ra in bus tag are set
NEPC_io_space_tag and NEPC_mem_space_tag respectively, new bus_space stuff
changes the register of mecia automatically for 16bit access.

Obtained from:	NetBSD/pc98
2001-10-07 10:04:18 +00:00
Robert Watson c175d2226f o Introduce an 'options REGRESSION'-dependant sysctl namespaces,
'regression.*'.
o Add 'regression.securelevel_nonmonotonic', conditional on 'options
  REGRESSION', which allows the securelevel to be lowered for the purposes
  of efficient regression testing of securelevel policy decisions.
  Regression tests for securelevels will be committed shortly.

NOTE: 'options REGRESSION' should never be used on production machines, as
it permits violation of system invariants so as to improve the ability to
effectively test edge cases, and improve testing efficiency.
2001-10-07 03:51:22 +00:00
Marcel Moolenaar 946c6b9978 Regen. 2001-10-07 00:21:18 +00:00
Marcel Moolenaar dd73368406 Fix the NODEF entry for setpgid() so that it matches the NODEF
entries in sys/kern/syscalls.master.
2001-10-07 00:20:08 +00:00
Luigi Rizzo 06bd2f9c81 Make this compile again after the changes to make bridge kld'able 2001-10-07 00:18:48 +00:00
Marcel Moolenaar 49ead724c6 Fix breakage caused by previous commit. The lkmnosys and lkmressys
syscalls are of type NODEF but not in a way that fits the given
definition of that type. The exact difference of lkmressys and
lkmnosys is unclear, which makes it all the more confusing. A
reevaluation of what we have and what we really need is in order.

Spotted by: Maxime Henrion <mux@qualys.com>
Pointy hat: marcel
2001-10-07 00:16:31 +00:00
Matt Jacob cd37f56f5a Misunderstanding documentation caused me to try and set 1Gbps/2Gps/Auto
connection speed for the 2300 in the wrong offset in the ICB. Oops.

Respect some QLogic errat wrt PCI errors on certain shared host/RISC registers.
2001-10-06 20:41:18 +00:00
Matt Jacob 3bd4033010 Whups- remember to zero the isr pointer arg. 2001-10-06 19:34:43 +00:00
Matt Jacob db4fa023f8 Respect QLogic's errata- read BIU_ISR even on the 2300
to see if there's an interrupt (avoids PCI parity errors
which can occur on the 2312 if you access some registers
from the host at the same time the RISC on the 2312 is
C accessing them).

MFC after:	1 day
2001-10-06 19:19:24 +00:00
Yoshihiro Takahashi 31b2da2bea - Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h.
(bus_dma.h is repo-copied from bus_at386.h)
- Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
2001-10-06 16:27:21 +00:00
Doug Rabson e2676403d8 Move console probes until after we set boothowto so that 'boot -h' works. 2001-10-06 16:06:48 +00:00
Doug Rabson d0ad824d68 Assume round-to-nearest mode for floating point. 2001-10-06 15:57:22 +00:00
Doug Rabson bb94354d67 Enable console. There are far too many 'ifdef __i386__' in this file. 2001-10-06 13:34:30 +00:00
Doug Rabson c4e7b7e2e0 Put the label at the same place as i386 for compatibility. 2001-10-06 12:35:22 +00:00
Søren Schmidt 8975eded26 Update with latest ATA/ATAPI ver 6 rev 2 items. 2001-10-06 11:07:04 +00:00
Doug Rabson 300634ffe0 Delete legacy pcib code - we can't possibly work without acpi on ia64. 2001-10-06 10:09:57 +00:00
Doug Rabson 8022a260d2 Remove nexus_pcib.c. 2001-10-06 10:09:14 +00:00
Marcel Moolenaar 18819cbb5c o Change ia64_memory_address to explicitly take a u_int64_t
o  Add memcpy_fromio, memcpy_io, memcpy_toio, memset_io,
   memsetw and memsetw_io. I'm not sure this is the right
   place for it, though.
2001-10-06 09:31:43 +00:00
Marcel Moolenaar 885f6ac360 Make this compile on ia64. 2001-10-06 09:27:43 +00:00