Commit Graph

104305 Commits

Author SHA1 Message Date
skrll e15992e310 Fix and use the BSS macro. 2010-03-08 07:42:46 +00:00
mrg 27c8110c67 - when given "boot -1", apply the !MULTIPROCESSOR cpu_match() criteria.
- don't print cache sizes * associativity.  this has been wrong for years.
2010-03-08 04:18:48 +00:00
pooka 6ee30969d0 Make rump devfs expose ttyU1 and dtyU1 as well. 2010-03-07 17:44:40 +00:00
pooka 2408ca4cf0 tweak previous to actually work 2010-03-07 16:55:44 +00:00
pooka b89595d78e pmf wants buf_syncwait() which is a part of optional vfs 2010-03-07 16:46:10 +00:00
jdc 03d5670940 s/delay/need_delay/ to get rid of shadowed variable warning (some
ports define delay in machine/param.h).
2010-03-07 11:28:46 +00:00
msaitoh 844288483e Add forgotten commit (IGP3_KMRN_DIAG_PCS_LOCK_LOSS). 2010-03-07 11:07:01 +00:00
msaitoh 71e3d68d0e Fix the type of sc_ss. That is not bus_space_handle_t but bus_size_t.
Reported by jdc.
2010-03-07 10:11:04 +00:00
plunky 04e2ab6ae6 add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
    - (cross-)build tested all these kernels
2010-03-07 09:39:42 +00:00
kiyohara 1067f44885 Reorder included headers. 2010-03-07 09:29:26 +00:00
kiyohara edd541011a Add options GUMSTIX_NETBSD_ARGS_CONSOLE and GUMSTIX_NETBSD_ARGS_BUSHEADER.
Can specify arg 'console='(*new*) and 'busheader=' from u-boot.  These args
  use dynamically configuration.
Also change function name.  s/_line/_liner/.
2010-03-07 09:18:51 +00:00
msaitoh b15cf397d8 - Add code for WOL, ASF, IPMI and Intel AMT.
- wm_enable_wakeup() is disabled by default. If you want to use WOL with
      the Magic Packet, define WM_WOL.
    - Add the following flags:
        WM_F_ASF_FIRMWARE_PRESENT
        WM_F_ARC_SUBSYSTEM_VALID
        WM_F_HAS_AMT
        WM_F_HAS_MANAGE
        WM_F_WOL
    - Add wm_suspend() and wm_resume(). Give/get the control to/from the
      firmware.
    - Need more work for PCH. See wm_enable_phy_wakeup().
- Enable wm_get_hw_control() for 82574 and 82583.
- Add Yet another workaround for ICH8.
    - Add wm_igp3_phy_powerdown_workaround_ich8lan() for power down problem
      on D3.
2010-03-07 09:05:19 +00:00
skrll a00ee37509 Shut astro up if DEBUG defined. 2010-03-07 08:56:07 +00:00
skrll 552862ce56 Whitespace. 2010-03-07 08:44:28 +00:00
msaitoh c70d45b7a4 Add two workarounds for ICH8 with igp3.
- Workaround for 82566 Kumeran PCS lock loss.
- WOL from S5 stops working.
2010-03-07 07:53:37 +00:00
kiyohara ef3d09f0de Assorted spelling/capitalization fixes from Igor Sobrado in PR kern/22595. 2010-03-07 07:33:29 +00:00
msaitoh 51ecd033ec Add the detach code. 2010-03-07 07:09:00 +00:00
mrg 34df0cc276 need _ALIGN in locore.h as well, for DEBUG kernels. 2010-03-07 01:52:44 +00:00
mrg 5de4293bf6 gas has supported SPARC ".empty" for a long while; get rid of an
ancient workaround.
2010-03-07 00:42:08 +00:00
plunky c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
mrg bc1d221669 move the memcpy/memset implementations out into their own file, with the
block copy versions as well.  move some of the definitions in locore.s
into a new locore.h.

