]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoAdd support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
jhb [Wed, 12 Feb 2014 04:30:37 +0000 (04:30 +0000)]
Add support for managing PCI bus numbers.  As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources.
PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture
defines a PCI_RES_BUS resource type.
- Add a helper API to create top-level PCI bus resource managers for each
  PCI domain/segment.  Host-PCI bridge drivers use this API to allocate
  bus numbers from their associated domain.
- Change the PCI bus and CardBus drivers to allocate a bus resource for
  their bus number from the parent PCI bridge device.
- Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the
  full range of bus numbers from secbus to subbus from their parent bridge.
  The drivers also always program their primary bus register.  The bridge
  drivers also support growing their bus range by extending the bus resource
  and updating subbus to match the larger range.
- Add support for managing PCI bus resources to the Host-PCI bridge drivers
  used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib).
- Define a PCI_RES_BUS resource type for amd64 and i386.

Reviewed by: imp
MFC after: 1 month

10 years agoConvert two while(1); statements into proper panics. Soon, kernels
imp [Wed, 12 Feb 2014 03:19:35 +0000 (03:19 +0000)]
Convert two while(1); statements into proper panics. Soon, kernels
with early printf support will print this info... For kernels without,
the observed behavior will be the same as it is now...

10 years agoadd support for building a cross-gdb for ARM... This isn't hooked up
jmg [Wed, 12 Feb 2014 02:08:42 +0000 (02:08 +0000)]
add support for building a cross-gdb for ARM...  This isn't hooked up
to xdev yet as I don't know how to make it work properly...  It also
isn't heavily tested...

Reviewed by: silence on -arm

10 years agorecognize the FreeBSD ARCH tag that is put on binaries like on armeb
jmg [Wed, 12 Feb 2014 02:03:37 +0000 (02:03 +0000)]
recognize the FreeBSD ARCH tag that is put on binaries like on armeb
EABI binaries...

MFC after: 1 week

10 years agoRework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
ian [Wed, 12 Feb 2014 00:53:38 +0000 (00:53 +0000)]
Rework the EARLY_PRINTF mechanism.  Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc().  Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.

This leverages all the existing error reporting that uses printf calls,
such as panic() which can now be usefully employed even in early
platform init code (useful at least to those who maintain that code and
build kernels with EARLY_PRINTF defined).

Reviewed by: imp, eadler

10 years agoProvide an indication a "PIO Setup Device to Host FIS" occurred while executing
tychon [Wed, 12 Feb 2014 00:32:14 +0000 (00:32 +0000)]
Provide an indication a "PIO Setup Device to Host FIS" occurred while executing
the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands.

Also, provide an indication a "D2H Register FIS" occurred during a SET FEATURES
command.

Approved by: grehan (co-mentor)

10 years agoSwap PA and VA so they are in the right registers...
imp [Tue, 11 Feb 2014 22:09:03 +0000 (22:09 +0000)]
Swap PA and VA so they are in the right registers...

10 years agoCorrect assertion to assert that the existing device VM object uses the
jhb [Tue, 11 Feb 2014 22:05:21 +0000 (22:05 +0000)]
Correct assertion to assert that the existing device VM object uses the
same type rather than asserting in the case where we just created a new
VM object.

Reviewed by: kib

10 years agoDon't waste a page of KVA for the boot-time memory test on x86. For amd64,
jhb [Tue, 11 Feb 2014 22:02:40 +0000 (22:02 +0000)]
Don't waste a page of KVA for the boot-time memory test on x86.  For amd64,
reuse the first page of the crashdumpmap as CMAP1/CADDR1.  For i386,
remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.

Reviewed by: alc, peter
MFC after: 2 weeks

10 years agoExpose OBJT_MGTDEVICE VM objects used for GEM/TTM with drm2 as an
jhb [Tue, 11 Feb 2014 21:57:37 +0000 (21:57 +0000)]
Expose OBJT_MGTDEVICE VM objects used for GEM/TTM with drm2 as an
explicit object type.

Reviewed by: kib
MFC after: 1 week

10 years agoCheck in the "real" board_tsc4370 file in place of the stubbed out one.
ian [Tue, 11 Feb 2014 21:13:37 +0000 (21:13 +0000)]
Check in the "real" board_tsc4370 file in place of the stubbed out one.

Real means the one TSC / Symmetricom / Microsemi actually uses on their 4370
and other rm9200 boards.  This code demonstrates a variety of useful things
board init code can do, including adjusting the master clock frequency.

