Commit Graph

39 Commits

Author SHA1 Message Date
Warner Losh
b68de8941f When -v is specified with -p dev, print the same verbose output as
when listing the whole tree. The list, however, is from the requested
device to the root (so it backwards from the normal tree).

Sponsored by: Netflix
2017-12-21 19:19:43 +00:00
Warner Losh
3ca6eb9faf Fix markup and bump .Dd. 2017-12-21 18:58:14 +00:00
Warner Losh
3386009737 Implement "-p dev" to print the path to the given device back to the
nexus. With redirection, could also be used to test if the device
exists in the device tree.

Sponsored by: Netflix
2017-12-21 18:51:47 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Justin Hibbits
da1b038af9 Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions.
Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
type `long' is only 32-bit.  This extends rman's resources to uintmax_t.  With
this change, any resource can feasibly be placed anywhere in physical memory
(within the constraints of the driver).

Why uintmax_t and not something machine dependent, or uint64_t?  Though it's
possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
32-bit architectures.  64-bit architectures should have plenty of RAM to absorb
the increase on resource sizes if and when this occurs, and the number of
resources on memory-constrained systems should be sufficiently small as to not
pose a drastic overhead.  That being said, uintmax_t was chosen for source
clarity.  If it's specified as uint64_t, all printf()-like calls would either
need casts to uintmax_t, or be littered with PRI*64 macros.  Casts to uintmax_t
aren't horrible, but it would also bake into the API for
resource_list_print_type() either a hidden assumption that entries get cast to
uintmax_t for printing, or these calls would need the PRI*64 macros.  Since
source code is meant to be read more often than written, I chose the clearest
path of simply using uintmax_t.

Tested on a PowerPC p5020-based board, which places all device resources in
0xfxxxxxxxx, and has 8GB RAM.
Regression tested on qemu-system-i386
Regression tested on qemu-system-mips (malta profile)

Tested PAE and devinfo on virtualbox (live CD)

Special thanks to bz for his testing on ARM.

Reviewed By: bz, jhb (previous)
Relnotes:	Yes
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D4544
2016-03-18 01:28:41 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
John Baldwin
94f0eafcd2 Expose the constants for internal new-bus device flags to userland. The
flag value is already exposed via dv_flags, just not the meaning of the
flags themselves.  Use these constants to annotate devices that are
disabled or suspended in devinfo output.
2015-02-05 22:42:44 +00:00
Baptiste Daroussin
c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin
01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
e8f386b409 Mark global functions and/or variables in devinfo(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
2011-11-06 19:01:48 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Attilio Rao
1262810177 Collapse devinfo_state_t with device_state_t in order to avoid a
structure replication and improve manteneability.

Reviewed by:	jhb, imp
Tested by:	Riccardo Torrini <riccardo at torrini dot org>
2009-11-15 16:44:43 +00:00
John Baldwin
d9cec0a09e Bump up the limit for when to print the resources for a given resource
manager in hex vs decimal to 1000 from 100 so that IRQs are printed in
decimal.

MFC after:	3 days
2007-10-27 13:06:15 +00:00
Ruslan Ermilov
d20241a618 Sync usage() and SYNOPSIS. 2006-09-29 16:46:01 +00:00
Joseph Koshy
8fa1d32e68 Follow the rules for the .Dd macro use: use unabbreviated month names.
Submitted by:	ru
2005-11-28 13:51:36 +00:00
Joseph Koshy
72eb2563d6 Use a separate synopsis line for -u as devinfo will ignore other
options when -u is specified.  Xref device(9) and devclass(9).
2005-11-28 01:33:19 +00:00
Philippe Charnier
6e7abcb1f1 Remove unused local variable. 2004-01-04 15:51:32 +00:00
Warner Losh
696a3d28c0 -v now also prints the pnpinfo and location information for the devices
whose bus' provide this information.
2003-02-17 18:56:54 +00:00
Warner Losh
7f156483af o Don't print devices that aren't attached unless run with the newly
minted -v flag.
o Print devices that don't return a name as 'unknown' in -v mode.

# Yea!  Now I wont think I have 10 different ISA network adapters in my
# laptop.
2002-09-20 02:26:58 +00:00
Giorgos Keramidas
f1c746bb3f Typo fix: syste -> system 2002-05-31 01:46:26 +00:00
Ruslan Ermilov
4e71fd98ee mdoc(7) police: Make this look like an average manpage. 2002-05-30 14:26:02 +00:00
Giorgos Keramidas
e4e67dfec7 o Uncapitalize .Nd macro arguments and remove punctuation
o  Minor grammar fixes.
o  Sort SEE ALSO references, and add iostat(8).
o  Delete punctuation at end of AUTHORS' section only line

Reviewed by:	rwatson, Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-13 08:40:07 +00:00
Giorgos Keramidas
1a6b42c84b Remove EOL space.
This is a whitespace only change.

Reviewed by: rwatson, Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-13 08:37:46 +00:00
Robert Watson
11e4779e45 Add a man page for the devinfo command; I'd argue devinfo is the single
most useful new command added to FreeBSD 5.0, but maybe that's just
me :-).

Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-12 14:23:15 +00:00
Mike Heffner
28644e448a Reorder WARNS line for style.
Pointed out by:	bde
2001-12-10 21:13:36 +00:00
Mike Heffner
84e0df3fcf WARNS=2 cleanup and fix potential unitialized variable bug.
PR:		bin/32567
MFC after:	2 weeks
2001-12-09 07:32:55 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Bruce Evans
ceefda85fc Fixed missing DPADD.
Don't clobber CFLAGS by assigning to it using "=".

Fixed some style bugs.
2001-05-12 14:34:46 +00:00
Mike Smith
ce7894ee6d Simple tool to print the device tree and resource usage by devices. Also
serves as an example of libdevinfo usage.
2001-04-21 00:13:25 +00:00