Commit Graph

83552 Commits

Author SHA1 Message Date
thorpej ef731d9e00 - Add a new DRVCTLCOMMAND ioctl to /dev/drvctl. This is a generic
"execute a command" ioctl that takes a dictionary as an argument
  (specifying the command and arguments) and returns a dictionary
  with the results (error code, optional error message, optional
  result data).

- Define and implement a "get-properties" command for DRVCTLCOMMAND
  that returns the properties dictionary of the specified device.

- Add a -p flag to drvctl(8) to fetch and display the properties of
  the specified device.

This is a great example of how to use prop_dictionary_sendrecv_ioctl().
2006-09-22 04:37:36 +00:00
thorpej 6cf1ffe998 Alter the protocol impemented by prop_kern to allow for bi-directional
plist-based messages and to eliminate looping previously required to
receive a plist from the kernel:

- prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl()
  now take the cmd argument rather than the file open flag.  The
  read-ness or write-ness of an ioctl command is checked by these
  routines to ensure that information is being passed to/from the
  userland component properly.

- prop_dictionary_copyout_ioctl() now allocates the memory for the
  XML plist on behalf of the userland component by way of uvm_mmap().
  The XML plist is copied out to the newly-mapped anonymous region,
  and the pointer returned via the plistref.

- prop_dictionary_recv_ioctl() is responsible for munmap()'ing the
  region after parsing the XML plist into internal represenatation.

- A new prop_dictionary_sendrecv_ioctl() is added, allowing user space
  code to send a dictionary to the kernel and receive one back as a
  reply.


Update users of prop_kern for the API changes (Bluetooth).

This constitutes an ABI / protocol change -- but this will also be put
into NetBSD 4.0 so that the first proplib release will implement the new
scheme.
2006-09-22 04:20:23 +00:00
uwe 7e62a1bf65 Don't truncate TEA when we call tlb_exception from sh_vector_generic. 2006-09-21 20:40:16 +00:00
matt 6ec9b8bc84 Define a PHYSMAP_VSID for mapping pa==va. 2006-09-21 18:43:30 +00:00
kochi 2a0acb8ed8 make bootinfo extern from static.
it's declared in arch/ia64/include/bootinfo.h as extern.
2006-09-21 10:06:36 +00:00
kochi 1d1bdfa635 use an appropriate specifier for u_long (%lx) in printf 2006-09-21 09:59:45 +00:00
kochi 6fa19ae830 fix trivial typo in previous revision 2006-09-21 09:58:27 +00:00
jld 754d606748 Protect spec_poll from racing against revocation and thus dereferencing a
NULL v_specinfo.  Mostly copied (with understanding) from rev 1.83's fix
to spec_ioctl, and needed for the same reason (kern/vfs_subr.c r1.231).
2006-09-21 09:28:37 +00:00
jld 1b78265f0e Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
instead of just vnode pointers.  Fixes erroneous "does not match mounted
device" errors from mount(8) in the presence of MFS /dev, init.root, &c.

No objections on tech-kern.
2006-09-21 00:11:30 +00:00
martin 8c0de790f8 Cosmetic nit - print the correct cpu number in the spin up message 2006-09-20 20:09:42 +00:00
kochi c811931057 add cpu_counter.h to compile a kernel 2006-09-20 13:33:04 +00:00
he 9f30ac8956 Get rid of lvalue cast by using a temporary variable of the right type. 2006-09-20 13:03:49 +00:00
manu 876294b403 Proprely convert devices on amd64 2006-09-20 09:54:55 +00:00
tsutsui 292139732b Tweak some debug messages. 2006-09-20 09:37:28 +00:00
tsutsui c44c5152c9 - move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
2006-09-20 09:35:57 +00:00
manu a540ef296e Emulate Linux's /proc/devices 2006-09-20 08:09:05 +00:00
gdamore 7c9507a357 Get rid of annoying and useless missed frame message, no other driver
echos this "non-error" message (not even tulip.c).  Included is an
explanatory message stating that these counters should probably all be
converted to evcnt counters.
2006-09-20 05:37:22 +00:00
cube 295a511be4 Constification. 2006-09-20 05:21:37 +00:00
gdamore 281cced62d Convert mac68k to generic todr. Thanks to Robert Swindells for testing. 2006-09-20 03:40:51 +00:00
uwe 57675076eb Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h
2006-09-20 00:41:11 +00:00
reinoud ce2c68fd18 Make VOP_LOOKUP's O(1) instead of O(n log(n)) giving a speedup of 7500% on
a 1400 file directory.
2006-09-19 23:59:16 +00:00
matt b62d9f714a When mapping the kernel, make to update its segment register to be valid. 2006-09-19 22:15:06 +00:00
elad 6ecd7be983 Lose (void *) casts on the machdep scope authorization wrapper. Update
documentation.
2006-09-19 22:03:10 +00:00
reinoud 4911612931 Fix serious file-corruption issue on sparable partitions. 2006-09-19 22:00:38 +00:00
elad 6a80f03f7b Default callbacks? what are those? remove unused prototypes. 2006-09-19 21:49:25 +00:00
elad 83a5239b28 Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.
2006-09-19 21:42:29 +00:00
plunky 4b7ccf17f9 explicitly disallow changing the config # when the device is enabled. 2006-09-19 20:34:33 +00:00
matt cbdd4e594a At the end of pmap_bootstrap, if PMAP_NEED_MAPKERNEL, map the kernel into
the kernel's pmap (text will be rx, data will be rw).
2006-09-19 20:19:53 +00:00
plunky 661865e783 return errno instead of usbd status 2006-09-19 19:45:48 +00:00
mrg 62f1521a0b - remove some way old FP setup/teardown code
- put the block memcpy/memset inside #ifdef USE_BLOCK_STORE_LOAD which
  is (now) defined.

