Commit Graph

111840 Commits

Author SHA1 Message Date
reinoud 829370d0ee Hack to try to help usermode/i386 by setting the EBX register 2011-08-30 16:06:20 +00:00
bouyer ccc8030189 Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted.
For this, the bpf descriptor is flagged as compat32 (or not) in the
open and ioctl functions (where the user process's pid is also updated
in the descriptor). When the bpf buffer is filled in, the 32bits or native
header is used depending on the information stored in the descriptor.

This won't work if a 64bit binary does the open and ioctls, and then
exec a 32bit program which will do the read. But this is very
unlikely to happen in real life ...

Tested on i386 and loongson; with these changes my loongson can run
dhclient and tcpdump with a n32 userland.
2011-08-30 14:22:22 +00:00
mbalmer 2afb25b13d Add gpio entries, commented out, since I am working with them as modules atm. 2011-08-30 13:07:30 +00:00
mbalmer e55d007450 Attach gpio* at gpiobus? instead of at individual drivers. 2011-08-30 13:03:17 +00:00
bouyer a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
jmcneill 76898e7685 revert previous 2011-08-30 12:13:25 +00:00
reinoud 495f43f820 Implement pmap_clear_reference() 2011-08-30 12:02:38 +00:00
reinoud ba4168da5b Implement pmap_is_referenced() 2011-08-30 11:57:20 +00:00
reinoud 59f6d59a8f Cleanup PV_UNMAGED handling in pmap_do_enter 2011-08-30 11:53:22 +00:00
reinoud f631470629 Make still unimplemented pmap_protect() more verbose 2011-08-30 11:40:46 +00:00
reinoud 3ffaad9127 Implement pmap_page_protect() 2011-08-30 11:31:57 +00:00
reinoud d3eeac5866 Implement pmap_clear_modify() and pmap_is_modified() 2011-08-30 10:58:41 +00:00
reinoud 6661de3650 Implement pmap_destroy() following Ben Harris's template 2011-08-30 10:44:06 +00:00
reinoud a2fba41c1f Implement pmap_reference(). Note that i have no idea as to when this reference
is released...
2011-08-30 10:37:42 +00:00
reinoud c8c7d505af Remove panic that prevented multiple mappings of a pv entry 2011-08-30 10:29:34 +00:00
jruoho bf4d7cb301 Comment out the legacy bktr(4) from the GENERICs. 2011-08-30 08:01:13 +00:00
macallan d9554c19b2 support SIOCG80211NWKEY 2011-08-30 07:54:15 +00:00
mbalmer 86a49d8281 Unconditionally include <sys/modules.h>. 2011-08-30 07:22:11 +00:00
macallan daaec637e7 add WSDISPLAYIO_ADDSCREEN 2011-08-30 07:06:39 +00:00
he 9f84be18ce Bump SYMTAB_SPACE so that it fits again. 2011-08-30 06:49:00 +00:00
macallan b509f991f8 contrary to the manual the right-to-left flag also causes the blitter to
work bottom-to-top
Now all copy*() methods should work properly in all directions.
2011-08-30 02:53:01 +00:00
macallan 241f2dcf8d fix thinko in downward scrolling ( never had a chance to test it until now... ) 2011-08-30 01:21:03 +00:00
dyoung 50eec10ffa Add pci_ranges.c to the set of files compiled when 'pci' is configured. 2011-08-29 22:46:56 +00:00
dyoung cfc495a0e8 Move the code for grovelling in PCI configuration space for assigned
memory & I/O regions into its own module, pci_ranges.c, so that we can
leave it out on systems that won't need it.
2011-08-29 22:46:04 +00:00
dyoung 564aab2b39 Use a loop instead of tail-recursion for the pci_intr(9) overrides.
This is the same change that I just made to the pci(9) overrides.  While
I am here, fix a bug: use PCI_OVERRIDE_INTR_DISESTABLISH instead of
PCI_OVERRIDE_INTR_ESTABLISH for the pci_intr_disestablish(9) override.
2011-08-29 22:41:52 +00:00
joerg 9eba1e423c Use __dead 2011-08-29 20:41:06 +00:00
bouyer 2fba875a58 Add a flags argument to gcscpcib_attach().
Add a flag argument which cause the waychdog to not be attached.
Use it to disable the watchdog on loongson-based platforms, where
the CS5536's reset output is not wired to the CPU reset line :(
2011-08-29 18:34:42 +00:00
bouyer 9f200f93cc Add a INSTALL_LOONGSON kernel with a ramdisk.
build LOONGSON and INSTALL_LOONGSON for evbmips-mip64el
2011-08-29 18:32:18 +00:00
jmcneill 41a1fc0b6b PR# kern/43681: PT_SYSCALL appears to be broken
sys_ptrace: For PT_CONTINUE/PT_SYSCALL/PT_DETACH, modify the p_trace_enabled
flag of the target process, not the calling process.
2011-08-29 17:31:50 +00:00
mbalmer ffbe93dc4f Register as built-in module when compiled wo/ _MODULE. 2011-08-29 15:14:04 +00:00
mbalmer d9fc073d41 Register as built-in module when not compiled as a module. Reminded by
jmcneill.
2011-08-29 15:06:49 +00:00
reinoud 4840e8ce7d Implement read and modify detection code 2011-08-29 14:59:09 +00:00
jmcneill 3076984ffe have pci register itself as a module, and make PCI driver modules depend on it 2011-08-29 14:47:07 +00:00
jmcneill fffda35fbf mem_access_handler: print originating lwp ptr + pid + lid 2011-08-29 13:15:54 +00:00
reinoud e5e1d509fa Dirty commit of machdep.c and cpu.c 2011-08-29 12:46:58 +00:00
reinoud b712430e59 Hack trap for now to upgrade protection.. this really needs fixing soon 2011-08-29 12:42:19 +00:00
reinoud af359ca884 Update pcb and trapframe 2011-08-29 12:37:53 +00:00
reinoud 3e34fed0d4 Update syscall prototype 2011-08-29 12:37:20 +00:00
jruoho b5fcb61237 Fix RCS keyword string. 2011-08-29 11:16:35 +00:00
jruoho df2580b9bc Add Zarlink ZL10353 DVB demodulator (or as it is now know, Intel CE623x). 2011-08-29 11:14:15 +00:00
jmcneill 1f02a7ab53 build pf module with WARNS=3, and remove the need for -Wno-shadow 2011-08-29 09:50:04 +00:00
manu 96c935e33b Add a mutex for operations that touch size (setattr, getattr, write, fsync).
This is required to avoid data corruption bugs, where a getattr slices
itself within a setattr operation, and sets the size to the stall value
it got from the filesystem. That value is smaller than the one set by
setattr, and the call to uvm_vnp_setsize() trigged a spurious truncate.
The result is a chunk of zeroed data in the file.

