Commit Graph

198466 Commits

Author SHA1 Message Date
bdrewery
c0990ceabb Add `-S' to display syscall numbers in the output as well.
This is useful for debugging compat modules.

Sponsored by:	EMC / Isilon Storage Division
Obtained from:	Isilon OneFS (based on work by Jeff Hughes)
MFC after:	2 weeks
2014-03-28 16:11:20 +00:00
kib
a6e5d8b248 Several fixes for the PCID implementation:
- When clearing a bit for a cpuid in pmap->pm_save, ensure that the
  cpuid is not set in pm_active.  The pm_save indicates which CPUs may
  have cached translations for given PCID, which implies that a CPU
  executing with the given pmap active have the translations
  cached. [1]

- In smp_masked_invltlb(), pass pmap to smp_targeted_tlb_shootdown(). [1]

- In invlrng_handler(), check for the special values of pcid (0 and
  -1) and do corresponding global or total invalidations before
  checking for performing PCID-specific range invalidation with
  INVPCID_ADDR. [2]

- In invltlb_pcid_handler(), do not read %cr3 unless needed. [2]

- Do minor style tweaks. [2]

Submitted by:	Henrik Gulbrandsen <henrik@gulbra.net> [1]
Other parts sponsored by:	The FreeBSD Foundation [2]
Tested by:	Henrik Gulbrandsen, pho
MFC after:	1 week
2014-03-28 16:07:27 +00:00
ray
ad03b5b28d Enable to build UEFI framebuffer driver for vt(4).
It can be enabled by "device vt_efifb" in kernel config.

Requested by:	emaste
Sponsored by:	The FreeBSD Foundation
2014-03-28 12:50:39 +00:00
emaste
c21a703194 Fix missed efi.h header change in r263815
Pointy hat to:	emaste
2014-03-28 11:46:54 +00:00
marcel
650a8b44e4 Make mkimg a general command and not a maintenance command. 2014-03-28 05:06:12 +00:00
marcel
e2f9db5916 Define SPARSE_WRITE to enable writing sparse files. Output compares ok... 2014-03-28 04:51:18 +00:00
marcel
e55a2fe916 Flesh-out manpage. 2014-03-28 04:43:36 +00:00
marcel
76165e705c Use :- and not :! for pipes. ! needs to be escaped, which adds to the
hassle.
2014-03-28 04:42:34 +00:00
gjb
37accaf4d8 Dereference nonexistent md2(3) manual.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-03-28 04:19:06 +00:00
marcel
533cda2b92 Write verbosity to stderr. The image may be written to stdout.
While here, fix writing to stderr, by not calling errc()
unconditionally, but only when there's an error.
2014-03-28 04:14:40 +00:00
takawata
d968f19902 Change default logic to CONFORM because this routine is shared
with SCI polarity setting.

Reviewed by: jhb
2014-03-28 02:38:14 +00:00
marcel
4cf1c78a43 Write sparse files by default (when SPARSE_FILE is defined).
While here, detect errors when writing to stdout.
2014-03-28 01:55:02 +00:00
marcel
ba63787689 Partitions start on cylinder boundaries. 2014-03-28 01:52:48 +00:00
marcel
fe7be9e673 Partitions start on track boundaries. 2014-03-28 01:51:45 +00:00
marcel
36046d28b3 Partitions start on track boundaries. 2014-03-28 01:50:56 +00:00
marcel
b7c3be9e45 Remove the -z flag. Let's just write a sparse file whenever we can. 2014-03-27 23:44:16 +00:00
marcel
c4d8b579ba Properly fill in d_nsectors, d_ntracks, d_ncylinders & d_secpercyl.
Round the image size to a multiple of the cyclinder size.
2014-03-27 23:16:18 +00:00
marcel
da0f041a0e Remember operator precedence? 2014-03-27 23:15:07 +00:00
jilles
74ddfdb122 sh: Fix memory leak with an assignment before a regular builtin.
MFC after:	1 week
2014-03-27 22:57:23 +00:00
jilles
ce55d2a446 sh: Fix memory leak when trying to set a read only variable.
MFC after:	1 week
2014-03-27 22:52:26 +00:00
marcel
452aa44886 Give vtoc8 a change to work: when setting the physical block size to 4K,
sectors/track to 8 and number or heads to 1, partitions that are block
aligned are also cyclinder aligned. With that trick, fix the vtoc8:
1.  Set physcyls, ncyls, altcyls, nheads and nsecs appropriately.
2.  Truncate the image size to exactly ncyls * nheads * nsecs * secsz.
3.  Properly write the cylinder number as the start of the partition.
4.  Oh, and actually calculate the checksum of the label...
2014-03-27 22:48:48 +00:00
marcel
bfd31b94a3 1. When calculating block addresses, round to the physical block
size.
2.  Replace scheme_first_block() & scheme_next_block() with
    scheme_metadata(). When we round to block sizes, we can't
    reliably fixup any miscalculations.
3.  In scheme_write, calculate ncyls (number of cyclinders), based
    on the total size, sectors/track and number of heads.
4.  Add verbosity when constructing the partitions. This includes
    the starting block address and size in bytes and blocks.
5.  Add verbosity about the sectors/track and number of heads.
2014-03-27 22:45:05 +00:00
marcel
5d04a4dffc Remove trksz, which was hardcoded to 1, and replace it by secs, which
can be set on the command line.
2014-03-27 22:39:22 +00:00
rwatson
e280748468 Update system man pages for s/capability.h/capsicum.h/.
MFC after:	3 weeks
2014-03-27 21:43:00 +00:00
marcel
a349124060 Fix writing the start and size fields. 2014-03-27 21:32:02 +00:00
dim
3c44b46e49 Enable parallel building for gnu/usr.bin and usr.bin/clang too.
MFC after:	2 weeks
X-MFC-With:	r263778
2014-03-27 20:15:33 +00:00
marcel
6084642f6d 1. Add -v option to increase vebosity levels
2.  Fix copy-paste bug -- acrually check secsz for being a power of 2
3.  Check secsz and blksz parameters
4.  Print the sector and block size when -v is given
2014-03-27 20:14:40 +00:00
marcel
e7f6c0c88b Add scheme_max_secsz() for returning the maximum sector size supported
by the partitioning scheme.
2014-03-27 20:10:26 +00:00
emaste
d2c99117cd Update EFI framebuffer handoff from loader
Sponsored by:	The FreeBSD Foundation
2014-03-27 19:43:38 +00:00
emaste
4a841fdff4 amd64: Parse the EFI memory map if present
With this change (and loader.efi from the projects/uefi branch) we can now
boot under qemu using the OVMF UEFI firmware image with the limitation
that a serial console is required.

(This is largely r246337 from the projects/uefi branch.)

Sponsored by:	The FreeBSD Foundation
2014-03-27 18:23:02 +00:00
ray
e057a3ab30 Revert r263321.
vt(9) crash on resume fixed, but Xorg still have damaged screen on resume (at
least with i915kms), so better to switch to VT0 before suspend and back on
resume.

Sponsored by:	The FreeBSD Foundation
2014-03-27 14:07:36 +00:00
emaste
6ec1c037fd Move ia64 efi.h to sys in preparation for amd64 UEFI support
Prototypes specific to ia64 have been left in this file for now, under
__ia64__, rather than moving them to a new header under sys/ia64.
I anticipate that (some of) the corresponding functions will be shared
by the amd64, arm64, i386, and ia64 architectures, and we can adjust
this as EFI support on other than ia64 continues to develop.

Sponsored by:	The FreeBSD Foundation
2014-03-27 13:57:00 +00:00
jmmv
4dc52363bb Fix path to the run.pl script to let these tests run.
Submitted by:	Peel, Casey
Obtained from:	freebsd-testing
2014-03-27 13:15:22 +00:00
bdrewery
89eca36ea8 Update build(7) with LOCAL_* vars
PR:		docs/178286
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-03-27 11:12:35 +00:00
trasz
427a2d21c4 Remove ctl_mem_pool.{c,h}.
Sponsored by:	The FreeBSD Foundation
2014-03-27 11:10:13 +00:00
trasz
b46b2184f0 Rework cfiscsi_datamove_in() to obey expected data transfer length
received from the initiator.

Sponsored by:	The FreeBSD Foundation
2014-03-27 10:15:35 +00:00
ray
0e7786c185 Fix crash on resume in vt(9).
Statically allocated terminal window have not initialized callout handler, so we
have to initialize it even for existing window if it is console window.

Reported by:	gjb and many
Tested by:	gjb
MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-03-27 09:24:09 +00:00
takawata
a40940f6b2 Strict value checking will cause problem.
Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD.
This behaviour is bug-compatible with Linux-3.13.5.

References:
http://d.hatena.ne.jp/syuu1228/20140326
http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094

Submitted by: syuu
2014-03-27 06:36:38 +00:00
takawata
35538e1725 To check polarity, check ACPI_MADT_POLARITY_CONFORMS, instead of ACPI_MADT_TRIGGER_CONFORMS.
PR:amd64/188010
Submitted by: syuu
2014-03-27 06:08:07 +00:00
neel
3e49998fdf Add an ioctl to suspend a virtual machine (VM_SUSPEND). The ioctl can be called
from any context i.e., it is not required to be called from a vcpu thread. The
ioctl simply sets a state variable 'vm->suspend' to '1' and returns.

The vcpus inspect 'vm->suspend' in the run loop and if it is set to '1' the
vcpu breaks out of the loop with a reason of 'VM_EXITCODE_SUSPENDED'. The
suspend handler waits until all 'vm->active_cpus' have transitioned to
'vm->suspended_cpus' before returning to userspace.

Discussed with:	grehan
2014-03-26 23:34:27 +00:00
asomers
0b79334339 Correct ARP update handling when the routes for network interfaces are
restricted to a single FIB in a multifib system.

Restricting an interface's routes to the FIB to which it is assigned (by
setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve:
can't allocate llinfo for x.x.x.x".  This is due to the ARP update code hard
coding it's lookup for existing routing entries to FIB 0.

sys/netinet/in.c:
	When dealing with RTM_ADD (add route) requests for an interface, use
	the interface's assigned FIB instead of the default (FIB 0).

sys/netinet/if_ether.c:
	In arpresolve(), enhance error message generated when an
	lla_lookup() fails so that the interface causing the error is
	visible in logs.

tests/sys/netinet/fibs_test.sh
	Clear ATF expected error.

PR:		kern/167947
Submitted by:	Nikolay Denev <ndenev@gmail.com> (previous version)
Reviewed by:	melifaro
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-26 22:46:03 +00:00
dim
905ed8bc75 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles
MFC after:	2 weeks
2014-03-26 22:30:38 +00:00
jilles
270892ce0a sh: Fix possible memory leaks and double frees with unexpected SIGINT. 2014-03-26 20:43:40 +00:00
dim
6ceec4444d Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

To fix the warning, adjust the size downwards by the current position,
after a bit of sanity checking.

Suggested by:	avg
MFC after:	1 week
2014-03-26 19:57:50 +00:00
dim
d8bb143013 Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.

MFC after:	3 days
X-MFC-With:	r263694
2014-03-26 19:31:33 +00:00
jhb
db52b17caa Fix build without SMP.
PR:		kern/187854
MFC after:	1 week
2014-03-26 17:40:13 +00:00
bdrewery
5552863ce9 Revert r263638 (create /root dataset) for now as it breaks install and needs
more work in cases such as single-user mode.
2014-03-26 13:41:30 +00:00
jmg
c2d355f8e9 fix up an old email address and drop clause 3 of my copyright...
bump date..

MFC after:	1 week
2014-03-26 05:49:09 +00:00
jmg
077faff9cd udpate VERY old email address.. I haven't had this email address for
well over 8 years...

roll the clock forward 16 years since there have been other changes
deserving of a bump, but never happened..

Submitted by:	feld
Obtained from:	1 week
2014-03-26 03:18:27 +00:00
mjg
00964cfdfb Update userspace users of hw.bus.devctl_disable.
This fixes breakage resulting from r263754.

Reported by:	AN <andy@neu.net>
Reviewed by:	imp
Pointy hat to:	me
2014-03-26 02:25:40 +00:00