Skip to content

Conversation

@junaidaslamRS
Copy link
Collaborator

  • Introduced a Memory Parent Node to create a simple-bus for making SPI build pass.
  • Corrected the SPI interface clock from 26.6MHz to 13.3MHz in board DTS. [We need to correct the reference in EmbeddedCommon-Dev too]
  • Changed one of the values in SFDP Header to specify the correct sector erase command as per our soc prototype flash chip.
  • Erase, Read, Write all working ok now.

Copy link
Collaborator

@rahul-r-shah rahul-r-shah left a comment

Choose a reason for hiding this comment

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

Actually these are not requests, but more some questions.

status = "okay";
};

ilm: memory@A0200060 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ilm: memory@A0200060 {
ilm: memory@A0200060 {

Should the address be A0200060 or A0200000?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can definitely change it. Our FSBL binary is run from 0xA020005C because the first 5C bytes are taken by UBI header. The Zephyr binary address is kept 0xA0200060 due to alignment issues and also considering UBI header space.

If we know how Zephyr will be put in ILM, we can then think of its execution location accordingly.

Copy link
Collaborator

@rahul-r-shah rahul-r-shah Jul 4, 2024

Choose a reason for hiding this comment

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

We can definitely change it. Our FSBL binary is run from 0xA020005C because the first 5C bytes are taken by UBI header. The Zephyr binary address is kept 0xA0200060 due to alignment issues and also considering UBI header space.

If we know how Zephyr will be put in ILM, we can then think of its execution location accordingly.

Ok, I understand you are suggesting that the binary will consist of the UBI header and the actual Zephyr binary too and we will be loading the entire binary into the ILM. But what about the BOP header of the zephyr binary.

Zephyr should be loaded the same way as FSBL. So the ways of loading are

  1. Via openOCD (JTAG): Do we currently load the entire binary (UBI binary with BOP or only the zephyr binary?) and then jump to the FSBL (in this case zephyr)? In this case the loading happens via bootrom code and the FSBL (zephyr image will have to have code for FSBL in the BOP) will be loaded into the ILM (I believe the UBI and the BOP will be stripped and all the security operations, like authentication and decryption will be performed )
  2. Via UART: In this case the CLI will be in XMODEM command and in this mode the unsecure binary will be downloaded
  3. From Flash: In this case the bootrom will decrypt and authenticate (if secure) binary and then will load the FSBL (zephyr) in the load address

Copy link
Collaborator Author

@junaidaslamRS junaidaslamRS Jul 5, 2024

Choose a reason for hiding this comment

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

At the moment, we are loading Zephyr using xmodem command on CLI over USART.

For loading Zephyr via Flash, we will have to use the same method which we use for FSBL on FLASH. Using OpenOCD we load everything on the flash. Then we reboot into SPI boot mode and bootrom then loads Zephyr, after security stuff, into the ILM. In this case, we will need a UBI header of the BOP which will have Zephyr as its binary.

Copy link
Collaborator

@rahul-r-shah rahul-r-shah left a comment

Choose a reason for hiding this comment

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

LGTM. Lets discuss the zephyr start location and make the modifications based on that discuss in future PRs

@junaidaslamRS junaidaslamRS merged commit 58494e3 into virgo_soc_support Jul 10, 2024
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