Commit Graph

167808 Commits

Author SHA1 Message Date
nakayama
868048cf4d SMP support for sparc64 now works, so make GENERIC.MP kernel build
by default.
2008-03-14 16:43:16 +00:00
nakayama
1316ec8115 SMP support for sparc64 now works on some models. 2008-03-14 15:57:14 +00:00
skrll
a21274d611 Pull in some updates for NetBSD/sh gdb from wrstuden-fixsa.
- support siginfo trampoline detection/unwind
- modernise wrt core file regsets
- use inf-ptrace
2008-03-14 15:48:59 +00:00
nakayama
9cfa53b41a #include "opt_multiprocessor.h" 2008-03-14 15:40:22 +00:00
nakayama
8d734e3bd0 Complete per-CPU TSBs and MMU contexts changes. 2008-03-14 15:40:02 +00:00
nakayama
5374009247 Improve FPU state save/clear like x86, idea from OpenBSD. 2008-03-14 15:39:18 +00:00
nakayama
74a205f37a On SMP kernel,
- use "tick" interrupt for per-CPU statclock.
- disable "counter-timer" #1 interrupt and use it as timecounter.
2008-03-14 15:38:36 +00:00
tsutsui
f5506ae261 Enable ETHERCAP_VLAN_MTU. 2008-03-14 15:38:09 +00:00
nakayama
ead4e6f7b9 Improve IPI handling:
- make IPI takes two arguments.
- add IPI event counters per-CPU.
- implement IPI functions which were missing or broken.
- insert DELAY while halting primary CPU in IPI handler.
2008-03-14 15:38:00 +00:00
cube
607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
tsutsui
12a7738525 Don't fetch DMA descriptor after BUS_DMASYNC_PREREAD op. 2008-03-14 13:42:01 +00:00
cube
816c3531d9 Split device_t and softc, catching up with changes of all other ne(4)
variants.
2008-03-14 11:51:06 +00:00
martin
2f30108619 If a cd(4) is attaching on ata instead of scsi, the controller is
the grandparent, not the parent.
2008-03-14 09:44:22 +00:00
martin
df9cb44ea9 Remove a tty_lock for now - I know that this is wrong, but the whole
tty subsystem locking is not consistent and Andrew didn't have
time to come up (or guide to) the right fix.
This prevents machines with serial console on zs(4) from deadlocking on
first input.
2008-03-14 08:23:51 +00:00
mhitch
b6044f13b8 Initial bio(4) support; only volume status is handled. The driver doesn't
yet know about physical drives.  Derived from the OpenBSD ciss(4) bio(4)
support.
2008-03-14 03:30:19 +00:00
ichiro
f742db2180 make compile
- add xenbus_read_ull prototype into include/xenbus.h
2008-03-14 02:17:15 +00:00
bouyer
9cde455f5c Add swedge support to xbd backed, and make the virtual block device handle
sizes larger than 4TB. Tested by Jukka Marin.
Should fix kern/37370.
2008-03-13 22:19:39 +00:00
bouyer
b097a67b1d Implement a C version of splx() in evtchn_do_event(). using plain splx()
here will reenable interrupts as a side effect, and we don't want it here.

It could cause some event handlers to run twice (which should be harmless),
and trap() to be called on the wrong LWP in doreti_checkast (which can
probably cause some damage).
2008-03-13 22:04:57 +00:00
skrll
06c967f126 Modernise NetBSD/alpha gdb - taken from gdb-current.
Add support for siginfo trampolines as well as sigcontext.
2008-03-13 18:18:15 +00:00
drochner
86d10efebd if "ddb_vgapost" is called but its data structures were not initialized,
print a message, suggested by joerg
(the message might be invisible if the console is in X mode)
2008-03-13 17:40:24 +00:00
taca
3a86ada98a Reflect change of PMF_FN_ARGS. 2008-03-13 16:29:48 +00:00
christos
749de7f2a4 Since _file is a short, check that the fd fits in it, otherwise bail with
EMFILE. We treat _file as an unsigned short to double our range, with a
special case for -1 (closed). Make a note of what we should do about stdio
if we ever bump libc. We could change _file in the future compatibly to an
int by putting it in the extension space but for now we don't bother.
2008-03-13 15:40:00 +00:00
pooka
546bf50253 Cache referenced rootvp in struct ukfs. Makes it possible to run
pre/postcall wrapper around the exported namei, since postcall no
longer needs to execute VFS_ROOT (which is a bad thing to do while
potentially holding on to a locked vnode, mmkay).
2008-03-13 14:24:30 +00:00
wiz
08186da791 Fix download-vulnerability-list's -c option. From Jim Bernard in PR 38231. 2008-03-13 08:38:24 +00:00
bjs
c5051ae798 Don't include i810 hack if DRM_NO_AGP is defined, as it results in
an undefined symbol (agp_i810_borrow) at kernel link time.
2008-03-13 05:35:43 +00:00
drochner
3678498d59 -add a function to vga_post which can be called from DDB to get a
usable VGA console ("call ddb_vgapost")
-allow to switch from/to screens occupied by an X server if the graphics
 device is console and in polling mode (ie DDB)