10 years agoDisable debugging by default.
br [Tue, 11 Feb 2014 20:14:54 +0000 (20:14 +0000)]
Disable debugging by default.

10 years agoAdd caveat to zpool manpage indicating that we do not automatically activate
feld [Tue, 11 Feb 2014 15:38:29 +0000 (15:38 +0000)]
Add caveat to zpool manpage indicating that we do not automatically activate
hot spares. This should be MFC'd to all STABLE branches.

Upon the availability of zfsd, the zpool manpage on relevant branches should
be updated to remove this caveat and document hot spare's reliance on zfsd.

Approved by: avg
MFC after: 1 week
Sponsored by: SupraNet Communications

10 years agoIn acline_init(), initialize ac_line to SRC_UNKNOWN. Previously
brueffer [Tue, 11 Feb 2014 15:16:49 +0000 (15:16 +0000)]
In acline_init(), initialize ac_line to SRC_UNKNOWN.  Previously
this could lead to the -n option effectively being ignored (in case
ac_line happened to be 0 aka SRC_AC), or other undefined behaviour.

PR: 169779
Submitted by: Alex Gonzalez <loox at e-shell.net>
Reviewed by: jhb
MFC after: 2 weeks

10 years agoMake the debug messages during ctld(8) shutdown less confusing.
trasz [Tue, 11 Feb 2014 11:38:44 +0000 (11:38 +0000)]
Make the debug messages during ctld(8) shutdown less confusing.

Sponsored by: The FreeBSD Foundation

10 years agoShow proper configuration file line numbers in error messages.
trasz [Tue, 11 Feb 2014 11:37:49 +0000 (11:37 +0000)]
Show proper configuration file line numbers in error messages.

Sponsored by: The FreeBSD Foundation

10 years agoMake ctld error out on invalid characters in ctl.conf.
trasz [Tue, 11 Feb 2014 11:36:15 +0000 (11:36 +0000)]
Make ctld error out on invalid characters in ctl.conf.

Sponsored by: The FreeBSD Foundation

10 years agoImprove error reporting.
trasz [Tue, 11 Feb 2014 11:35:26 +0000 (11:35 +0000)]
Improve error reporting.

Sponsored by: The FreeBSD Foundation

10 years agoSo, it turns out SIGCHLD is discarded by default, so we have to set up
trasz [Tue, 11 Feb 2014 11:33:44 +0000 (11:33 +0000)]
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived ctld(8) zombies disappear.

Sponsored by: The FreeBSD Foundation

10 years agoUse new auth-type "deny" instead of using "chap" with no chap entries;
trasz [Tue, 11 Feb 2014 11:32:36 +0000 (11:32 +0000)]
Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.

Sponsored by: The FreeBSD Foundation

10 years agoUse "default" as default discovery-auth-group, instead of "no-access".
trasz [Tue, 11 Feb 2014 11:31:08 +0000 (11:31 +0000)]
Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.

Sponsored by: The FreeBSD Foundation

10 years agoUpdate manual page to match recent auth-group "default" changes.
trasz [Tue, 11 Feb 2014 11:29:58 +0000 (11:29 +0000)]
Update manual page to match recent auth-group "default" changes.

Sponsored by: The FreeBSD Foundation

10 years agoAdd a new auth-group "default", defaulting to deny, and make it possible
trasz [Tue, 11 Feb 2014 11:29:05 +0000 (11:29 +0000)]
Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it.  From now on, assigning auth-group to a target is no longer
mandatory.

Sponsored by: The FreeBSD Foundation

10 years agoMake it possible to redefine portal-group "default".
trasz [Tue, 11 Feb 2014 11:27:25 +0000 (11:27 +0000)]
Make it possible to redefine portal-group "default".

Sponsored by: The FreeBSD Foundation

10 years agoAdd auth-type.
trasz [Tue, 11 Feb 2014 11:26:05 +0000 (11:26 +0000)]
Add auth-type.

Sponsored by: The FreeBSD Foundation

10 years agoRename a variable, no functional changes.
trasz [Tue, 11 Feb 2014 11:14:50 +0000 (11:14 +0000)]
Rename a variable, no functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoYacc cleanup; no functional changes.
trasz [Tue, 11 Feb 2014 11:11:37 +0000 (11:11 +0000)]
Yacc cleanup; no functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoMake function ordering slightly more logical; no functional changes.
trasz [Tue, 11 Feb 2014 11:10:01 +0000 (11:10 +0000)]
Make function ordering slightly more logical; no functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoImplement initiator-name and initiator-portal restrictions.
trasz [Tue, 11 Feb 2014 11:08:04 +0000 (11:08 +0000)]
Implement initiator-name and initiator-portal restrictions.

Sponsored by: The FreeBSD Foundation

10 years agoDaemonize after applying configuration, not before, so that
trasz [Tue, 11 Feb 2014 10:59:57 +0000 (10:59 +0000)]
Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.

Sponsored by: The FreeBSD Foundation

10 years agoEmpty data segment during Login Phase is rather unlikely, but it's
trasz [Tue, 11 Feb 2014 10:58:32 +0000 (10:58 +0000)]
Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error.  This fixes interoperability with
OpenBSD initiator.

Sponsored by: The FreeBSD Foundation

10 years agoThe log_whatever() routines don't accept NULL for format strings,
trasz [Tue, 11 Feb 2014 10:56:43 +0000 (10:56 +0000)]
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of__printf0like.

Sponsored by: The FreeBSD Foundation

10 years agoImprove check for duplicated paths. It shows the warning twice for
trasz [Tue, 11 Feb 2014 10:55:32 +0000 (10:55 +0000)]
Improve check for duplicated paths.  It shows the warning twice for
every path (once for each duplicate found), but it should do for now.

Sponsored by: The FreeBSD Foundation

10 years agoRefactor.
trasz [Tue, 11 Feb 2014 10:53:08 +0000 (10:53 +0000)]
Refactor.

Sponsored by: The FreeBSD Foundation

10 years agoSo, it turns out SIGCHLD is discarded by default, so we have to set up
trasz [Tue, 11 Feb 2014 10:47:28 +0000 (10:47 +0000)]
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived iscsid(8) zombies disappear.

Sponsored by: The FreeBSD Foundation

10 years agoEmpty data segment during Login Phase is rather unlikely, but it's not
trasz [Tue, 11 Feb 2014 10:45:20 +0000 (10:45 +0000)]
Empty data segment during Login Phase is rather unlikely, but it's not
a protocol error.

Sponsored by: The FreeBSD Foundation

10 years agoAdd missing libraries here as well, so a warning is not printed when one
pjd [Tue, 11 Feb 2014 09:17:17 +0000 (09:17 +0000)]
Add missing libraries here as well, so a warning is not printed when one
tries to view their manual pages.

Reported by: rwatson
Explained by: pluknet

10 years agoFix spelling of eight (was spelled eigth) in struct pkthdr.
marcel [Tue, 11 Feb 2014 04:16:32 +0000 (04:16 +0000)]
Fix spelling of eight (was spelled eigth) in struct pkthdr.

10 years agoExpose real size of UMA allocations via libmemstat(3).
glebius [Mon, 10 Feb 2014 20:09:10 +0000 (20:09 +0000)]
Expose real size of UMA allocations via libmemstat(3).

Sponsored by: Nginx, Inc.

10 years agoCreate two public UMA_ZONE_PCPU zones: 64 bit sized and pointer sized.
glebius [Mon, 10 Feb 2014 19:59:46 +0000 (19:59 +0000)]
Create two public UMA_ZONE_PCPU zones: 64 bit sized and pointer sized.

Sponsored by: Nginx, Inc.

10 years agoStyle.
glebius [Mon, 10 Feb 2014 19:51:15 +0000 (19:51 +0000)]
Style.

10 years agoMake M_ZERO flag work correctly on UMA_ZONE_PCPU zones.
glebius [Mon, 10 Feb 2014 19:48:26 +0000 (19:48 +0000)]
Make M_ZERO flag work correctly on UMA_ZONE_PCPU zones.

Sponsored by: Nginx, Inc.

10 years agoAdd zpcpu_get_cpu() that converts base pointer of UMA_ZPCPU_ZONE
glebius [Mon, 10 Feb 2014 19:47:14 +0000 (19:47 +0000)]
Add zpcpu_get_cpu() that converts base pointer of UMA_ZPCPU_ZONE
to a pointer private to a given cpuid.

Sponsored by: Nginx, Inc.

10 years agoFix wrong device name in example.
mav [Mon, 10 Feb 2014 16:40:13 +0000 (16:40 +0000)]
Fix wrong device name in example.

