| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes possible to boot with up to 8 ranges in soc.
Dynamic allocation cannot be used, because ftd_get_ranges
function is called early, when malloc is not available.
Change is required for the alignment of Marvell Armada 38x
device trees present in sys/gnu/dts/arm - originally
the platform has 6 entries in simple-bus 'ranges'.
Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: manu, nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11876
(cherry picked from commit 6ab1e86ae3ea3159e2dd8fae140549a71d5386e5)
|
|
|
|
|
|
|
|
|
|
|
| |
not exist.
This has never caused any issue because #address-cells is mandatory.
Sponsored by: Rubicon Communications, LLC (Netgate)
MFC after: 2 weeks
(cherry picked from commit 1bbed8ea99021d00324e8429e59b5f80b4328d06)
|
|
|
|
|
|
|
|
|
| |
correctly adjusts for the endian.
MFC after: 1 week
Sponsored by: ABT Systems Ltd
(cherry picked from commit 813addbf2cfa303aa2c7515a34cc731222d30d46)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce new OF API function OF_prop_free to free memory allocated by
OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9)
with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc
functions' internals and leads to unneccessary code coupling
- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free
Files affected by this commit are the ones I was able to test on real
hardware. The rest of free(..., M_OFWPROP) instances will be handled with
idividual maintainers
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D6315
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- in atags
- in DT blob (by using 'fdt chosen' U-Boot command)
The command line must start with guard's string 'FreeBSD:' and can contain
list of comma separated kenv strings. Also, boot modifier strings from
boot.h are recognised and parsed into boothowto.
The command line must be passed from U-Boot by setting of bootargs variable:
'setenv bootargs FreeBSD:boot_single=1,vfs.root.mountfrom=ufs:/dev/ada0s1a'
followed by 'fdt chosen' (only for DT based boot)
|
|
|
|
|
|
|
|
|
|
| |
is the physical memory size so may be larger than a u_long can hold, e.g.
on ARM with LPAE we could see an address space of up to 40 bits. On ARM
u_long is only 32 bits so the memory size will be truncated, possibly to
zero.
Reported by: bz
Sponsored by: ABT Systems Ltd
|
|
|
|
|
|
| |
by a few callers.
Sponsored by: ABT Systems Ltd
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use u_long instead of uint32_t variables to avoid overflow
in case of PA space bigger than 32-bit.
Obtained from: Semihalf
Submitted by: Michal Stanek <mst@semihalf.com>
Sponsored by: Annapurna Labs
Approved by: cognet (mentor)
Reviewed by: andrew, br, wma
Differential revision: https://reviews.freebsd.org/D5393
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Strict compatibility requirement is a root of problems when simplebus'
node has two compatibility strings (i.e. on Armada38x). Removing this
requirement should not interfere with other platforms.
fdt_is_compatible_strict() and fdt_find_compatible() calls were changed
in fdt_common.c and mv_common.c.
Reviewed by: ian, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D4602
|
|
|
|
|
|
| |
in this function.
Suggested by: andrew@
|
|
|
|
|
|
| |
Some FDT nodes have complex properties organized as a child sub-nodes
(e.g. timing for LCD panel) we need easy way to obtain handles for
these sub-nodes
|
|
|
|
|
|
| |
device trees have these, for example the ARM AArch64 Foundation Model.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
disallowing us to encode 64-bit register numbers.
Discussed with: nwhitehorn, andrew
|
|
|
|
|
|
|
|
|
|
| |
node. Take this in to account by searching until we find the range for the
root node.
Differential Revision: https://reviews.freebsd.org/D1160
Reviewed by: ian
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
node's interrupts=<...> property creating resource list entries with a
single common implementation. This change makes ofw_bus_intr_to_rl() the
one true copy of that code and removes the copies of it from other places.
This also adds handling of the interrupts-extended property, which allows
specifying multiple interrupts for a node where each interrupt can have a
separate interrupt-parent. The bindings for this state that the property
cells contain an xref phandle to the interrupt parent followed by whatever
interrupt info that parent normally expects. This leads to having a
variable number of icells per interrupt in the property. For example you
could have <&intc1 1 &intc2 26 9 0 &intc3 9 4>.
Differential Revision: https://reviews.freebsd.org/D803
|
|
|
|
|
|
| |
that provides the inverse translation, OF_xref_from_node().
Discussed with: nwhitehorn
|
| |
|
|
|
|
|
|
|
| |
matching 'compatible' property. This probably has a short half-life (as
do most of the fdt_ functions), but it helps solve some near-term needs
until we work out the larger problems of device instantiation order
versus the order of things in the fdt data.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
or going into a near-infinite loop, warn and make potentially-reasonable
assumptions.
Reviewed by: brooks, nwhitehorn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
obsolete. This involves the following pieces:
- Remove it entirely on PowerPC, where it is not used by MD code either
- Remove all references to machine/fdt.h in non-architecture-specific code
(aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat
non-arch-specific).
- Fix code relying on header pollution from machine/fdt.h includes
- Legacy fdtbus.c (still used on x86 FDT systems) now passes resource
requests to its parent (nexus). This allows x86 FDT devices to allocate
both memory and IO requests and removes the last notionally MI use of
fdtbus_bs_tag.
- On those architectures that retain a machine/fdt.h, unused bits like
FDT_MAP_IRQ and FDT_INTR_MAX have been removed.
|
|
|
|
|
| |
OFW_BUS_CONFIG_INTR(). This function is only used by simplebus, so will
likely be moved there in the future.
|
|
|
|
|
| |
which would try to treat the previously-mapped interrupts from
fdt_decode_intr() as interrupt line numbers on the same parent PIC.
|
|
|
|
|
| |
generic OF_xref_phandle() API universally. Also replace some related
explicit uses of fdt32_to_cpu() with OF_getencprop() calls.
|
|
|
|
|
|
|
|
|
|
| |
- Use bus reference phandles in place of FDT offsets as IRQ domain keys
- Unify the identical macio/fdt/mambo OpenPIC drivers into one
- Be more forgiving (following ePAPR) about what we need from the device
tree to identify an OpenPIC
- Correctly map all IRQs into an interrupt domain
- Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of
failing attachment for that device.
|
|
|
|
|
|
|
|
|
|
| |
Implement support for interrupt-parent nodes in simplebus. The current
implementation requires that device declarations have an interrupt-parent
node and that it point to a device that has registered itself as a
interrupt controller in fdt_ic_list_head and implements the fdt_ic
interface.
Sponsored by: DARPA/AFRL
|
|
|
|
|
|
|
| |
u_long too.
Discussed with: ian@
Pointy hat to: ray@
|
|
|
|
| |
We need here max possible storage or dynamic, depend on size of address cell.
|
|
|
|
|
|
| |
o Remove vtophys used to translate virtual address to physical in case rman carry virtual.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
It returns memory regions restricted from being used by kernel. These
regions are dfined in "memreserve" property of root node in the same
format as "reg" property of /memory node
|
|
|
|
| |
Obtained from: Semihalf
|
|
|
|
| |
Obtained from: Semihalf
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r233822:
Remove useless and wrong piece of code in fdt_get_range() which i
overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl()
to be consistent (that is, print start and end *virtual* addresses).
r230560:
Handle "ranges;"
Make fdt_reg_to_rl() responsible for mapping the device memory, instead
on just hoping that there's only one simplebus, and using fdt_immr_va as
the base VA.
r230315
Add a function to get the PA from range, instead of (ab)using
fdt_immr_pa, and use it for the UART driver
|
|
|
|
|
|
|
|
| |
This lets specify whereabouts of the parent PHY for a given MAC node
(and get rid of ugly kludges in mge(4) and tsec(4)).
Obtained from: Semihalf
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the open firmware standard, finddevice call has to return
a phandle with value of -1 in case of error.
This commit is to:
- Fix the FDT implementation of this interface (ofw_fdt_finddevice) to
return (phandle_t)-1 in case of error, instead of 0 as it does now.
- Fix up the callers of OF_finddevice() to compare the return value with
-1 instead of 0 to check for errors.
- Since phandle_t is unsigned, the return value of OF_finddevice should
be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases
as well.
Reported by: nwhitehorn
Reviewed by: raj
Approved by: raj, nwhitehorn
|
|
|
|
|
| |
interrupt pin pair to a global IRQ number. When multiple PICs exist
on a board, the interrupt pin alone is not unique.
|
|
|
|
|
| |
This removes platform dependencies from <machine>/fdt.h for the benfit of
portability.
|
| |
|
|
o fdtbus(4) - the main abstract bus driver for all FDT-compliant systems. This
is a direct replacement for the many incompatible bus drivers grouping
integrated peripherals on embedded platforms (like obio(4), ocpbus(4) etc.)
o simplebus(4) - bus driver representing ePAPR style 'simple-bus' node, which
is an umbrella device for most of the integrated peripherals on a typical
system-on-chip device.
o Other components (common routines library, PCI node processing helper
functions)
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
|