ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

Decouple platforms from plat/arm #670

Closed ghost closed 5 years ago

ghost commented 5 years ago

There are some non-Arm platforms that are using files inside the plat/arm tree.

It would be helpful to break the dependencies. If there are some functions/macros that can be helpful outside of Arm platforms, it would be a good idea to mention it. We have already done it in the past: https://github.com/ARM-software/arm-trusted-firmware/pull/1647/commits/0916c38deca4a2e26720da6b1aa1e15de87f9a34

sandeepbrcm commented 5 years ago

From a first look I think plat_arm_gic_driver_xxx arm_gicv3.c , arm_gicv2.c can be moved out of plat/arm ? The wrappers are just to choose between v2 and v3.

ghost commented 5 years ago
sandeepbrcm commented 5 years ago

Thanks. plat_arm_gic_driver_xxx by this I meant all the generic functions in arm gicv2 gicv3 drivers, nothing specific. I agree that all arm platforms would have to be changed. I am planing to upstream a Broadcom SoC support. I am going to take a replica of these files into plat/brcm initially followed by an attempt to move gicv2 gicv3 to common.

ghost commented 5 years ago

Yes, I think that in this case the best option is to copy the files and change the "plat_arm" prefixes to "brcm" or similar. This is not ideal, though, because other platforms don't get to benefit from changes we do to said files. However, that also means that we won't break other platforms by mistake while modifying Arm platforms.

sandeepbrcm commented 5 years ago

Thanks. One more question on this is: - should arm spdx header be retained in those files, where probably only changes are the prefixes ?

ghost commented 5 years ago

The copyright line? I guess so, and update the year.

sandeepbrcm commented 5 years ago

The copyright line? I guess so, and update the year.

Thanks.