Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xilinx a72 and a78 #252

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

bentheredonethat
Copy link
Contributor

Add support for xilinx platforms cortex a72 on Versal, cortex a78 on versal-net

both of these have support for standalone and baremetal

@bentheredonethat
Copy link
Contributor Author

bentheredonethat commented Sep 12, 2023

Hi @arnopo the failed check is due to Xilinx BSP. The failures are present in other platforms too.

We need the routines as part of enabling Xilinx BSP for these platforms.

Thanks,
Ben

@arnopo
Copy link
Contributor

arnopo commented Sep 12, 2023

Hi @bentheredonethat,

Hi @arnopo the failed check is due to Xilinx BSP. The failures are present in other platforms too.

I can see two issues in CI one is linked to the format of one of your patch, the second is linked to the Zephyr CI, that I just fixed.

We need the routines as part of enabling Xilinx BSP for these platforms.

Thanks, Ben

@bentheredonethat
Copy link
Contributor Author

bentheredonethat commented Sep 12, 2023

@arnopo ok i can update commit message due to warning
"1: UC5 Title exceeds max length (98>72): "lib: generic: zynqmp_a78: Add support for versal_net a78 platform with System Device Tree workflow"

was there anything else?

@bentheredonethat
Copy link
Contributor Author

@arnopo fixed the commit message issue

@bentheredonethat bentheredonethat force-pushed the add-xilinx-a72-and-a78 branch 2 times, most recently from c2a1f59 to 5e536a0 Compare September 12, 2023 15:25
@edmooring
Copy link
Contributor

@arnopo,
How did you handle this for the existing files like apps/system/generic/machine/zynqmp_r5/helper.c in your initial integration with checkpatch?

I could argue that checking for CamelCase in the platform-specific code is wrong in that this code may have to call down into BSP-specific code that may have a very different set of coding conventions.

@arnopo
Copy link
Contributor

arnopo commented Sep 26, 2023

How did you handle this for the existing files like apps/system/generic/machine/zynqmp_r5/helper.c in your initial integration with checkpatch?

I could argue that checking for CamelCase in the platform-specific code is wrong in that this code may have to call down into BSP-specific code that may have a very different set of coding conventions.

I did not handle the exception, it could become difficult to manage.
For me, failing the test but with a justification is acceptable.

@bentheredonethat
Copy link
Contributor Author

@tnmysh to be clear - is the only gap to fix right now the metal-io-mem-map() part? the cache part there is already convention of other platforms.

if so i will work on updating Xilinx BSP and then update the PR with that accordingly.

@bentheredonethat bentheredonethat force-pushed the add-xilinx-a72-and-a78 branch 4 times, most recently from 0a6740f to fa4e21f Compare October 10, 2023 23:49
@tnmysh
Copy link
Collaborator

tnmysh commented Oct 11, 2023

@arnopo we have refactored Xilinx platform specific files and added new platform support accordingly in this PR. I think it's ready to be merged, we can have this one as part of this release.

Do you have any extra comments? I see some failures with checkpatch. camelCasing can't be fixed. Other than that this PR looks good to me.

Copy link
Collaborator

@tnmysh tnmysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

lib/system/generic/xlnx_common/sys.c Outdated Show resolved Hide resolved
lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c Outdated Show resolved Hide resolved
lib/system/freertos/CMakeLists.txt Outdated Show resolved Hide resolved
lib/system/freertos/sys.h Show resolved Hide resolved
lib/system/freertos/CMakeLists.txt Outdated Show resolved Hide resolved
lib/system/generic/sys.h Show resolved Hide resolved
lib/system/freertos/sys.h Show resolved Hide resolved
@bentheredonethat
Copy link
Contributor Author

bentheredonethat commented Oct 12, 2023

Hi @arnopo i just pushed another version. i testd zynq, zynqmp-a53 and zynqmp-r5 for freertos and generic. all of these passed.

That being said, if you will do not want the sys.c/sys.h xilinx common code consolidated i am fine with that.

@bentheredonethat bentheredonethat force-pushed the add-xilinx-a72-and-a78 branch 2 times, most recently from 0fb9132 to 5dbbf87 Compare October 12, 2023 21:54
Copy link
Contributor

@arnopo arnopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor clean-up to address, else LGTM

lib/system/generic/xlnx/CMakeLists.txt Show resolved Hide resolved
@arnopo arnopo added this to the Release V2023.10 milestone Oct 13, 2023
@bentheredonethat
Copy link
Contributor Author

Hi @arnopo on my end there is a lot of testing to cover. I would ask that this not be included in the upcoming release.

Thanks
CC @tnmysh

@tnmysh tnmysh self-requested a review October 13, 2023 15:49
@tnmysh
Copy link
Collaborator

tnmysh commented Oct 13, 2023

@arnopo I removed my ACK till Ben confirms this is working.
We can exclude this commit from this release and merge it later.

@bentheredonethat
Copy link
Contributor Author

@arnopo i did testing for builds of apps and demos that use libmetal for xilinx paltforms. im ok t to proceed now
CC @tnmysh

Copy link
Collaborator

@tnmysh tnmysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch removes almost 1000 lines (~400 line of code) from libmetal library and we can achieve same platform support.

Thanks @bentheredonethat for efforts. When your side testing is done please let us know.
This will be good addition to release.

@bentheredonethat
Copy link
Contributor Author

im ok with testing on my side

@arnopo
Copy link
Contributor

arnopo commented Oct 16, 2023

@bentheredonethat
Please, could you rebase it on top of main branch that fixes CI test

@tnmysh : then ok to merge?

@bentheredonethat
Copy link
Contributor Author

@arnopo i woke up sick today.. will try to do today. otherwise will hopefully do tomorrow

@tnmysh
Copy link
Collaborator

tnmysh commented Oct 16, 2023

@bentheredonethat Please, could you rebase it on top of main branch that fixes CI test

@tnmysh : then ok to merge?

Yes I am ok to merge.

lib/utilities.h provided MB and GB macros so include from there
instead of providing the definition again for a53 platforms.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Move common code in Xilinx area to consolidated location to remove
redundant code.

Enable A72 and A78 build in Standalone BSP.

lib: generic: Add support for a78 with System Device Tree flow

System Device Tree workflow is AMD-Xilinx workflow whereby the BSP,
libraries and applications in software are derived from a
hardware-design. The hardware-design is used to generate a system
device tree (SDT) that describes information for Linux and other
processing environments.

The xreg/xcpu files are not generated for SDT workflow. Because of
this do not include if SDT symbol is present in BSP.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Move common code in Xilinx area to consolidated location to remove
redundant code.

Enable A72 and A78 build in BSP for FreeRTOS OS.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
@bentheredonethat
Copy link
Contributor Author

@arnopo rebased off latest

@arnopo arnopo merged commit f6a87a8 into OpenAMP:main Oct 17, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants