210739 Commits

Author SHA1 Message Date
christos
0bcf0d6f44 PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
2012-04-20 17:31:29 +00:00
joerg
2839b8fcc3 Do not wrap other header files with extern "C". 2012-04-20 16:20:45 +00:00
matt
ca66ac7ad4 Don't use the current value of maccfg2. 2012-04-20 13:51:48 +00:00
adam
a92b391e5e Fix building tools 2012-04-20 13:28:27 +00:00
christos
7c8eec143a fix cast in local macro 2012-04-20 13:20:39 +00:00
jruoho
71224831e0 Add few unit tests for mlock(2), including a case for PR kern/44788. 2012-04-20 12:11:29 +00:00
jruoho
84c32e5f2a For now, skip module tests if modctl(8) fails either with EPERM or ENOSYS. 2012-04-20 05:41:25 +00:00
sjg
7a49f6a73f Fix some typos in/around ParseGmakeExport.
Remove the suppresssion of duplicate entries in .MAKE.MAKEFILES
2012-04-20 05:33:41 +00:00
jruoho
c69613ea1e Close all file descriptors before trying to reason about the number of open
descriptors. Should fix the test failures reported on current users.
2012-04-20 05:15:11 +00:00
christos
fe0d6a4e66 one more cast 2012-04-20 02:07:43 +00:00
jym
c5252d3225 ATF test for SIGBUS => BUS_ADRALN (invalid address alignment).
That one is tedious to test under x86: alignment exceptions are
not reported by this architecture unless you ask for them explicitely (by
setting the PSL_AC bit). The brokenness does not end there: %cr2 should
contain the address where the unaligned access occured, alas, it does not.

I am not aware of other architectures where this could happen. Still, my
knowledge is limited; if there is one, feel free to send me a mail and I
will update the test accordingly.

Adding insult to injury, this test can fail in various funny ways with VMs:
- under x86 QEMU, no trap() happens. As ring 3 code stays almost untouched by
QEMU VMM, I suppose the exception can only be triggered when the host
itself is capable of catching unaligned accesses.
- under Virtual Box with HVM support, i386 works fine, but amd64 fails with a
SIGILL (Illegal instruction) that happens right before entering the
signal handler. No idea why, and trying to debug it with gdb freezes the VM
(including ddb breaks).

Anyway, tested with:
- i386: P4 host, anita, Virtual Box HVM (Mac OS X)
- amd64: anita, Virtual Box HVM (Mac OS X)

XXX I would appreciate if someone could test it under a real amd64 host with
an up-to-date kernel, so I can reasonably assume that the culprit is
Virtual Box and not our amd64 port (my test machine being off line
I cannot do it myself). Results from other arches would be a plus too.

