freebsd with flexible iflib nic queues
Go to file
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
bin More closely match the 2016-03-16 23:39:55 +00:00
cddl libdtrace: use calloc(3) instead of malloc(3) when it makes sense. 2016-03-14 00:34:12 +00:00
contrib Bring down 0.4.5 vendor files and other catchups with the distribution tarball. 2016-03-16 23:59:29 +00:00
crypto Re-add AES-CBC ciphers to the default cipher list on the server. 2016-03-11 00:23:10 +00:00
etc Just install ar5523.bin into /usr/share/firmware and stop compiling it 2016-03-15 04:42:37 +00:00
gnu DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
include META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE. 2016-03-11 23:45:28 +00:00
kerberos5 DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
lib xo_config.h no longer in contrib, so -I's needed 2016-03-17 04:21:57 +00:00
libexec DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
release Add paragraph about isp(4) improvements. 2016-03-17 09:04:07 +00:00
rescue Fix the build after ifconfig was converted over to lib80211 in r291470 2015-11-30 16:34:13 +00:00
sbin Display the VHT IE names. 2016-03-16 06:27:57 +00:00
secure Upgrade to OpenSSH 7.2p2. 2016-03-11 00:15:29 +00:00
share Remove incorrect BUGS entry about asserting lock not held. 2016-03-16 18:39:48 +00:00
sys Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
targets META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE. 2016-03-11 23:45:28 +00:00
tests Moving libxo to properly tracked, 3rd-Party imported handling. 2016-03-16 23:06:34 +00:00
tools Just install ar5523.bin into /usr/share/firmware and stop compiling it 2016-03-15 04:42:37 +00:00
usr.bin xo_config.h no longer in contrib, so -I's needed 2016-03-17 04:21:57 +00:00
usr.sbin Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
.arcconfig Add repository.callsign, to help arcanist figure out what repo it's 2015-07-02 22:23:52 +00:00
.arclint phabricator related changes: 2015-04-20 20:33:22 +00:00
COPYRIGHT Bump copyright year. 2015-12-31 11:21:45 +00:00
LOCKS
MAINTAINERS Add myself to MAINTAINERS. 2016-03-14 16:27:43 +00:00
Makefile Use the newly minted Makefile.libcompat to implement libsoft libraries 2016-03-12 23:25:05 +00:00
Makefile.inc1 Use the newly minted Makefile.libcompat to implement libsoft libraries 2016-03-12 23:25:05 +00:00
Makefile.libcompat Use the newly minted Makefile.libcompat to implement libsoft libraries 2016-03-12 23:25:05 +00:00
ObsoleteFiles.inc Add more casper leftover files. 2016-03-11 22:11:36 +00:00
README README: changes and fixups 2015-04-19 07:16:44 +00:00
UPDATING Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree.  See build(7)
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The `buildkernel` and `installkernel` targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

Note: If you want to build and install the kernel with the
`buildkernel` and `installkernel` targets, you might need to build
world before.  More information is available in the handbook.

The kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


Source Roadmap:
---------------

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html