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

[RFC] Initial Platform support for Altera Cyclonev SoC #7266

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rajeshrah22
Copy link

Modified code from Zynq7k platform port.

ARM Cortex A9 armv7.

OP-TEE successfully initializes and jumps to NS world.

Summary of changes:

  • Changed UART driver to a compatible one.
  • Removed writes to SLCR_TZ registers, which don't exist on cyclonev.
  • Initally unlocked all security rules in the L3 interconnect TrustZone Firewall.
  • Override init_sec_mon to provide dt blob address and linux jump address in respective registers. (Hardcoded for now).

Problems:

  • does not work with CFG_WITH_PAGER yet.
  • Have not tried to enable dual core (boot secondary).

Boot flow:
SPL --> U-boot --> optee -> Linux

Integrating with Linux:

  • Kernel panics with what we think is an un-handled page fault when initializing optee driver.
    This occurs when allocating a memory pool (Probably for the shared memory region). We will need to go over the
    device tree modifications that added optee firmware node and reserved memory nodes.
  • Linux sometimes does not boot (no console logs) after jump from NS world for a reason we are still investigating.

Any guiding questions regarding the issues above would be appreciated. Would love feedback on the plat-cyclonev code as well.

thanks,
Rahul

Modified code from Zynq7k platform.

ARM Cortex A9 armv7.

Summary of changes:
- Changed UART driver to a compatible one.
- Removed writes to SLCR_TZ registers, which don't exist on cyclonev.
- Initally unlocked all security rules in the L3 interconnect TrustZone
  Firewall.
- Override init_sec_mon to provide dt blob address and linux jump
  address in respective registers.

Signed-off-by: Rahul Rajesh <[email protected]>
* TA_RAM : all what is left (at least 2MByte !)
*/

#define TZDRAM_BASE 0x3fd00000
Copy link
Author

@rajeshrah22 rajeshrah22 Feb 6, 2025

Choose a reason for hiding this comment

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

The changes for the platform_config.h file are at the bottom when CFG_WITH_PAGER is disabled. I have changed the TZDRAM_BASE only compared to the zynq7k code.

@rajeshrah22 rajeshrah22 changed the title Initial Platform support for Altera Cyclonev SoC [RFC] Initial Platform support for Altera Cyclonev SoC Feb 6, 2025
@jenswi-linaro
Copy link
Contributor

Paging in emulated SRAM is only needed to test the pager on hardware to ensure it works with platforms that use real SRAM. So, unless you plan to use real SRAM with the pager, you can remove that part to save some work.

You could try $(call force,CFG_CORE_RESERVED_SHM,n) to disable the reserved shared memory pool and rely on dynamic shared memory only.

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.

2 participants