Commit Graph

107864 Commits

Author SHA1 Message Date
pooka
b0bfbf33ac When the client and the rump kernel are the same host process, all
threads blocking in the kernel automatically exit when the process
exists.  However, for the sysproxy case this does not hold.
Typically it's ~harmless, but e.g. in the case of socket binding
following by poll it gets annoying.

Introduce sysproxy procexit, which wakes up all threads blocking
on a condition when a process's communication socket is closed.
The code is a little different from the regular kernel simply
because in a rump kernel l_mutex is not available at all times
(this is because scheduling happens on every kernel entry and exit,
and that path must be kept lockless for any reasonable performance).
Instead, use gating which makes sure all threads are either out of
the cv code or suspended in a well-known state.  Then, wake up the
threads and tell them to get the hell out of our galaxy.
2011-01-12 12:51:21 +00:00
nisimura
9fb96e0290 - remove duplicate an opt include line.
- restore a lost indent.
2011-01-12 07:38:43 +00:00
jym
c7b98903de Introduce "vifname" keys for Xen domains. Its value is the interface
name for the vif, e.g. xvif(4) for dom0, and xennet(4) for domU.

ok bouyer@.

See http://mail-index.netbsd.org/port-xen/2011/01/11/msg006405.html
2011-01-11 23:22:19 +00:00
jruoho
013c599031 Restore the interrupt level in cpu_reboot() before calling the
acpi_enter_sleep_state() function.
2011-01-11 21:10:17 +00:00
jruoho
c2df94f224 Disable all GPEs when entering S5. Also add a comment that the function
acpi_enter_sleep_state() must be called with interrupts enabled.
2011-01-11 20:35:24 +00:00
jruoho
049e68f4dd Use pmf_device_register1(9) and add cpu_shutdown(), which calls cpu_suspend(). 2011-01-11 18:25:25 +00:00
tsutsui
bb43e1b7cf ANSIfy. 2011-01-11 16:19:38 +00:00
kefren
6469d79cd6 add advlock to rumpfs, ok pooka@ 2011-01-11 14:05:32 +00:00
kefren
2f07b81209 add advlock to puffs. ok pooka@
should fix kern/43321
2011-01-11 14:04:54 +00:00
nisimura
30ae008b2a step forward to MODULAR sandpoint kernel. disabled until all work gets done. 2011-01-11 13:29:09 +00:00
gsutre
98737943bc As said in the comment (lines 327-336), we must make sure that
we don't overwrite valid data when moving the symbol and string
tables.

Assume for instance that the boot-loader left us with:

  +--------------+   +--------+     +--------------+
  | string table |   | kernel |     | symbol table |
  +--------------+   +--------+     +--------------+

The new addresses computed by lines 338-359 (here, it's really
lines 344-345) will move the tables so that they end up as:

                     +--------+--------------+--------------+
                     | kernel | symbol table | string table |
                     +--------+--------------+--------------+

The current version (rev. 1.20) will, however, first copy the
string table and then the symbol table.  But the copy of the
string table will overwrite the symbol table (see the pictures).

The old code (rev. 1.19) uses the right order of table copy to
make sure that we don't overwrite one table when moving the
other.  Here, we simply restore this behavior.  This makes
multibooting from GRUB2 work again (for MONOLITHIC).

ok jmcneill@
2011-01-11 12:24:37 +00:00
pooka
8d1e86d12d Apply patch from PR kern/44369 by Wolfgang Stukenbrock. 2011-01-11 10:52:42 +00:00
pooka
0de1b73a11 KASSERT we don't return back to userspace with the kernel lock held. 2011-01-11 10:49:20 +00:00
nisimura
88e9af105e make sure to have 32B aligned descriptor array. 2011-01-11 10:10:48 +00:00
nisimura
25f1d04e74 always have even numbered descriptors to avoid ones belong to Tx/Rx
share the same cacheline even for 32B cacheline CPU. These six are
provisional code stocks and untested.
2011-01-11 09:45:25 +00:00
pooka
a05de63f6b Ensure that a) loopback attaches after all the domains have attached
b) loopback is configured only after it has attached.