PR: docs/185602
Submitted by: koitsu
MFC after: 1 week

10 years agoThe log_whatever() routines don't accept NULL for format strings,
trasz [Mon, 10 Feb 2014 15:12:59 +0000 (15:12 +0000)]
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of __printf0like.

Sponsored by: The FreeBSD Foundation

10 years agoMake iscsictl(8) properly handle (optional) semicolons in iscsi.conf,
trasz [Mon, 10 Feb 2014 15:04:59 +0000 (15:04 +0000)]
Make iscsictl(8) properly handle (optional) semicolons in iscsi.conf,
instead of ignoring them and echoing them to stdout.

Sponsored by: The FreeBSD Foundation

10 years agoSimplify.
trasz [Mon, 10 Feb 2014 15:03:08 +0000 (15:03 +0000)]
Simplify.

Sponsored by: The FreeBSD Foundation

10 years agoRemove unused variable.
trasz [Mon, 10 Feb 2014 15:02:02 +0000 (15:02 +0000)]
Remove unused variable.

Sponsored by: The FreeBSD Foundation

10 years agoYacc cleanup; no functional changes.
trasz [Mon, 10 Feb 2014 15:01:24 +0000 (15:01 +0000)]
Yacc cleanup; no functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoOnly count table lookups when we're actually processing packets.
brueffer [Mon, 10 Feb 2014 14:47:51 +0000 (14:47 +0000)]
Only count table lookups when we're actually processing packets.

PR: 183462
Submitted by: Sven-Thorsten Dietrich <thebigcorporation at gmail.com>
Reviewed by: bms
MFC after: 1 month

10 years agoFor IPv6, return the same error code as IPv4 when mrouter is not initialized.
brueffer [Mon, 10 Feb 2014 14:36:51 +0000 (14:36 +0000)]
For IPv6, return the same error code as IPv4 when mrouter is not initialized.

PR: 178472
Submitted by: Sven-Thorsten Dietrich <sven at vyatta.com>
Reviewed by: bms

10 years agoSimplify nd6_output_lle:
melifaro [Mon, 10 Feb 2014 12:52:33 +0000 (12:52 +0000)]
Simplify nd6_output_lle:
* Check ND6_IFF_IFDISABLED before acquiring any locks
* Assume m is always non-NULL
* remove 'bad' case not used anymore
* Simply if_output conditional

MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoUpdate and sort the list of iwn(4) firmware.
brueffer [Sun, 9 Feb 2014 22:43:16 +0000 (22:43 +0000)]
Update and sort the list of iwn(4) firmware.

MFC after: 1 week

10 years agoAllow iwn2000 and iwn2030 firmware to be linked into the kernel.
brueffer [Sun, 9 Feb 2014 22:42:14 +0000 (22:42 +0000)]
Allow iwn2000 and iwn2030 firmware to be linked into the kernel.

PR: 184631
Submitted by: Oliver Pinter
MFC after: 1 week

10 years agoUpdate legacy platforms to use new arm_physmem helper routines.
ian [Sun, 9 Feb 2014 22:10:14 +0000 (22:10 +0000)]
Update legacy platforms to use new arm_physmem helper routines.

10 years agoFix descriptor leak.
pjd [Sun, 9 Feb 2014 21:47:46 +0000 (21:47 +0000)]
Fix descriptor leak.

10 years agoIf the main casperd process exits, zygote process should exit as well
pjd [Sun, 9 Feb 2014 21:42:01 +0000 (21:42 +0000)]
If the main casperd process exits, zygote process should exit as well
instead of spinning.

Reported by: Mikhail <mp@lenta.ru>

10 years agoAdd more obsolete files.
antoine [Sun, 9 Feb 2014 21:27:32 +0000 (21:27 +0000)]
Add more obsolete files.

10 years agoIf someone tries to boot a generic ATMEL kernel that has no board_init()
ian [Sun, 9 Feb 2014 21:21:10 +0000 (21:21 +0000)]
If someone tries to boot a generic ATMEL kernel that has no board_init()
routine compiled in, print a friendly error message about it rather than
mysteriously hanging while trying to init 4GB of nonexistant ram.

10 years agoAdd FDT attachment.
imp [Sun, 9 Feb 2014 21:02:46 +0000 (21:02 +0000)]
Add FDT attachment.

10 years agoFDT attachment...
imp [Sun, 9 Feb 2014 21:01:53 +0000 (21:01 +0000)]
FDT attachment...