Initial issue reported by Nicolas Joly on port-amd64. Thanks!
2012-04-20 00:40:31 +00:00
matt
f90c9c2dab Read maccfg1/maccfg2/ecntrl so we can preserve bits we don't change (like
GMII mode).
2012-04-19 21:32:01 +00:00
drochner
c89bad5193 pull in upstream SVN rev. 22439:
check for potentially exploitable overflows in asn1_d2i_read_bio
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer
in CRYPTO_realloc_clean. (CVE-2012-2110)
2012-04-19 20:20:56 +00:00
wiz
d136758f88 Correct option name for hdaudio debugging.
Reported by Dave Tyson in PR 46357.
2012-04-19 20:20:34 +00:00
wiz
9317462bbf Remove trailing whitespace. 2012-04-19 20:13:48 +00:00
dholland
0a7a01f2e2 Fix build failure reported by bracket.
(shouldn't this size_t be ino_t?)
2012-04-19 19:48:14 +00:00
jruoho
c7358053ef Add a test case for PR bin/39546. 2012-04-19 18:51:35 +00:00
jym
9d5d9db055 Mirror what is done for amd64 boot and ACPI wakeup code by setting
CR0_WP (write protection bit) early on boot. Although it is set later via
cpu_init(), this can help tracking down invalid writes to pages mapped
as read only from ring 0.

No regression observed when booting under anita (QEMU) or a P4 host.

Depending on your hardware or setup, you may trigger code paths I have
overlooked. So if your machine does not start properly, or you get
page faults early during boot, please report them to me.
2012-04-19 18:07:05 +00:00
jym
b053fe262f Set the CR0_AM bit so processes can enable alignment check errors under
x86 through PSL_AC bit.

ATF test incoming shortly.
2012-04-19 18:00:34 +00:00
bouyer
08ece09783 Note mpii(4) 2012-04-19 17:52:39 +00:00
bouyer
24a7abc690 Add mpii(4), a driver for LSI Logic Fusion-MPT Message Passing Interface II
SAS controllers. Ported from OpenBSD.
2012-04-19 17:50:49 +00:00
bouyer
63d14cff85 Expand struct scsipi_bustype {} in a ABI-backward-compatible way to
pass more informations about the bus:
- bustype_type has 2 different bytes, one holding the existing
  SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_*
  subtype. Introduce macros to build or extract bustype_type.
- for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel,
  SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI
  is 0 so that bustype_type value doesn't change for existing code
- for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet,
  so the bustype_type value doesn't change.
- provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype
  along with scsi_bustype to be used by bus driver where appropriate
- scsipi_print_xfer_mode(): more existing code under a
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as
  sync/wide parameters only make sense for parallel SCSI.
  For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print
  tagged queing status if enabled. Just be silent for other
  bustypes.

This change is prompted by this problem:
right now, FC (e.g. isp(4)) and SAS (e.g. mfi(4)) don't
  do anything for ADAPTER_REQ_SET_XFER_MODE, and especially never
  call scsipi_async_event(ASYNC_EVENT_XFER_MODE), so sd(4) always
  runs untagged. Doing a scsipi_async_event(ASYNC_EVENT_XFER_MODE) with
  appropriate parameters is enough to enable tagged queuing,
  but then scsipi will print:
  sd0: async, 8-bit transfers, tagged queueing
  which is harmless (async, 8-bit transfers doens't make sense on SAS anyway)
  but will confuse users. With this change scsipi will only print:
  sd0: tagged queueing
  which is correct.

In the long run, knowning the underlying transport in scsipi will
allow better handling of device which are not parallel SCSI.

Another change adding an extra callback to struct scsipi_bustype {}
will come (so that scsipi_print_xfer_mode(), which is SCSI-specific,
can be moved out of scsipi_base, and split into per-subtype callback),
but this will break kernel ABI and so is not suitable for
netbsd-6, so will be commmited later. The above is enough to get
tagged queuing on FC and SAS in netbsd-6.
2012-04-19 17:45:20 +00:00
christos
b825b96b8e WARNS=5 2012-04-19 17:28:25 +00:00
christos
99b2fa090d Fix signed/unsigned issues. 2012-04-19 17:25:38 +00:00
christos
ad1d2050fc - fix compilation isses
- add some error checking
- avoid alloca
- add missing frees
2012-04-19 17:09:53 +00:00
wiz
78496082c1 New sentence, new line. 2012-04-19 16:00:25 +00:00
ttoth
c1270f067c chfs/debug.c deleted from files.ufs 2012-04-19 15:55:40 +00:00
christos
49a655adee Make declarations consistent, and change unsigned int to unsigned long so
that this works on LP64 machines. Why is the __mf_uintptr_t needed anyway?
2012-04-19 15:52:39 +00:00
ttoth
0751a667c7 added chfs support for makefs 2012-04-19 15:36:06 +00:00
bsh
f93c4185bf support SD/MMC on Netwalker. 2012-04-19 09:53:53 +00:00
macallan
0b42cd2335 glyphcache_init() works best with its parameters in the right order. Doh.
While there request an RGB devcmap.
2012-04-19 09:03:01 +00:00
macallan
321642ae48 glyphcache_init() works much better with its parameters in the right order 2012-04-19 08:59:42 +00:00
macallan
4d3aa5644d no need to convert cell number to coordinates every time we draw a glyph
from cache - just stick the coordinates directly into the map
2012-04-19 08:46:17 +00:00
macallan
efeff40d67 use rasops_get_cmap() 2012-04-19 06:58:55 +00:00
macallan
2320319a93 add another convenience function:
rasops_get_cmap() which returns either the ANSI map or an R3G3B2 map,
depending on the rasops_info handed to it so drivers don't have to
duplicate this particular code snippet
2012-04-19 06:57:39 +00:00
christos
9b0d6930b2 add _pic files 2012-04-18 22:44:43 +00:00
christos
9175dee1fe bad name 2012-04-18 22:42:21 +00:00
bouyer
f1decb173d Regen: Add various newer LSI RAID/SAS controllers 2012-04-18 21:22:26 +00:00
bouyer
69f8b811a8 Add various newer LSI RAID/SAS controllers, from OpenBSD. 2012-04-18 21:21:59 +00:00
bouyer
8574d74b55 Fix KASSERT(): autoconf doesn't run under the KERNEL_LOCK 2012-04-18 20:37:49 +00:00
christos
ca5a32edc2 specify size of the array to help -fmudflap 2012-04-18 19:30:15 +00:00
christos
f03549c50e add mudflap 2012-04-18 19:29:01 +00:00
christos
6e275ac292 add the mudflap include and libraries 2012-04-18 19:22:03 +00:00
christos
6b798f149f move include to the gcc-4.5 subdir. 2012-04-18 19:21:25 +00:00
wiz
d2ca09c94d Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.
2012-04-18 14:24:26 +00:00
yamt
673662ef94 comment 2012-04-18 13:42:11 +00:00
joerg
e3482212aa Don't depend on implicit enum casts, be explicit. 2012-04-18 13:31:10 +00:00
tsutsui
07a6a7e726 Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.
2012-04-18 11:28:30 +00:00
martin
91d93016c8 poll(), pollts() and select() all return int values, but in the hijack
emulation of them these get passed as exit values from a pthread as
a void* (c.f. pthread_join(), pthread_exit()).
Do not use the address of an int variable for these, but provide the address
of a void* and assign the value afterwards.
Fixes hijacking of pollts/select on 64bit big endian hosts.
Spotted by and fix from pooka.
2012-04-18 10:37:37 +00:00
bsh
c368cb1d52 adapt to imxclock.c rev 1.5. 2012-04-18 05:54:07 +00:00