makes tests/net/if_loop work again
2011-01-11 09:24:05 +00:00
pooka
68ede6388b Add one more component level to networking: IFCFG.
It is executed after IF and the purposes to guarantee the right
order in cross-component interface address configuration.
(e.g. lo0 is attached by net but 127.0.0.1 is configured by netinet)
2011-01-11 09:22:32 +00:00
nisimura
7b058564f1 move module load address printf() to show the correct value. Still
some more work.
2011-01-11 08:19:34 +00:00
nisimura
1c813b2944 add MODULAR loading facility. Disabled for now 'til it gets ready to use. 2011-01-11 08:04:14 +00:00
nisimura
192fab1859 move set_xfermode() call to set PIO0 before the initial drive
identification.
2011-01-11 07:01:21 +00:00
nisimura
1655c840ce add btinfo_modulelist for MODULAR component loading. 2011-01-11 06:57:35 +00:00
jym
2d351d332f Typo fix. 2011-01-11 01:21:32 +00:00
macallan
bcebe4e063 use config_finalize_register() instead of config_interrupts() to detect the
codec and attach audio. For some reason we run into a locking panic with
config_interrupts().
Tested on my SS20
2011-01-11 00:49:50 +00:00
dyoung
d92d0c4971 Don't compute tags over cxgb, its symbols clash too often with symbols
in other drivers and subsystems.
2011-01-11 00:36:03 +00:00
dyoung
93c928cfb9 Regen. 2011-01-11 00:14:41 +00:00
dyoung
4e03721aef Add Intel 82599 product IDs. 2011-01-11 00:13:03 +00:00
jakllsch
7c834707a3 When we fail to read a block computing the matching hash,
it's nice to know what device and why.

Also, drop comment that hasn't been valid since 1.12.
2011-01-10 21:26:38 +00:00
phx
12b3b97cc9 Try to increase compatibility with all controllers when reading the status. 2011-01-10 20:18:19 +00:00
phx
82908c64ed Accept "wd[N[p]]:" (with N=disk and p=partition) for specifying a disk drive. 2011-01-10 20:16:42 +00:00
phx
7232363c11 Do not crash, but use "netbsd" as default file name when missing. 2011-01-10 20:14:52 +00:00
phx
812c3a1ea3 Make disk-booting work on Synology by using a PIO ATA-read command (0x20)
instead of the DMA read command (0xc8). This should work for all platforms.
Included the soft-reset in the siisata driver.
2011-01-10 20:13:47 +00:00
phx
900029be74 Try to detect Iomega Storcenter board (untested). 2011-01-10 18:35:49 +00:00
jruoho
322f6c439c Regen. 2011-01-10 17:04:55 +00:00
jruoho
93da29999d Add SMO1200 (yet another TPM chip). From ThinkPad x201i. 2011-01-10 17:04:22 +00:00
tsutsui
834608599b - start.S
add a hazard nop so that prom_restart() works properly on MIPS1
  (it seems broken since initial revision and had been restarted by fault?)

- common.h
  export prom_restart()

- if_prom.c
  use prom_restart() instead of a direct PROM call (that should be equivalent)
2011-01-10 17:01:17 +00:00
jruoho
d76ace19e9 Bump iomem_ex_storage from 16 to 64. Based on analysis from joda@:
http://mail-index.netbsd.org/current-users/2010/10/01/msg014446.html

Discussed with mrg@ and jmcneill@.
2011-01-10 16:59:09 +00:00
tsutsui
2916fd3fce Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)
2011-01-10 16:43:29 +00:00
tsutsui
157a6dd44c Indent instructions in BDslots. 2011-01-10 15:25:44 +00:00
tsutsui
e18f71c901 - specify .set noreorder to fill BDslots properly
- indent instructions in BDslots
2011-01-10 15:25:15 +00:00
cegger
e5bfaecf68 add missing break 2011-01-10 14:19:36 +00:00
christos
8ce31bfb43 namespace protect sigqueue and sigqueueinfo 2011-01-10 13:56:44 +00:00
phx
7a4bf1d4d4 Some new information and cleanup. 2011-01-10 13:45:57 +00:00
tsutsui
3ce80fd791 Use ether_aton_r() in sys/net/if_ethersubr.c instead of home grown copies.
Hint from ryo@.  Tested on IP32 mec(4).
2011-01-10 13:29:29 +00:00
jmcneill
5263a998f9 ppb_fix_pcix changes:
- rename to ppb_fix_pcie
- support version PCI-E 2.0
- print version and device/port type information
- use constants from pcireg.h instead of magic numbers

changes:

  ppb2 at pci0 dev 21 function 0: vendor 0x15ad product 0x07a0 (rev. 0x01)
  ppb2: unsupported PCI Express version

to:

  ppb2 at pci0 dev 21 function 0: vendor 0x15ad product 0x07a0 (rev. 0x01)
  ppb2: PCI Express 2.0 <Root Port of PCI-E Root Complex>
