Commit Graph

8792 Commits

Author SHA1 Message Date
yamt
fbc189d43b revert dumpsys.c rev. 1.13 because it was reported to cause a problem.
http://mail-index.NetBSD.org/source-changes-d/2011/11/19/msg004283.html
2011-11-20 18:41:12 +00:00
tls
3afd44cf08 First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.
2011-11-19 22:51:18 +00:00
jmcneill
37ffe0c4a8 remove Xbox support 2011-11-18 22:18:07 +00:00
mbalmer
c668574f04 Add gpiopwm(4). 2011-11-13 12:47:54 +00:00
mbalmer
1399980869 Enable nsclpcsio and gpio devices. 2011-11-13 09:41:46 +00:00
mbalmer
4d3e3d4418 Pickup NGPIO. 2011-11-13 09:17:56 +00:00
riz
71932a0feb i386_use_pae is now just use_pae. 2011-11-10 03:45:40 +00:00
jym
56027687e2 Turn the 'i386_use_pae' variable into simply 'use_pae'. Technically
speaking we are also running with PAE enabled in long mode under amd64,
so this variable will be used in various places across x86 machdep to
branch at runtime to functions that require extra handling for PAE mode.
2011-11-10 00:12:04 +00:00
cherry
be86218e1b DTRT when initialising pmap_pa_end. 2011-11-06 15:35:29 +00:00
cherry
c9745c1f66 [merging from cherry-xenmp] make pmap_kernel() shadow PMD per-cpu and MP aware. 2011-11-06 15:18:18 +00:00
cherry
396b8b4abf [merging from cherry-xenmp] Make the xen MMU op queue locking api private. Implement per-cpu queues. 2011-11-06 11:40:46 +00:00
yamt
00b376e154 dumpsys_seg: don't overwrite the previous mapping 2011-10-31 12:42:36 +00:00
hannken
8ade49ad05 Import of the virtio driver written by MINOURA Makoto <minoura@netbsd.org>
with minor changes to make it compile an run on -current.  This driver
speeds up disk and network access in virtual environments like KVM.

Enabled on i386 and amd64.  Tested with a CentOS 5.7 x86_64 host.

See http://ozlabs.org/~rusty/virtio-spec/virtio.pdf for the specification.
2011-10-30 12:12:21 +00:00
martin
bc780b3f84 Update to version 1.0.2.2 2011-10-28 13:18:57 +00:00
jakllsch
4f710f1a5f Per existing x86 GENERIC kernels, add:
#options BUFQ_READPRIO
options BUFQ_PRIOCSCAN
to Xen kernels.
2011-10-25 15:01:45 +00:00
jmcneill
4face1e160 PR #32894: protection fault trap in tmx86_get_longrun_mode
Use rdmsr_safe in tmx86_init_longrun to verify that the MSRs are present.
2011-10-23 13:02:32 +00:00
dyoung
48db56b4bc Tell a pci(4) instance its subordinate PCI buses using a new member
in the pcibus_attach_args, pba_sub. pciN attaches to pba_bus itself.
If pba_bus < pba_sub, then [pba_bus + 1, pba_sub] are subordinate to
pba_bus.

On i386, make mainbus0 attach pci0 with pba_sub = 255 because all buses
1 and up must be subordinate to pci0.