locore.s is almost 2000 lines shorter with this change.
2010-03-06 23:26:10 +00:00
plunky 4677f8289f add major device for usho(4) driver 2010-03-06 21:31:50 +00:00
skrll ea38704829 Add #include "opt_cputype.h" where necessary. 2010-03-06 21:22:42 +00:00
plunky 5876a3efee add uhso(4) 2010-03-06 21:12:04 +00:00
plunky 7b914145cb add UHSO_DEBUG for uhso(4) driver 2010-03-06 21:07:47 +00:00
plunky 800cedea24 Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems 2010-03-06 21:05:36 +00:00
plunky 7a23a88ab7 regen for uhso(4) driver 2010-03-06 21:00:07 +00:00
plunky 74dbcf4d6f add details of Option N.V. Wireless WAN modems for uhso(4) driver 2010-03-06 20:59:07 +00:00
skrll 6098d4a478 Fix cputype test. 2010-03-06 19:36:33 +00:00
skrll d77a107024 Improved version detection/reporting. From OpenBSD. 2010-03-06 16:57:00 +00:00
mrg fbca096a2d clean up a bunch of MULTIPROCESSOR:
- always include ci_ipi_evcnt[] in cpuinfo
- #define sparc_ncpus 1 for !MULTIPROCESSOR
- make struct pmap::pm_list an pm_ctx always be an array, and simplify
  several functions and lookups to always be the same

tested on U60 and SB2500 before and after with one and two cpus in an
MP kernel, and UP kernels, and i can't find anything besides noise for
benchmark issues.  (infact, i can't really tell the difference between
GENERIC and GENERIC.MP on these systems...)
2010-03-06 08:08:29 +00:00
cnst a305e1eede add acpismbus(4), aibs(4), uthum(4) and wbsio(4) to DEVNAMES 2010-03-06 05:58:56 +00:00
cnst 4080cb1121 fix the relative humidity sensor 2010-03-06 04:39:16 +00:00
cnst 1c5aa5c757 no reason to be excluding aibs(4) from i386 XEN3_DOM0 if we include it in amd64; ok pgoyette 2010-03-06 04:33:24 +00:00
cnst 213f4eaf44 remove aiboost(4) from GENERICs, since it cannot win in autoconf(9) over aibs(4); ok pgoyette 2010-03-06 04:28:53 +00:00
njoly 3a3fc358b3 Use 'a && b && ...' contructs for running multiple commands on a single line
in Makefiles, to properly detect/report failures.
2010-03-05 23:06:49 +00:00
dyoung 6d8bb433d1 Remove dead code (it is commented out).
Delete the detach routine, it's obviously not finished.
2010-03-05 22:47:03 +00:00
jruoho 553e4c3582 Add the _COMPONENT definition and missing prototypes. Some related cosmetics. 2010-03-05 22:00:11 +00:00
jruoho c38f7a7cda Preparing a device for wakeup involves:
(a) turning on all power resources required by the device; and
  (b) executing _DSW (or _PSW) control method.

This implements (b). Ok jmcneill@.
2010-03-05 21:01:44 +00:00
pooka effc302a58 Make module_{lookup,enqueue}() static now that it's possible again
(effectively reverts my kern_module rev. 1.53 from some months ago)
2010-03-05 20:10:05 +00:00
pooka c2efc59235 During bootstrap, process all modinfos in a DSO in one go. Get
rid of dependency tricks, since they are no longer necessary.
2010-03-05 18:47:49 +00:00
pooka 52672c7e21 regen for rump_module interface change 2010-03-05 18:43:58 +00:00
pooka 23f0cd6bfb Use improved kernel module interfaces: instead of adding + loading
modules in bootstrap, just add them.  Load them later the same way
as the kernel does: module_init_class().

Change the signature of rump_module_init() to take a vector instead
of just one module.  All modules in a DSO should be init'd at the
same time because they might depend on each other, and code outside
the rump kernel cannot know which way.  (binary kernel modules are
still loaded with rump_sys_modctl() the usual way).
2010-03-05 18:41:46 +00:00
skrll df22db80ba Fix console attach. 2010-03-05 18:41:29 +00:00
pooka ee7bfacd73 Move builtin modules to a list in init and load them from there
instead of using linksets directly.  This has two implications:

