Commit Graph

227386 Commits

Author SHA1 Message Date
Justin Hibbits
f6bd9666a5 Add P5010/P5010E for completeness 2017-10-30 01:55:38 +00:00
Eitan Adler
af28292c02 Remove now bogus README
The SGML referenced was removed in r4719 of the doc repo.
2017-10-30 00:36:08 +00:00
Eitan Adler
f2970fcfd5 Revert removal of 9.x references in UPDATING
Requested by: imp
2017-10-29 21:25:58 +00:00
Eitan Adler
8cb0af95e8 rescue: say gbye to 'boot floppies' and moderize 2017-10-29 21:21:39 +00:00
Ian Lepore
5deb1573e8 Improve the performance of the hpet timer in bhyve guests by making the
timer frequency a power of two.  This changes the frequency from 10 to
16.7 MHz (2 ^ 24 HZ).  Using a power of two avoids roundoff errors when
doing arithmetic in sbintime_t units.

Testing shows this can fix erratic ntpd behavior in guests using the
hpet timer (which is the default for multicore guests).

Reported by:	bsam@
2017-10-29 20:50:03 +00:00
Eitan Adler
47f9f0c229 Update the updating URL in UPDATING
Also remove references to 9.x
2017-10-29 20:40:56 +00:00
Eitan Adler
745ddc1000 Correct the URLs for both READMEs for tracking src
Previously there were two different URLs in two
different READMEs, neither of which went anywhere.
2017-10-29 20:29:31 +00:00
Eitan Adler
c92116f340 The !! trick does not apply to all shells
Requested by:	emaste
2017-10-29 20:20:51 +00:00
Michal Meloun
f879eb0488 Fix misleading comment.
Not a functional change.

MFC after:	3 days
2017-10-29 14:26:37 +00:00
Edward Tomasz Napierala
152036a0f7 Plug memory leak on error case.
Reported by:	Coverity
CID:		1382112
MFC after:	2 weeks
2017-10-29 12:07:27 +00:00
Edward Tomasz Napierala
338ed98ad2 Add back missing MTX_DEF, it still needs to be there.
(Although it's defined to be 0, so there's no functional change.)

Reported by:	glebius
MFC after:	2 weeks
2017-10-29 12:03:06 +00:00
Mariusz Zaborski
c19b1a6a08 Fix information about nv.h include.
MFC after:	1 week
2017-10-29 09:50:20 +00:00
Eitan Adler
e5f5a85203 Update UPDATING
- Remove FreeBSD 4.x of building the kernel.
While it might technically work, it is better to
document the 'correct' way than how to shoot oneself
in the foot

- Remove reference to CVS -P for src.
2017-10-29 08:25:31 +00:00
Eitan Adler
a2aef24aa3 Update several more URLs
- Primarily http -> https
- Primarily FreeBSD project URLs
2017-10-29 08:17:03 +00:00
Eitan Adler
417bdb60ca Update URLs in usr.bin
- http -> https
- contents have moved locations
- removal of URL if I could not find new location
2017-10-29 08:03:21 +00:00
Warner Losh
05c2ec42c6 Cleanup non-arch Makefiles
Use SYSDIR, BOOTSRC, LDRSRC and FDTSRC in preference to relative
paths. Also, use bsd.init.mk where needed.

Sponsored by: Netflix
2017-10-29 05:27:22 +00:00
Warner Losh
f08693930b Define new EFI variables
Define EFISRC, EFIINC and EFIINCMD. Use them, as well as using other
symbols defined in defs.mk. Prefer <bsd.init.mk> to ../../Makefile.inc
or <src.opts.mk>.