10 years agoAdd TWI attachment for FDT. We're only matching the SAMG20 device for
imp [Sun, 9 Feb 2014 21:01:10 +0000 (21:01 +0000)]
Add TWI attachment for FDT. We're only matching the SAMG20 device for
now, others to follow.

10 years agoAdd FDT attachment.
imp [Sun, 9 Feb 2014 21:00:22 +0000 (21:00 +0000)]
Add FDT attachment.

10 years agoAdd FDT attachment. Flag lost functionality with FDT_HACKS so we can
imp [Sun, 9 Feb 2014 20:59:46 +0000 (20:59 +0000)]
Add FDT attachment. Flag lost functionality with FDT_HACKS so we can
find it later.

10 years agoAdd FDT attachment.
imp [Sun, 9 Feb 2014 20:58:03 +0000 (20:58 +0000)]
Add FDT attachment.

10 years agoAdd FDT attachment, plus minor code shuffle.
imp [Sun, 9 Feb 2014 20:57:26 +0000 (20:57 +0000)]
Add FDT attachment, plus minor code shuffle.

10 years agoAdd FDT attachment.
imp [Sun, 9 Feb 2014 20:56:39 +0000 (20:56 +0000)]
Add FDT attachment.

10 years agoAdd FDT matching code.
imp [Sun, 9 Feb 2014 20:55:49 +0000 (20:55 +0000)]
Add FDT matching code.

10 years agoPull in r200899 from upstream clang trunk:
dim [Sun, 9 Feb 2014 20:52:47 +0000 (20:52 +0000)]
Pull in r200899 from upstream clang trunk:

  Allow transformation of VariableArray to ConstantArray.

  In the following code:

     struct A { static const int sz; };
     template<class T> void f() { T arr[A::sz]; }

  the array 'arr' is represented as a variable size array in the template.
  If 'A::sz' gets value below in the translation unit, the array in
  instantiation can turn into constant size array.

  This change fixes PR18633.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2688

This fixes "Assertion failed: (T::isKind(*this)), function castAs"
errors, which can occur when building the security/quantis port.

Reported by: ale
MFC after: 3 days

10 years agoAdd some extra debugging output when DEBUG is defined.
ian [Sun, 9 Feb 2014 20:20:49 +0000 (20:20 +0000)]
Add some extra debugging output when DEBUG is defined.

10 years agoFix the exclude-region clipping logic for the edge-trim case.
ian [Sun, 9 Feb 2014 20:19:41 +0000 (20:19 +0000)]
Fix the exclude-region clipping logic for the edge-trim case.

10 years agoBuild libstand as a 64-bit library on ppc64
emaste [Sun, 9 Feb 2014 16:37:17 +0000 (16:37 +0000)]
Build libstand as a 64-bit library on ppc64

The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32,
so there is no need to force /usr/lib/libstand.a to be 32-bit.

This is equivalent to r261568 for amd64.

Sponsored by: The FreeBSD Foundation

10 years agoPass the pagetable used from locore.S to initarm to allow it to map data
andrew [Sun, 9 Feb 2014 15:54:31 +0000 (15:54 +0000)]
Pass the pagetable used from locore.S to initarm to allow it to map data
in as required.

10 years agoNo need to set physmem in each initarm() instance anymore, it's handled
ian [Sun, 9 Feb 2014 14:46:50 +0000 (14:46 +0000)]
No need to set physmem in each initarm() instance anymore, it's handled
in common code now.

10 years agoUse vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
ian [Sun, 9 Feb 2014 14:35:44 +0000 (14:35 +0000)]
Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.

Pointed out by: alc

10 years agoRefer newfs and growfs users to fsck_ffs instead of
brueffer [Sun, 9 Feb 2014 14:28:47 +0000 (14:28 +0000)]
Refer newfs and growfs users to fsck_ffs instead of
fsck, the latter does not accept the referred to "-b" flag.

This change was accidently committed directly to 9-STABLE in
r237505.

PR: 82720
Submitted by: David D.W. Downey
MFC after: 1 week

10 years agoRemove the now unused MMU_INIT macro.
andrew [Sun, 9 Feb 2014 12:52:39 +0000 (12:52 +0000)]
Remove the now unused MMU_INIT macro.

10 years agoFixup for r261590 (vnet sysctl handlers cleanup).
trociny [Sun, 9 Feb 2014 08:13:17 +0000 (08:13 +0000)]
Fixup for r261590 (vnet sysctl handlers cleanup).

