1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/arm/xscale/ixp425
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
..
avila_ata.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
avila_gpio.c Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
avila_led.c
avila_machdep.c Remove pd_prot and pd_cache members from struct arm_devmap_entry. 2016-02-17 12:36:24 +00:00
cambria_exp_space.c
cambria_fled.c
cambria_gpio.c Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
cambria_led.c
files.avila
files.ixp425 Move more bus_space_* files to be built by files.arm. This leaves the 2015-11-21 15:30:08 +00:00
if_npe.c The cpu_id macro was renamed in r278529, catch up with this new name. 2015-02-11 10:37:55 +00:00
if_npereg.h
ixdp425_pci.c
ixdp425reg.h
ixp425_a4x_io.S
ixp425_a4x_space.c For some reason, all the arm bus_space functions that work with uint16 2015-01-21 02:56:13 +00:00
ixp425_iic.c
ixp425_intr.h
ixp425_mem.c
ixp425_npe.c
ixp425_npereg.h
ixp425_npevar.h
ixp425_pci_asm.S
ixp425_pci_space.c
ixp425_pci.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
ixp425_qmgr.c
ixp425_qmgr.h
ixp425_space.c For some reason, all the arm bus_space functions that work with uint16 2015-01-21 02:56:13 +00:00
ixp425_timer.c
ixp425_wdog.c
ixp425.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
ixp425reg.h
ixp425var.h
std.avila Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
std.ixp425
std.ixp435
uart_bus_ixp425.c
uart_cpu_ixp425.c