1) It is now possible to "unload" a builtin module provided it is
   not busy.  This is useful e.g. to disable a kernel feature as
   an immediate workaround to a security problem.  To re-initialize
   the module, modload -f <name> is required.
2) It is possible to use builtin modules which were linked at
   runtime with an external linker (dlopen + rump).
2010-03-05 18:35:01 +00:00
phx ca79601180 Link the kernel with -q option to be able to relocate it with the boot loader. 2010-03-05 17:58:15 +00:00
phx 723e262213 A1200 (BPPC) BAT init. 2010-03-05 17:56:46 +00:00
phx 1239b0f909 Removed useless code. 2010-03-05 17:55:42 +00:00
skrll 8c84f0bdd3 Do not match on the elroy family. From OpenBSD. 2010-03-05 17:47:09 +00:00
jruoho eb8716a0a5 Add missing license.
ok drochner@
2010-03-05 17:04:26 +00:00
pooka 934159ae4a Reset sendsig_sigcontext_vec at fini to avoid having it point at
garbage and to allow re-init of the module (if DIAGNOSTIC).
2010-03-05 16:55:56 +00:00
jruoho 5a425210a3 Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.
2010-03-05 14:00:16 +00:00
pgoyette e1fc7f5215 As pointed out by Rhialto, "degrees Kelvin" is redundant. So fix a
couple of comments related to converstion between Kelvin and degC.
2010-03-05 12:44:16 +00:00
pooka 694d83c90b regen (for lfs syscalls #ifdef removal). 2010-03-05 09:00:26 +00:00
jruoho 5c49307bc7 Protect all header files against multiple inclusions. 2010-03-05 08:30:48 +00:00
dyoung 7a5d03568b Simplify this a bit (and reduce differences with if_rtw_pci.c): we
don't have to save the base address or write it to the BAR.
2010-03-05 00:54:01 +00:00
dyoung ccf94312cd This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Make a few changes of this kind:

-	ih = cardbus_intr_establish(cc, cf, ...);
+	ih = Cardbus_intr_establish(ct, ...);

-	cardbus_intr_disestablish(cc, cf, ih);
+	Cardbus_intr_disestablish(ct, ih);

Tested by plugging a Syba CardBus to FireWire adapter into an HP
Pavilion N3270, adding an address (169.254.0.7/16) to fwip0, attaching
and pinging a MacBook Pro.
2010-03-05 00:36:06 +00:00
jruoho 6957e12144 Remove ACPI_BUT_DEBUG by using ACPI_DEBUG_PRINT(x) instead. 2010-03-04 23:25:07 +00:00
jruoho a087b17c08 Add missing semicolon. 2010-03-04 23:06:36 +00:00
dyoung 797e51d63e Make cosmetic changes in order to reduce differences with
sys/dev/cardbus/if_rtw_cardbus.c: remove an unnecessary #include.
Change a few cut & paste instances of ADM8211 to RTL8180.  Make the
suspend & resume functions static, add declarations for them at the top
of the file, and move the functions themselves to the bottom.
2010-03-04 22:57:37 +00:00
dyoung 5980434120 Extract both instances of the code that prints the PCI Secondary Status
Register into a subroutine.  Use terminology similar to that which
PCI System Architecture (4th Edition) uses.  For comparison with PCI
reference books, specify flags and fields with __BIT(n) and __BITS(m, n)
instead of hexadecimal constants.
2010-03-04 22:55:20 +00:00
dyoung 7ff20f205b This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:42:22 +00:00
dyoung 6cff081e8d Get rid of the #if 1 surrounding #include <dev/cardbus/rbus.h>.
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

ath, atw, and rtw work fine after this change.
2010-03-04 22:37:38 +00:00
dyoung 9b2935788e This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:34:37 +00:00
dyoung 3f128f06a2 Remove unnecessary #ifdef INET-enclosed #includes.
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:33:12 +00:00
jruoho 34eaaa303c Remove ACPI_BUT_DEBUG. 2010-03-04 22:30:57 +00:00
jruoho 3c39e81041 Cleanup:
* Semantics.
  * No need for <dev/acpi/acpica.h>.
  * Reduce the amount of error reporting.
  * Remove ACPI_BUT_DEBUG and ACPIBUT_F_VERBOSE.

No functional change.
2010-03-04 22:29:47 +00:00
jruoho efbab01eef VALD_ACPI_DEBUG is dead. 2010-03-04 21:55:32 +00:00
jruoho e6067f77dd Remove VALD_ACPI_DEBUG and AVALD_F_VERBOSE. No functional change. 2010-03-04 21:54:35 +00:00
jruoho 5c82a1d019 Enable (uncomment) ACPI_DEBUG, ACPI_DEBUG_ALLOC, and ACPI_MUTEX_DEBUG. 2010-03-04 21:47:58 +00:00
jruoho 029e3bd476 Fix two memory leaks. 2010-03-04 20:46:18 +00:00
jruoho 03b2d90825 Fix ACPI_DEBUG build failures reported by Greg A. Woods. 2010-03-04 20:17:30 +00:00
dyoung 55ce676397 It turns out that ppb at cardbus was not even in ALL. It has probably
not been compiled in a very long time.  With some minor changes, it was
possible to make it compile:

Use kmem_zalloc()/kmem_free() instead of alloca()/memset().

Use %zu and %zx for printf'ing bus_size_t.

Delete the declaration of an unused local variable.
2010-03-04 18:49:14 +00:00
dyoung 5a5c46dece Delete unfinished and unreachable code: ppb_cardbus_setup(),
ppb_cardbus_enable(), ppb_cardbus_disable().
2010-03-04 18:31:57 +00:00
dyoung bee77fae60 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by kiyohara@.
2010-03-04 16:40:54 +00:00
pgoyette a91348ab44 This really should be ACPI_BUS_COMPONENT
Maybe I should stay out the acpi stuff?  :)
2010-03-04 13:11:14 +00:00
pgoyette e349ece50a Fix this correctly. Thanks jruoho@ 2010-03-04 13:07:01 +00:00
jruoho ed7fe01278 Provide the _COMPONENT definition and use ACPI_FREE(x) instead of
AcpiOsFree(). If the memory tracking of ACPICA is enabled, the latter is
guaranteed to leak memory, possibly also corrupting kernel memory.
2010-03-04 08:44:55 +00:00
mrg 3dee260562 avoid a build error in the previous for !DEBUG kernels. 2010-03-04 08:11:42 +00:00
mrg 89841bfd35 - in _bus_dmamap_unload(), pmap_page_protect() and pmap_clear_reference()
switch the dcache_flush_page() into a dcache_flush_page_all()
- in both pmap_kremove()/pmap_remove(), remove the blast_dcache() call
  and replace it with dcache_flush_page_all()