no functional change, same .o is generated.
2006-09-19 18:42:35 +00:00
mrg 349c05c4c3 re-order the changes in rev 1.217 to give registers a little bit of
time to settle between usage, like it was before hand.
2006-09-19 18:00:27 +00:00
matt 7cac687e36 Generate an intermediate boot.elf with symbols. 2006-09-19 17:51:24 +00:00
elad 3964702f3a For the VBLK case, we always check vfs_mountedon() and it has nothing
to do with the security model used. Move back the call to spec_open(),
which can now return the real return value from vfs_mountedon() (EBUSY)
and not EPERM, changing semantics.
2006-09-19 16:41:57 +00:00
reinoud 49ec3b4779 Fix panic when the sparable table didn't read in correctly. 2006-09-19 15:34:23 +00:00
jmmv 35a9f27221 Fix definition of some options to be 'options<space><tab>' for consistency. 2006-09-19 13:58:55 +00:00
gdamore b7648fa4c0 Convert x68k to timecounters. This conversion is not tested, due to lack
of available test candidates.  It uses the previously unused (as far as I
can tell) Timer D, in freerunning mode.  It only uses a 1/200 prescaler
(20KHz), as anything faster would roll over too fast for the system timer.
(Gotta love 8-bit resolution timers!)  Approved for untested commit by core@.
2006-09-19 10:13:10 +00:00
he fc13afb3a4 Convert the NetBSD/cats port to use generic TODR.
This gets rid of the now-unneded "todclock" and "todservice" attributes
from the footbridge device files, which should allow netwinder to build
again after its conversion to generic TODR.

Resulting kernel verified to boot up OK on gxemul (after my recent
fixes of the gxemul package to emulate free-running timers).
2006-09-19 10:05:32 +00:00
mrg ab182fe706 remove unused dump_rtf_info variable. 2006-09-19 06:43:11 +00:00
mrg f994b6e5d8 - remove a wrong comment.
- add a new entry point for idle called idle_switch that is called by
  cpu_switch() in the MP case when sched_whichqs is zero, properly
  setting up the idle stack.  from petrov@ via martin@.
2006-09-19 02:08:14 +00:00
mrg 46ea89a8f7 remove an always printed debugging message. 2006-09-19 01:54:56 +00:00
mrg bbe604f605 normalise case in some macro values to be all the same (lower case) 2006-09-19 00:55:35 +00:00
simonb efa68b8f30 Fix white-space nit. 2006-09-19 00:50:39 +00:00
mrg ef04c2ddac rework interrupt_vector() slightly:
- for the IPI case, avoid loading the address of intrlev into %g3
- remove some NOT_DEBUG code
- load the interrupt argument #2 in the delay slot

this removes 2 nops during interrupt processing for the normal
case, and an additional 2 ALU instructions for IPIs
2006-09-19 00:15:47 +00:00
mrg 65d0418a4b pmap_bootstrap() gets a bit of SMP help:
- initialise bootcpu->ci_{cpcb,initstack}/proc0paddr from the
	  idle u area.
pmap_extract():
	- make this work on the kernel interrupt stack as well

both of these are from petrov@ via martin@.

pmap_update(): XXX mark the MULTIPROCESSOR call to smp_tlb_flush_all().
2006-09-18 23:56:54 +00:00
gdamore 87f5e200d4 Convert references to "time" to calls to "getmicrotime()", needed for
conversion to timecounters.
2006-09-18 22:10:49 +00:00
gdamore 825211a4f8 Conversion of evbppc to generic TODR. ok freza@ 2006-09-18 22:05:47 +00:00
mrg 9df9d4496c - sparc64_ipi_halt(): we shouldn't return from sparc64_ipi_halt_thiscpu()
so replace a branch with a 'sir'
- in #if 0 code, in sparc64_ipi_flush_pte() and sparc64_ipi_flush_ctx()
  save/restore the out registers that the sp_tlb_flush_xxx() versions
  around calling them
- in sp_tlb_flush_pte() and sp_tlb_flush_ctx(), replace global register
  usage with out registers so that we don't clobber the (alternate)
  global registers when these are called from IPI context
2006-09-18 20:56:44 +00:00
mrg 09003933e7 - remove an extra 'sir' that followed one in a macro
- add some named labels to some spill/fill handlers
- remove 2 unused strings
2006-09-18 20:36:26 +00:00
mrg fa69249c88 remove some prototypes moved to cpu.h. de-static those functions. 2006-09-18 18:47:24 +00:00
reinoud 3b1c762eae Since SPDIF support fo the auixp driver is still half done disable it for
now since some chipset revisions will freak out on the aparent
half-initialisation. Even on my machine i can't seem to get the SPDIF led
to light up so something is wrong.

Also delay the setting of the DMA bits until after the codec detection but
before the enabling of interrupts. Note that the dma has to be explicitly
started when the device is opened.
2006-09-18 15:18:52 +00:00