2011-01-10 12:23:21 +00:00
tsutsui
7bb48ed5ab Don't call bus_dmamap_load(9) and bus_dmamap_sync(9) on command xfers
if (AT_READ|AT_WRITE) in ata_c->flags is set but ata_c->bcount is zero.
Someone actually tries to put such a command and it causes
DIAGNOSTIC panic in x86/bus_dma.c:_bus_dmamap_sync().
I think bus_dma(9) API itself may allow calls with mapsize==0
but there are many MD code that asserts offset>=mapsize or len==0.

The problem is reported and fix is confirmed by Takuro KUBOTA
with XEN DOM0 kernel (which has options DIAGNOSTIC).
2011-01-10 11:18:14 +00:00
cegger
e1f9b2b091 fix typo in ioctl definition 2011-01-10 11:13:03 +00:00
hannken
b89d0815aa Add layer_revoke() that adjusts the lower vnode use count to be at least as
high as the upper vnode count before passing down the VOP_REVOKE().

This way vclean() check for active (vp->v_usecount > 1) vnodes gets it right.

Should fix PR kern/43456.
2011-01-10 11:11:03 +00:00
jruoho
2304727048 Small clean-up in the match and attach functions. Namely, use the attach
args instead of referencing the global softc. No functional change.
2011-01-10 09:07:27 +00:00
christos
fb4e945aa5 regen 2011-01-10 04:42:24 +00:00
christos
3d70c4b47c implement sigqueueinfo 2011-01-10 04:39:18 +00:00
christos
27d3c8f911 add sigqueue. 2011-01-10 04:38:37 +00:00
phx
93f78709c7 fixed message: "is found" -> "was found" 2011-01-09 22:59:40 +00:00
tsutsui
dd6122d404 Misc cleanup:
- use DPRINTF() style debug printf
- KNF and ANSIfy
- fix space/TAB botch
- remove extra newlines
2011-01-09 16:55:13 +00:00
tsutsui
eae5c43d18 Check if `enet' environment variable is available before reference to
get MAC address, and exit with appropriate warning messages if it isn't.
My 3MIN doesn't set the variable by default and netboot fails silently.
Also tidy up code that converts strings to enaddr.
2011-01-09 16:28:40 +00:00
jruoho
f640132d0b Convert aprint_error(9) to ACPI_DEBUG_PRINT. 2011-01-09 16:22:07 +00:00
jruoho
1b00e79140 Remove also rest of the ACPI_DEVICE_POWER checks. 2011-01-09 16:15:25 +00:00
jruoho
930b9f2eb4 After consulting jmcneill@, set the state to D0 ("on") upon shutdown and
detach. A safety measure so that we do not accidentally fry anything.
2011-01-09 15:43:20 +00:00
jruoho
37f5de3ab8 Add a dummy-driver for ACPI fans. 2011-01-09 15:12:33 +00:00
jruoho
019ba6b902 Use acpi_power_register() for consistency. No functional change. 2011-01-09 14:58:10 +00:00
jruoho
1dee4ee9e2 We use config_defer(9) now when scanning power resource and wake-up
capabilities, so do not fail in acpi_power_register() if ACPI_DEVICE_POWER is
not set in struct acpi_devnode::ad_flags.
2011-01-09 14:56:06 +00:00
is
ea61b20fd5 some more 8187B variants. From OpenBSD 2011-01-09 14:30:36 +00:00
pooka
574a31f2de Shortcircuit remote 0-len copyin/out already in the kernel. 2011-01-09 14:12:37 +00:00
pooka
35e989d694 accept '\0' as a valid string 2011-01-09 13:49:57 +00:00
jruoho
7ce8997e79 Don't use SYSCTL_SETUP in a driver. 2011-01-09 13:01:03 +00:00
pooka
9a17e75e0e Autoconfigure 127.0.0.1 for lo0.
(testing bind/connect/etc. is now possible on a virgin rump kernel
without the need to ifconfig anything)
2011-01-09 12:22:34 +00:00
pooka
284c651488 Separate interface init and domain adding. 2011-01-09 12:20:53 +00:00
pooka
74e0a75b03 Allow multiple RUMP_COMPONENT() in one file. 2011-01-09 12:20:10 +00:00
jruoho
c40255f958 Print a message if ACPI 4.0 functionality is present (in which case the
driver should be updated).
2011-01-09 09:47:55 +00:00
jruoho
a134245aa1 Remove APM. (Already commented out.) 2011-01-09 08:05:47 +00:00
jruoho
74a4ee7fc0 Rearrange (use two tabs). 2011-01-09 05:06:17 +00:00
jruoho
f422341f8e Regen. 2011-01-09 04:59:00 +00:00
jruoho
04e39f05b5 Add INTC0102 (Intel TPM chip). From ThinkPad T500. 2011-01-09 04:58:34 +00:00
kochi
90a1aa9207 Try reading MAC addr from register if it fails to read from EEPROM.
Copied from FreeBSD driver.

Without this my JMC261 doesn't get MAC address properly.

OK'ed by bouyer@
2011-01-09 00:12:45 +00:00
is
6d77db8f4e Realtek 8187B 2011-01-08 22:02:49 +00:00
christos
f79b6ffa09 Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.
2011-01-08 20:37:05 +00:00
christos
27ec421326 fix sysctl again. 2011-01-08 20:29:13 +00:00
pooka
712b80467f SIGPIPE is generated internally by the kernel, so include it in
the list of "no panic" sigs.
2011-01-08 14:01:04 +00:00
tsutsui
71bca1aa09 Update some items to reflect reality. 2011-01-08 09:44:37 +00:00
pooka
6d44fb2799 Do a minidehumanizenumber for RUMP_MEMLIMIT. Now you can set it
to e.g. 16m instead of having to type out 16777216.
2011-01-08 09:40:05 +00:00
jym
4c59a64111 Move if_xname setting earlier for xvif creation, so we can grab domid
and handle values sooner for error cases.
2011-01-08 05:23:19 +00:00
christos
b9d27ca2f7 PR/44340: Brian Buhrow: Raid sets containing wedges cannot be unconfigured
and reconfigured without a reboot.
2011-01-07 19:52:18 +00:00
jmcneill
0e137f7821 fix compilation when _MODULE is not defined 2011-01-07 18:24:53 +00:00
jmcneill
c82905f94c add hdaudio and hdafg modules 2011-01-07 15:32:11 +00:00
jmcneill
4608557aab modularize hdaudio and hdafg drivers 2011-01-07 15:30:29 +00:00
pooka
3a382dc397 Avoid double init of tty_lock if rumpkern_tty is included. LOCKDEBUG
does not tolerate double inits.

pointed out by njoly
2011-01-07 15:10:22 +00:00
tsutsui
38b3ed96cc Put .set noreorder so that BDslots are properly filled. 2011-01-07 14:50:27 +00:00
cegger
21fd508d09 use aprint_error_dev 2011-01-07 14:08:29 +00:00
pooka
f9736ee54f Censor no-longer-relevant flags which may be passed down from
somewhere (e.g. an older kernel).  We really can't do anything
about new flags or flags changing meaning, though.
2011-01-07 11:27:53 +00:00
pooka
46b37b0509 regen: fix PARAMASK 2011-01-07 11:25:43 +00:00
pooka
b5ac5e4fe9 fix PARAMASK 2011-01-07 11:25:10 +00:00
jmcneill
413c4ec645 support building cas(4) as a module 2011-01-07 11:17:22 +00:00
jakllsch
0e590a108e Add schide(4). 2011-01-07 00:31:34 +00:00
jruoho
ef2b108701 Fix a comment. 2011-01-06 18:57:22 +00:00
tsutsui
28707b7779 Move pmap_aliasmask initialization from pmap_bootstrap.c
to machdep.c:hp300_init() before the first pmap(9) use.
2011-01-06 14:19:54 +00:00
tsutsui
1e4ed35788 Use #ifdef CACHE_HAVE_VAC rather than #ifdef M68K_MMU_HP where
the pmap code indends.
(though currently only MMU_HP machines have VAC in pmap_motorola ports)
2011-01-06 13:49:16 +00:00
pooka
97936d4ea0 antipasto 2011-01-06 13:36:48 +00:00
tsutsui
9e8faec263 Move VA allocation of ledbase to leds.c just before pmap_enter(9)
to reduce MD quirk in pmap_bootstrap.c.
2011-01-06 13:25:32 +00:00
pooka
04056e47b5 give the outside world some idea of if we have LOCKDEBUG or not 2011-01-06 13:09:17 +00:00
tsutsui
3012955196 Move bootinfo address initialization to locore.s and machdep.c
to reduce MD quirks in pmap_bootstrap.c.
Also print bootinfo_pa in consinit() so that we can see
at least MMU is properly enabled after boot.

Tested on HP382.
2011-01-06 13:03:47 +00:00
pooka
cd73d116db Support LOCKDEBUG. To use it, compile sys/rump with RUMP_LOCKDEBUG=yes.
requested by martin (sparc64 gdb cannot reliably produce a stack trace)
2011-01-06 11:22:54 +00:00