- in pmap_get_page() [used to allocate PTP's], always call pmap_zero_page(pa)
- flush the dcache of the dst page in pmap_{copy,zero}_page() by redirecting
  throught a C function that calls the (renamed) asm.  the old asm code had a
  comment about needing to do this...
- add a couple of membar #Sync's that the USIII manual recommends


based on discussions with chuq@, skrll@ and martin@.


these help my SB2000 / SB2500 with both disk / nfs builds and other tasks,
sometimes lasting for several hours before failing or asserting.
2010-03-04 08:01:35 +00:00
pgoyette f7785363d4 Replace ACPI_FREE() with AcpiOsFree() so we no longer need to define
_COMPONENT (we don't have a bit defined for SMBUS anyway).  This was
uncovered by turning on ACPI_DEBUG for the i386 ALL kernel config.

Reported by Greg Woods on current-users@
2010-03-04 03:10:18 +00:00
pooka 7363f77230 Replace unsafe use of TAILQ_FOREACH: as the comment says, the
structures are pulled off the list in the loop and it's anyone's
guess where they go after that.
2010-03-03 17:58:36 +00:00
oster 0134fbe7d0 Don't attempt to read or write component label stuff from/to 'dead disks'.
Update used spares with the correct parity map bits too.

Addresses PR#42904 by Louis Guillaume.  Fix confirmed by submitter.
Thanks!
2010-03-03 14:23:27 +00:00
tsutsui 8f7c20ed4f Put several fixes to ne(4) driver for better 8 bit mode support,
especially on RTL8019AS which is also used for non-ISA local bus of
embedded controllers and some m68k machines like atari and x68k.

 * move RTL8019 probe and attach code from each bus attachment
   to MI ne2000_detect() and ne2000_attach()
 * change a method for backend and attachment to specify 8 bit mode
   to use a new sc->sc_quirk member, instead of sc->sc_dmawidth
 * handle more NE2000 8 bit mode specific settings, including
   bus_space(9) access width and available size of buffer memory
 * add a function to detect NE2000 8 bit mode
   (disabled by default, but enalbed by options NE2000_DETECT_8BIT
    to avoid possible regression on various ISA clones)
 * fix ipkdb attachment accordingly (untested)

Tested on two NE2000 ISA variants (RTL8019AS and another clone named UL0001)
in both 8 bit and 16 bit mode on i386. "Looks good" from nonaka@.

See my post on tech-kern for details:
http://mail-index.NetBSD.org/tech-kern/2010/02/26/msg007423.html
2010-03-03 13:39:57 +00:00
pooka ec6664576e regen: ENOSYS nfssvc honestly 2010-03-03 11:08:00 +00:00
pooka 7cdfc0dfea One more overcomplex ENOSYS bites the dust. 2010-03-03 11:07:17 +00:00
pooka cd4f4c9856 Remove nfssvc non-emulations I missed yesterday. 2010-03-03 11:02:34 +00:00
martin 5b7db4a698 Add prototype and forward declarations to make the empty nfs stub compile. 2010-03-03 10:56:47 +00:00
he 7a30544200 When implementing "read directory", when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.

This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.

Thanks to pooka@ for the hints for traversing the VOP* layer.
2010-03-03 08:20:38 +00:00
jruoho 513fda32eb Remove ACPI_EXTRA_DEBUG. 2010-03-03 06:57:53 +00:00
jruoho 4bf4e84b9e Convert the single instance of ACPI_EXTRA_DEBUG to ACPIVERBOSE. 2010-03-03 06:57:05 +00:00
jruoho 786707264c Refactor acpi_make_devnode() to make it a little more readable.
No functional change intended.
2010-03-03 06:54:25 +00:00
skrll 2627b68f2f s/cpu_fork/cpu_lwp_fork/ in comment. 2010-03-03 06:53:34 +00:00
mrg b68c326c4a make suspend/resume actually work:
- we have to DRM_LOCK()/DRM_UNLOCK(), thus s/rad_dev/dev/ in a variable name
- only call into radeon_cp_{stop,resume}() if the device is active

with this my nforce4 dual core amd system is able to suspend/resume with both
X and drm active.
2010-03-03 03:48:39 +00:00
pooka a8ae7feaa2 You have found a scroll of genocide --More--
What class of monsters do you wish to genocide? --More--
> fs_foo.h
Wiped out all fs_foo.h
2010-03-03 01:26:01 +00:00
pooka 8fcd8f95e1 Remove #ifdef KERNFS by using weak symbols. Notably, this approach
won't work when kernfs is a module.  But then again, kernfs as a
module (i.e. current situation) doesn't contain IPSEC support, so
it's not really any worse either.
2010-03-03 01:13:26 +00:00
dyoung eb66a866ff Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Compiles.  Untested.  Let me know if you use this hardware with NetBSD
any longer.
2010-03-03 00:56:41 +00:00
pooka 4a21cd9096 Remove fs_lfs now that the syscall is always defined. 2010-03-03 00:49:39 +00:00
yamt b1521a3612 remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
yamt c659665943 comment 2010-03-03 00:45:55 +00:00