freebsd-dev/sys/mips/rmi
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
..
dev As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
board.c
board.h
bus_space_rmi_pci.c
bus_space_rmi.c
files.xlr Remove rge driver from Broadcom XLR 2015-09-04 19:57:28 +00:00
fmn.c As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
interrupt.h
intr_machdep.c
iodi.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
iomap.h
Makefile.msgring
mpwait.S
msgring_xls.c
msgring_xls.cfg
msgring.c
msgring.cfg
msgring.h
pcibus.h
pic.h
rmi_boot_info.h
rmi_mips_exts.h
rootfs_list.txt Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
std.xlr
tick.c
uart_bus_xlr_iodi.c
uart_cpu_mips_xlr.c
xlr_csum_nocopy.S
xlr_i2c.c Make Broadcom XLR use shared ds1374 RTC driver. 2015-07-29 15:32:59 +00:00
xlr_machdep.c Convert remaining {g,s}etenv->kern_{g,s}etenv 2014-10-17 17:34:05 +00:00
xlr_pci.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
xlr_pcmcia.c
xls_ehci.c Add 64-bit DMA support in the XHCI controller driver. 2015-01-05 20:22:18 +00:00