Reviewed by: glebius

10 years agoIt turns out a global variable is the only straightforward way to
ian [Sun, 9 Feb 2014 02:39:00 +0000 (02:39 +0000)]
It turns out a global variable is the only straightforward way to
communicate the kernel's physical load address from where it's known in
initarm() into cpu_mp_start() which is called from non-arm code and
takes no parameters.

This adds the global variable and ensures that all the various copies
of initarm() set it.  It uses the variable in cpu_mp_start(), eliminating
the last uses of KERNPHYSADDR outside of locore.S (where we can now
calculate it instead of relying on the constant).

10 years agoCalculate the kernel's load address from the PC in the elf / gzip
ian [Sun, 9 Feb 2014 02:06:12 +0000 (02:06 +0000)]
Calculate the kernel's load address from the PC in the elf / gzip
trampoline instead of relying on KERNPHYSADDR as a compile-time constant.

10 years agoDon't call vm_fault_prefault() on zero-fill faults. It's a waste of time.
alc [Sun, 9 Feb 2014 01:59:52 +0000 (01:59 +0000)]
Don't call vm_fault_prefault() on zero-fill faults.  It's a waste of time.
Successful prefaults after a zero-fill fault are extremely rare.

10 years agoReplace compile-time constant KERNPHYSADDR with abp_physaddr (determined
ian [Sun, 9 Feb 2014 01:21:30 +0000 (01:21 +0000)]
Replace compile-time constant KERNPHYSADDR with abp_physaddr (determined
at runtime) where it's trivial to do so.  Another breadcrumb on the trail
to a kernel that can be loaded at any 1MB boundary.

10 years agoConsolidate code related to setting up physical memory configuration into
ian [Sat, 8 Feb 2014 23:54:16 +0000 (23:54 +0000)]
Consolidate code related to setting up physical memory configuration into
a new physmem.c file.  The new code provides helper routines that can be
used by legacy SoCs and newer FDT-based systems.  There are routines to
add one or more regions of physically contiguous ram, and exclude one or
more physically contiguous regions of ram.  Ram can be excluded from crash
dumps, from being given over to the vm system for allocation management,
or both.  After all the included and excluded regions have been added,
arm_physmem_init_kernel_globals() processes the regions into the global
dump_avail and phys_avail arrays and realmem and physmem variables that
communicate memory configuration to the rest of the kernel.

Convert all existing SoCs to use the new helper code.

10 years agoRemove the ARM_USE_SMALL_ALLOC option and code related to it.
ian [Sat, 8 Feb 2014 22:21:38 +0000 (22:21 +0000)]
Remove the ARM_USE_SMALL_ALLOC option and code related to it.

This was an optimization used only by a few xscale platforms.  Part of
the optimization was to create a direct map for all physical pages, and
that resulted in making multiple mappings of pages in a way that bypassed
the logic in pmap.c to handle VIVT cache aliasing.  It also just generally
made the code more complex and hard to maintain for all SoCs.

Reviewed by: cognet

10 years agoRemove ft_rtalloc and choose rtalloc function at compile time.
glebius [Sat, 8 Feb 2014 22:12:00 +0000 (22:12 +0000)]
Remove ft_rtalloc and choose rtalloc function at compile time.

10 years agoSpacing.
glebius [Sat, 8 Feb 2014 22:10:53 +0000 (22:10 +0000)]
Spacing.

10 years agoAdd drivers for:
br [Sat, 8 Feb 2014 19:47:59 +0000 (19:47 +0000)]
Add drivers for:
- Enhanced Direct Memory Access Controller (eDMA)
- Direct Memory Access Multiplexer (DMAMUX)

10 years agoAdd virtualized XSAVE support to bhyve which permits guests to use XSAVE and
jhb [Sat, 8 Feb 2014 16:37:54 +0000 (16:37 +0000)]
Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and
XSAVE-enabled features like AVX.
- Store a per-cpu guest xcr0 register.  When switching to the guest FPU
  state, switch to the guest xcr0 value.  Note that the guest FPU state is
  saved and restored using the host's xcr0 value and xcr0 is saved/restored
  "inside" of saving/restoring the guest FPU state.
- Handle VM exits for the xsetbv instruction by updating the guest xcr0.
- Expose the XSAVE feature to the guest only if the host has enabled XSAVE,
  and only advertise XSAVE features enabled by the host to the guest.
  This ensures that the guest will only adjust FPU state that is a subset
  of the guest FPU state saved and restored by the host.

Reviewed by: grehan

10 years agoinit: Remove code to track line numbers in /etc/ttys.
jilles [Sat, 8 Feb 2014 13:51:15 +0000 (13:51 +0000)]
init: Remove code to track line numbers in /etc/ttys.

The tracking generated warnings when the line number of an existing tty in
/etc/ttys changed, which would corrupt utmp (as it was indexed by the line
number). With utmpx, the line number no longer matters, so the tracking is
no longer needed.

10 years agomdoc: minor paragraph fixes.
joel [Sat, 8 Feb 2014 13:37:02 +0000 (13:37 +0000)]
mdoc: minor paragraph fixes.

10 years agoCorrect example.
joel [Sat, 8 Feb 2014 13:29:35 +0000 (13:29 +0000)]
Correct example.

Submitted by:    Jason McIntyre <jmc@kerhand.co.uk>
                 Thomas Klausner <wiz@netbsd.org>

10 years agoRevert accidentially leaked changes in r261627.
glebius [Sat, 8 Feb 2014 09:57:52 +0000 (09:57 +0000)]
Revert accidentially leaked changes in r261627.

10 years agoRemove never set flag FL_OVERWRITE. The only place where
glebius [Sat, 8 Feb 2014 09:56:26 +0000 (09:56 +0000)]
Remove never set flag FL_OVERWRITE. The only place where
it was checked led to lock/critnest leak.

10 years agoAdd a counter to differentiate between VM-exits due to nested paging faults
neel [Sat, 8 Feb 2014 06:22:09 +0000 (06:22 +0000)]
Add a counter to differentiate between VM-exits due to nested paging faults
and instruction emulation faults.

10 years agoMFV r261619:
delphij [Sat, 8 Feb 2014 05:35:36 +0000 (05:35 +0000)]
MFV r261619:

4574 get_clones_stat does not call zap_count in non-debug kernel

zap_count(...) is never called in non-DEBUG kernel.
As result "count" variable is always 0, and "goto fail" is always
reached.  This means get_clones_stat function never makes up list
of clones for "clones" properties.

MFC after: 2 weeks

10 years agoIn g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
delphij [Sat, 8 Feb 2014 05:17:49 +0000 (05:17 +0000)]
In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
k_ipad.

Note that the two consumers in geli(4) are not affected by this
issue because the way the code is constructed and as such, we
believe there is no security impact with or without this change
with geli(4)'s usage.

Reported by: Serge van den Boom <serge vdboom.org>
Reviewed by: pjd
MFC after: 2 weeks

10 years agoFix a bug in the handling of VM-exits caused by non-maskable interrupts (NMI).
neel [Sat, 8 Feb 2014 05:04:34 +0000 (05:04 +0000)]
Fix a bug in the handling of VM-exits caused by non-maskable interrupts (NMI).

If a VM-exit is caused by an NMI then "blocking by NMI" is in effect on the
CPU when the VM-exit is completed. No more NMIs will be recognized until
the execution of an "iret".

Prior to this change the NMI handler was dispatched via a software interrupt
with interrupts enabled. This meant that an interrupt could be recognized
by the processor before the NMI handler completed its execution. The "iret"
issued by the interrupt handler would then cause the "blocking by NMI" to
be cleared prematurely.

This is now fixed by handling the NMI with interrupts disabled in addition
to "blocking by NMI" already established by the VM-exit.

10 years agoRemove FreeBSD 6 support
imp [Sat, 8 Feb 2014 04:29:36 +0000 (04:29 +0000)]
Remove FreeBSD 6 support

10 years agotests/sys/Makefile
asomers [Sat, 8 Feb 2014 00:20:21 +0000 (00:20 +0000)]
tests/sys/Makefile
use TESTS_SUBDIRS for kern instead of SUBDIRS.  I don't think it
makes a difference in this case, but TESTS_SUBDIRS is generally
correct for subdirectories that contain tests.

Sponsored by: Spectra Logic
MFC after: 5 days
X-MFC-With: r261133

10 years agoBuild a 32-bit libstand under sys/boot/ for ppc64
emaste [Fri, 7 Feb 2014 22:49:42 +0000 (22:49 +0000)]
Build a 32-bit libstand under sys/boot/ for ppc64

This change is equivalent to r261567 for i386/amd64.

Sponsored by: The FreeBSD Foundation