XXX Deal with other architectures.
2011-10-21 21:35:28 +00:00
dyoung
848492afca Define some optional routines that will help device_register() to
register ISA & PCI devices.  Add stub implementations of the routines.
2011-10-18 23:25:20 +00:00
jmcneill
106d91108e add vmt(4) 2011-10-17 22:40:31 +00:00
sjg
db4d363da5 Add the plumbing so one could compile filemon(4) into a kernel. 2011-10-15 00:23:08 +00:00
joerg
9aa0541bdf Update LLVM/Clang snapshot to r141658. This primarily fixes a regression
preventing Qt4 from building.
2011-10-11 13:53:56 +00:00
jmcneill
ab747348b5 Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.
2011-10-02 16:39:45 +00:00
mbalmer
56e78725ec Document gpioiic flag in a comment. 2011-10-02 12:19:17 +00:00
christos
7de83c2f9e syscall (setcontext) can alter eax, so don't attempt to get code again from it
in order to avoid register spills.
2011-09-28 17:27:21 +00:00
jakllsch
d85aed1639 options PMS_DISABLE_POWERHOOK is obsolete. 2011-09-26 18:14:07 +00:00
jym
aad548da5a White space fix. 2011-09-24 21:24:52 +00:00
jym
25f08e65cb Import rdmsr_safe(msr, *value) for x86 world. It allows reading MSRs
in a safe way by handling the fault that might trigger for certain
register <> CPU/arch combos.

Requested by Jukka. Patch adapted from one found in DragonflyBSD.
2011-09-24 10:32:52 +00:00
martin
12de7c048b Update Rawrite32 to latests version 2011-09-22 22:00:52 +00:00
jakllsch
8524c1046a valz(4) is superseded entirely by acpivga(4) these days. 2011-09-22 01:15:31 +00:00
jakllsch
b500df69ab Set LOADADDR to 0x600, matches how gptmbr.bin is compiled upstream.
This should let this actually work.
2011-09-21 18:15:59 +00:00
ahoka
b2aaa2725d Initial version of a pro-module kernel config 2011-09-21 10:18:52 +00:00
gsutre
a9aa6757ca Fix btinfo_bootdisk's labelsector and btinfo_bootwedge's startblk for
the non-GPT case.

ok jakllsch@
2011-09-21 08:57:12 +00:00
christos
a19015af6d include wakecode after so that the depend rules are defined! 2011-09-14 14:58:08 +00:00
reinoud
f8307eddb0 Fix the illegal instruction return address. It was using the value of the
cpu's %cr2 register but thats not valid:

CR2 Contains a value called Page Fault Linear Address (PFLA). When a page
fault occurs, the address the program attempted to access is stored in the CR2
register.

And this is thus NOT the illegal instruction address!
2011-09-07 09:24:55 +00:00
sborrill
31a08a90c4 Don't attach GPIO framework if NGPIO = 0 2011-09-04 15:05:26 +00:00
mbalmer
17fe830303 Disable gpio(4) which can now be built and used as modules. 2011-09-04 12:31:30 +00:00
dyoung
2a6ff6d60a In the tags target, move x86 sources above xen includes, for more
helpful tags.
2011-09-02 22:12:48 +00:00
christos
05ec717ee7 Add bus_dma overrides. From dyoung 2011-09-01 15:10:31 +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
jruoho
bf4d7cb301 Comment out the legacy bktr(4) from the GENERICs. 2011-08-30 08:01:13 +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
efd9548b67 Split gcscpcib into MI part, and MD pci attachement which is also in
charge of attaching the MD pcib device.
Will be used by the upcoming evbmips loongson support.
2011-08-27 12:47:49 +00:00
christos
93e326680f use c99 struct initializers 2011-08-27 09:32:11 +00:00
mbalmer
2b9c7d3182 Enable some gpio devices. 2011-08-27 09:28:55 +00:00
mrg
f63becec07 disable mmx/sse here too. hopefully fixes amd64 /boot issues.
certainly changes the output in ways that gcc 4.1 doesn't.
2011-08-22 09:43:08 +00:00
jakllsch
844442797e Attach amdtemp(4) at pchb(4) instead of in place of pchb(4).
Should fix PR#45268.
2011-08-18 20:55:20 +00:00
christos
9bc1ed7123 PR/43563: Wolfgang Solfrank: boot.cfg doesn't support comments
Fix makes it support # comments and treat spaces and tabs the same way.
2011-08-18 13:20:04 +00:00
joerg
0a50150ffc .code16 user, so disable integrated assembler with clang for now. 2011-08-17 22:26:40 +00:00