freebsd-dev/sys/powerpc/mpc85xx
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
..
atpic.c
ds1553_bus_fdt.c
ds1553_core.c
ds1553_reg.h
fsl_sdhc.c Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of 2015-12-14 01:09:25 +00:00
fsl_sdhc.h
i2c.c Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. 2015-10-09 22:49:50 +00:00
isa.c Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it. 2016-02-20 01:32:58 +00:00
lbc.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
lbc.h
mpc85xx_gpio.c
mpc85xx.c Allow the size argument for law_enable() to be non-power-of-2. 2016-02-23 02:28:19 +00:00
mpc85xx.h Extend idle support for newer Book-E cores. 2016-01-01 02:47:40 +00:00
pci_mpc85xx_pcib.c Modernize mpc85xx PCI hostbridge driver. 2015-11-22 01:16:43 +00:00
pci_mpc85xx.c Revert r295756: 2016-02-20 12:28:20 +00:00
platform_mpc85xx.c Extend idle support for newer Book-E cores. 2016-01-01 02:47:40 +00:00
qoriq_gpio.c Add another compatibility check for QorIQ GPIO driver. 2016-03-01 03:41:48 +00:00