#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
297000 |
|
17-Mar-2016 |
jhibbits |
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
|
#
294883 |
|
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
#
294281 |
|
18-Jan-2016 |
nwhitehorn |
Move RTAS PCI-specific interpretation of the "reg" property of the PCI host device to the RTAS driver, where it belongs.
|
#
290989 |
|
17-Nov-2015 |
nwhitehorn |
Where appropriate, use the endian-flipping OF_getencprop() instead of OF_getprop() to get encode-int encoded values from the OF tree. This is a no-op at present, since all existing PowerPC ports are big-endian, but it is a correctness improvement and will be required if we have a little-endian kernel at some future point.
Where it is totally impossible for the code ever to be used on a little-endian system (much of powerpc/powermac, for instance), I have not necessarily made the appropriate changes.
MFC after: 1 month
|
#
287882 |
|
16-Sep-2015 |
zbb |
Add domain support to PCI bus allocation
When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains.
Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406
|
#
261351 |
|
01-Feb-2014 |
nwhitehorn |
Open Firmware interrupt specifiers can consist of arbitrary-length byte strings and include arbitrary information (IRQ line/domain/sense). When the ofw_bus_map_intr() API was introduced, it assumed that, as on most systems, these were either 1 cell, containing an interrupt line, or 2, containing a line number plus a sense code. It turns out a non-negligible number of ARM systems use 3 (or even 4!) cells for interrupts, so make this more general.
|
#
259516 |
|
17-Dec-2013 |
nwhitehorn |
Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it.
|
#
259513 |
|
17-Dec-2013 |
nwhitehorn |
Configure interrupt sense based on device tree information. This extends the OF interrupt map API to return sense information to the caller and the PowerPC Open Firmware PCI base driver to use it to program the PIC.
|
#
256994 |
|
23-Oct-2013 |
nwhitehorn |
Add two new interfaces to ofw_bus: - ofw_bus_map_intr() Maps an (iparent, IRQ) tuple to a system-global interrupt number in some platform dependent way. This is meant to be implemented as a replacement for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus hierarchy. - ofw_bus_config_intr() Configures an interrupt (previously mapped) based on firmware sense flags. This replaces manual interpretation of the sense field in bus drivers and will, in a follow-up, allow that interpretation to be redirected to the PIC drivers where it belongs. This will eventually replace the tables in /sys/dev/fdt/fdt_ARCH.c
The PowerPC/AIM code has been converted to use these globally, with an implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly be integrated into pic_if.m and bounced through nexus into the PIC tree.
FDT integration will happen significantly later due to larger testing requirements. This patch in general also lays the groundwork for the removal of /sys/dev/fdt/fdt_ARCH.c and machine/fdt.h.
|
#
256846 |
|
21-Oct-2013 |
nwhitehorn |
Provide an interface for PCI bus drivers that need some of ofw_pci's metadata during attach.
|
#
256816 |
|
20-Oct-2013 |
nwhitehorn |
Allow the OFW interrupt mapping code to work with PCI devices not enumerated by Open Firmware, as in the case of FDT.
|
#
231149 |
|
07-Feb-2012 |
nwhitehorn |
The bus resource adjustment API is not meant to work on active resources. Return an error if a driver attempts this, and, if INVARIANTS is on, panic.
Reviewed by: jhb
|
#
231026 |
|
05-Feb-2012 |
nwhitehorn |
Make sure to remap adjusted resources.
|
#
231003 |
|
04-Feb-2012 |
nwhitehorn |
Add support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With this change, NEW_PCIB appears to work without incident at least on a G5 iMac. More testing will be required before it is turned on in GENERIC.
|
#
230993 |
|
04-Feb-2012 |
nwhitehorn |
Unify OF PCI infrastructure, including changing from parsing the device tree based on heuristics to parsing it based on the spec. This should also lay the foundation for NEW_PCIB on PowerPC.
MFC after: 3 months
|