Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: architecture-specific FDT devices
> Am 10.09.2025 um 09:43 schrieb Nick Hudson <nick.hudson%gmx.co.uk@localhost>:
>
> On 09/09/2025 12:52, Yuri Honegger wrote:
>> Hello,
>> As already discussed a few days ago, I've been trying to get FDT working with armv5. While doing so, I've run into a
>> build system problem I'm not quite sure how to solve best.
>> In arch/arm/fdt/files.fdt, we attach a gicvthree. Unlike most other devices in files.fdt, gicvthree is defined in
>> arch/arm/cortex/files.cortex. Since armv5 is pre-cortex, my GENERIC_V5 configuration doesn't include files.cortex.
>> I've also noticed that many other devices in files.fdt most likely won't ever be found on an armv5 build and could be
>> left out.
>> Therefore, I've been wondering if it is worth splitting up files.fdt into generic parts and more architecture specific
>> parts.
>> - If so, where would we put them? As files.fdt_cortex next to files.fdt into arch/arm/fdt/?
>> - Or perhaps all the way up into GENERIC / GENERIC64?
>> - If we don't want to split it, how can you break the gicvthree dependency described above?
>
> Does something like the following work/help
>
> -file arch/arm/fdt/gicv3_fdt.c gicv3_fdt
> +file arch/arm/fdt/gicv3_fdt.c gicv3_fdt & cpu_armv8
Unfortunately, that doesn’t work. The issue is about device definitions from the build system. files.cortex defines a device gicvthree which is then referenced by files.fdt in an attach statement. Attach then complains that the device gicvthree isn’t defined because the definition from files.cortex isn’t included. The error doesn’t even touch any C code.
files.cortex:
device gicvthree: pic, pic_splfuncs
file arch/arm/cortex/gicv3.c gicvthree
file arch/arm/cortex/gicv3_its.c gicvthree & pci & __have_pci_msi_msix
files.fdt:
attach gicvthree at fdt with gicv3_fdt
file arch/arm/fdt/gicv3_fdt.c gicv3_fdt & cpu_armv8
the error:
sys/arch/arm/fdt/files.fdt:40: attaching undefined device `gicvthree’
Looking through files.cortex, technically it wouldn’t hurt to also have it in the armv5 build, but it is not a beautiful solution. We will also run into the same issue in reverse for armv5-exclusive devices, so I’d prefer a cleaner solution.
yuri
>
> Nick
Home |
Main Index |
Thread Index |
Old Index