This together allows to get a DDB session on a VGA console if the
system crashed while X11 was running.
As long as the protocol to tell X servers about virtual screen switches
is as primitive as it is, it is unsafe to restart an X session afterwards.
So this is basically for crash analysis.
2008-03-12 23:26:18 +00:00
pooka
e8401439ac Implement all ukfs interfaces (except getdents, that's a bit more
tricky) with the help of rump system calls instead of calling namei
by themselves.  Trust me when I say it was non-trivial to get the
namei calls right.
2008-03-12 21:37:15 +00:00
dyoung
edb53ad207 Use device_t and accessors. 2008-03-12 18:26:58 +00:00
dyoung
84f6ead420 Make some cosmetic changes:
Use fewer 'error = ...; break;' statements and more 'return
        ...;'

        Make the SIOCSIFFLAGS case more clear by using a switch
        statement instead of an if-else if-else chain.

        Shorten a staircase, and remove two unnecessary curly
        braces.
2008-03-12 18:22:24 +00:00
dyoung
0f6e74fc64 epic_stop: clear IFF_RUNNING before disabling. 2008-03-12 18:15:31 +00:00
dyoung
47d2258078 sonic_stop: clear IFF_RUNNING before disabling. 2008-03-12 18:13:15 +00:00
phx
f04ba7d138 Make console drivers support PCI_IOC_CFGREAD/WRITE ioctls. This is useful for
XFree86, which can alternatively find the graphics card through /dev/ttyE0.
Approved by macallan.
2008-03-12 18:11:38 +00:00
dyoung
332191ede5 sf_stop: clear IFF_RUNNING before disabling. 2008-03-12 18:09:56 +00:00
dyoung
7bbfa300c6 Do not use sc_invalid, it is no more. 2008-03-12 18:08:43 +00:00
dyoung
3df2b2feb5 Use device_t and its accessors throughout. Use aprint_*_dev().
Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.
2008-03-12 18:02:21 +00:00
dyoung
15bb494e45 In smap_stop(), clear IFF_RUNNING before disabling the device. 2008-03-12 17:23:13 +00:00
dyoung
f71d8b8379 Cosmetic: use device_t and accessors. Change to ANSI-style
prototypes.  Delete some dead code.
2008-03-12 16:11:23 +00:00
dyoung
677859c28a Print the TPPoll register when the Tx DMA engine doesn't shut down
in the time we allow.
2008-03-12 15:47:49 +00:00
tsutsui
21497ab14b Sync with MI NE2000 changes:
> Split device_t and softc for the NE2000 Ethernet chip and all its variants
> and attachments.  Use device_t accessors, correct types, and ANSIfy when
> appropriate.
2008-03-12 15:07:48 +00:00
pooka
b590aae6d8 Support chdir. This is useful for example when testing and not
wanting to stress namei() so much as test individual ops.
XXX: it should be implemented per calling thread, not per fs.
2008-03-12 14:49:19 +00:00
cube
cf80f73d17 Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments.  Use device_t accessors, correct types, and ANSIfy when
appropriate.
2008-03-12 14:31:11 +00:00
pooka
8ca4306537 Support multiple file systems within one process with ukfs by using
a "chroot" for each file system.
2008-03-12 11:17:33 +00:00
ad
7b0b5fdc9d +2008 for the copyright 2008-03-12 11:05:01 +00:00
ad
2dc7c918f0 A test for the lwpctl preemption counter. 2008-03-12 11:02:21 +00:00
ad
727b89a296 Add a preemption counter to lwpctl_t, to allow user threads to detect that
they have been preempted.
2008-03-12 11:00:43 +00:00
mrg
3db9261484 don't need <sys/tty.h> here. 2008-03-12 05:57:28 +00:00
lukem
471f389be3 Add -I${LIBRUMPDIR} to fix objdir builds. 2008-03-12 05:11:51 +00:00
joerg
d134e844b3 libform and libmenu need libcurses. 2008-03-12 00:21:29 +00:00
dyoung
d347ff7717 Prepare for PMF self-suspension: in the if_stop() methods, clear
IFF_UP and IFF_RUNNING before running the 'disable' step, instead
of after.  Soon I will handle the 'disable' step by calling into
PMF, which may call if_stop(, 0).  Ordinarily, that is harmless.
This change lets the if_stop() routines exit early when they find
on entry that IFF_RUNNING is not set.
2008-03-11 23:58:06 +00:00
dyoung
25cf32ee3d Use device_t and accessors. 2008-03-11 23:19:03 +00:00