Sponsored by: Netflix
2017-10-29 05:26:59 +00:00
Eitan Adler
ff744dbd85 Modernize freebsd-tips a bit
- Prefer UTF-8 over ISO-8859-1
- Remove some references to printing man pages
- Combine duplicate '!!' tips
- 'rehash' is no longer needed
2017-10-29 04:53:33 +00:00
Eitan Adler
7e3f9a3440 Prefer using https over http 2017-10-29 04:41:01 +00:00
Bryan Drewery
be1ef37b94 xdev: Consolidate duplicate cross-tools build/install list into XDEVDIRS.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:52 +00:00
Bryan Drewery
86c4ac993d xdev: Remove excess '/' since XDTP is asserted to be an absolute path.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:49 +00:00
Bryan Drewery
c16a698b5e xdev: Fix build for platforms needing LLD.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:46 +00:00
Bryan Drewery
57820ca8df xdev: Add missing 'make obj' treewalk for 'make includes'.
It is possible that building headers requires an OBJDIR.
The other phases of xdev have their own 'make obj' calls
where needed, such as inside 'make libraries' itself.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:42 +00:00
Bryan Drewery
2aba4f29f9 lib32/libsoft: Store object files in a more consistent structure.
Having objects in world32 and a sysroot in lib32 was confusing and
inconsistent with the normal build.  Now objects are stored in
obj-lib32 (or obj-libsoft) and the sysroot (analagous to WORLDTMP)
is stored in obj-lib32/tmp.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:39 +00:00
Bryan Drewery
49c9ea8fe5 AUTO_OBJ: auto.obj.mk mkdir -p simplification
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:36 +00:00
Bryan Drewery
051c25dbf3 Suggest TARGET/TARGET_ARCH, XDEV/XDEV_ARCH are depcrecated in r269031.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:33 +00:00
Bryan Drewery
5bd47cc56f Change native-xtools to not install by default; add a native-xtools-install.
Without this the user has to mess with 'make -f Makefile.inc1 ...' to figure
out where the files are installed in the OBJDIR and then they need to copy them
to where they really wanted them. Using DESTDIR may be problematic after
r325001 as well.

The files will be installed to DESTDIR/NXTP where NXTP defaults to /nxb-bin.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:29 +00:00
Bryan Drewery
b135fb6ef4 build(7): Document xdev targets.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:26 +00:00
Bryan Drewery
7441e255ed build(7): Document native-xtools.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:22 +00:00
Bryan Drewery
24830684f2 Fix xdev TARGET/TARGET_ARCH assertion and expand to native-xtools.
The top of Makefile.inc1 requires TARGET/TARGET_ARCH be defined.  Just
building 'make xdev' would already set them, so this error was never
triggered.  Moving it to Makefile fixes the problem.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:19 +00:00
Bryan Drewery
bb3f65ea64 Disable AUTO_OBJ as a make argument to ensure it really is disabled.
If the user sets this to yes as a make argument too we still want
to ensure these do not get enabled.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:15 +00:00
Bryan Drewery
d3e478c4c3 MAKEOBJDIR should be an absolute path, not any path with a slash.
Using MAKEOBJDIR=foo did not work but MAKEOBJDIR=foo/ did, but
really it needs to be absolute.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:12 +00:00
Bryan Drewery
30385347cf Rework r254951 to not reach into private OBJDIR areas.
The original change was dealing with the build wanting to run a newer
install(1) that was not yet installed.  The solution to look into the private
legacy directory of the existing build conflicts with 2 upcoming features: a
changed OBJDIR format, and splitting the host tools into arch-dependent and
arch-independent directories.  Rather than hardcoding and changing the paths in
this script, just let kernel-toolchain do the work, while disabling much of the
meat.  With -j15 this finishes in 25 seconds for me and 117 seconds with -j1.
All that is really needed is bootstrap-tools, but the system is not currently
written in a way that all previous dependent steps will have ran.  The previous
steps, such as _worldtmp, are being reworked and renamed and so cannot be
relied upon to be right.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:09 +00:00
Bryan Drewery
0a3c9523e0 Remove comment: debug files can be useful for build tools.
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:06 +00:00
Bryan Drewery
67d2f51ad6 Move some LIBCOMPAT tmpdir logic setup to its own build target.
Its own build target was already handling mtree extractions
just as _worldtmp did, so the other cleaning of the
tmpdir makes sense here as well.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:02 +00:00
Bryan Drewery
a3d90ddfb2 MK_TESTS is disabled in early phases, no need for TESTBASE extraction here.
Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:59 +00:00
Bryan Drewery
53f3deb166 FAST_DEPEND clean hack: Remove lib32/soft files properly.
Only remove them if the option is enabled and also handle libsoft
by using the proper LIBCOMPAT_OBJTREE.  LIBCOMPAT:D will expand
the text after it as a proper glob to the command line if LIBCOMPAT
is defined.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:56 +00:00
Bryan Drewery
fb3d959c66 Move FAST_DEPEND cleanup hack into its own target and call from _cleanobj.
The _worldtmp target is for setting up WORLDTMP.  Nothing between _worldtmp
and _cleanobj will read these files.  Move to its own target since it is
so large.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:53 +00:00
Bryan Drewery
354ffd5366 We don't need LIB32 directories extracted in early phase legacy/WORLDTMP dirs.
This reverts some changes from r289662

Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:50 +00:00
Bryan Drewery
64ec67921d Disallow using a colon ':' in source checkout paths.
This leaks into the PATH handling for WORLDTMP and breaks
finding cross-tools.  The PATH handling could be fixed to
properly quote but is not worth the effort.