Such a situation can easily happen when the ioflush thread issue a
VOP_FSYNC/puffs_vnop_sync/flushvncache/dosetattrn while andother process
do a sys_stat/VOP_GETATTR/puffs_vnop_getattr.

This mutex on size operation can be removed the day we decide VOP_GETATTR
has to operated on a locked vnode, since the other operations that touch
size already require that.
2011-08-29 04:12:45 +00:00
rmind 501f07ce79 Add kern.direct_select sysctl. Default to 0 for now. 2011-08-29 00:39:16 +00:00
jmcneill 78c607658a override thunk.d and thunk_sdl.d targets 2011-08-28 23:16:18 +00:00
jmcneill eb0ad8c7a7 let kernel makefile override *.d targets 2011-08-28 23:15:53 +00:00
jym cb1f14140c VIRQ_TIMER virqs are allocated and tracked in a array
(virq_timer_to_evtch, indexed by cpuid) different from the
VIRQ <> event channel one (virq_to_evtch, indexed by event channel ID).

This is fine: fix a "harmless" bug that resulted in the event
channel of VIRQ_TIMER getting lost during bind as it was not stored
in the proper array.

"Harmless" because it is not critical for -current, however in the Xen
save/restore branch this completely cripples restore. Xen clock gets
suspended, but never comes back (fetched channel ID being invalid). Oops.

Add a small comment so we can better see the "get => allocate? => set"
chain of actions when binding/unbinding event channels.
2011-08-28 22:55:52 +00:00
jym 4128291e47 KNF, white spaces and comment typo fixes. 2011-08-28 22:36:17 +00:00
mrg e3a2fad897 apply some always_inline attribute to setpsr and spl*. while i am
not yet sure exactly why this is necessary, but does avoid crashes
seen on sparc INSTALL with gcc 4.5.
2011-08-28 22:30:09 +00:00
jmcneill 61d5347ce8 cpu_reboot: only call thunk_abort if RB_DUMP is set 2011-08-28 21:31:41 +00:00
jmcneill 878807041a turn off input echo and buffering 2011-08-28 21:21:05 +00:00