Also allow this sanity check to always run even with 'make -n'.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:47 +00:00
Bryan Drewery
5e3b906168 Move sendmail special check into a _sanity_check target.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:20:43 +00:00
Pedro F. Giffuni
7e7315b542 bsnmpd: Only refresh devtree if devd event is a new or removed device.
It makes sense to refresh the tree only when a device is inserted or
removed, otherwise bsnmpd wastes lot of CPU.

PR:		209368
MFC after:	1 week
2017-10-28 21:26:49 +00:00
Pedro F. Giffuni
0f23ab8aac Fix out-of-bounds read in libc/regex.
The bug is an out-of-bounds read detected with address sanitizer that
happens when 'sp' in p_b_coll_elems() includes NUL byte[s], e.g. if it's
equal to "GS\x00". In that case len will be equal to 4, and the
strncmp(cp->name, sp, len) call will succeed when cp->name is "GS" but the
cp->name[len] == '\0' comparison will cause the read to go out-of-bounds.

Checking the length using strlen() instead eliminates the issue.

The bug was found in LLVM with oss-fuzz:
	https://reviews.llvm.org/D39380

MFC after:	1 week
Obtained from:	Vlad Tsyrklevich through posting on openbsd-tech
2017-10-28 20:09:34 +00:00
Ian Lepore
3faac3ea79 Split the hardware type enum and the hw feature flags bits into separate
fields in the softc; they're ORed together in the ofw_compat_data.

I already caught myself doing 'sc->fectype == <enum val>' without masking
out the feature bits in one place, and that's sure to happen again.
Glomming them together is convenient for storing them in the ofw_compat_data
array, but there's no reason to keep them together in the softc.
2017-10-28 20:03:29 +00:00
Mariusz Zaborski
0b9d37d25f Simplify ping sandbox.
We don't need to check if casper is present, this is done in the library itself.

Reviewed by:	emaste, cem, ed
Differential Revision:	https://reviews.freebsd.org/D8754
2017-10-28 19:39:22 +00:00
Ian Lepore
9aba65fa24 Use the 16-bit receive shift feature in ffec hardware that supports it.
When available, enabling this feature causes the hardware to write data
to the receive buffer starting at a 16-bit offset from the start address.
This eliminates the need to copy the data after receiving to re-align
the protocol headers to a 32-bit boundary.

PR:		222634
Submitted by:	sebastian.huber@embedded-brains.de
2017-10-28 19:34:08 +00:00
Mariusz Zaborski
ceb36bc93a Introduce caspermocks.
The idea behinds mocks is that we don't need to ifdef a lot of code in
tools itself but those defines are hidden in the casper library.
Right now the mocks are implemented as define/inlines functions.
There was a very long discussion how this should be implemented.
This approach has some advantages like we don't need to link to any additional
libraries. Unfortunately there are also some disadvantages for example it is
easy to get library out of sync between two versions of functions or that we
need extra define to compile program with casper support.
This isn't an ideal solution but it's good enough for now and should simplify
capsicumizing programs. This also doesn't close us any other ways to do those
mocks and this should evolve in time.

Discussed with:	pjd, emaste, ed, rwatson, bapt, cem, bdrewery
Differential Revision:    https://reviews.freebsd.org/D8753
2017-10-28 19:23:57 +00:00
Ian Lepore
b8c7b15a82 Support up to 3 IRQs in the ffec driver.
Newer hardware splits the interrupts onto 3 different irq lines, but the
docs barely mention that there are multiple interrupts, and do not detail
how they're split up.  The code now supports 1-3 irqs, and uses the same
interrupt service routine to handle all of them.

I modified the submitted changes to use bus_alloc_resources() instead of
using loops to allocate each irq separately.  Thus, blame any bugs on me (I
can't actually test on imx7 hardware).

PR:		222634
Submitted by:	sebastian.huber@embedded-brains.de
2017-10-28 19:08:06 +00:00
Ian Lepore
6b5907b353 Add a #define RESOURCE_SPEC_END. Similar to DEVMETHOD_END and
KOBJMETHOD_END, this is to serve as the end marker in an array of
resource_spec structures.
2017-10-28 18:56:27 +00:00
Philip Paeps
8d7edd1726 Import tzdata 2017c
Changes: https://mm.icann.org/pipermail/tz-announce/2017-October/000047.html

MFC after:	2 days
2017-10-28 18:54:45 +00:00