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

Link real IMM_ROM_EXT into ROM_EXT #25686

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

lchiawei
Copy link
Contributor

@lchiawei lchiawei commented Dec 17, 2024

This PR mainly does the work about the IMM_ROM_EXT linking, including following commits:

  • Refine the linker script and startup assembly for our real IMM_ROM_EXT.
  • Make ROM_EXT use prebuilt IMM_ROM_EXT binary during the linking phase, instead of calling imm_rom_ext_main() in rom_ext_main().
  • Modify some bazel rules to make the ROM_EXT choose correct IMM_ROM_EXT binary according to the exec_env. For silicon creator, also add a new exec_env that does not contain a manifest to skip the signing phase.
  • Support IMM_ROM_EXT for slot A & B besides original virtual slot usage.

@lchiawei lchiawei requested review from cfrantz and a team as code owners December 17, 2024 19:23
@lchiawei lchiawei requested review from moidx, a team and timothytrippel and removed request for a team December 17, 2024 19:23
@lchiawei lchiawei force-pushed the link-main-imm branch 5 times, most recently from 3f86086 to d6eb8e8 Compare December 19, 2024 08:19
sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_epmp.c Outdated Show resolved Hide resolved
sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_epmp.c Outdated Show resolved Hide resolved
hw/top_earlgrey/BUILD Outdated Show resolved Hide resolved
@timothytrippel
Copy link
Contributor

@lchiawei could you also rebase this on the latest tip of tree since it has been a few weeks since this was submitted (to prevent merge SKU)?

@timothytrippel
Copy link
Contributor

I think this can be rebased now to fix the merge conflicts.

@lchiawei
Copy link
Contributor Author

lchiawei commented Jan 9, 2025

I think this can be rebased now to fix the merge conflicts.

Thanks for reviewing my PR, I have rebased my commit chain now. However, the CI seems to be cancelled and we may need to trigger the tests again.

@timothytrippel timothytrippel added the CI:Rerun Rerun failed CI jobs label Jan 15, 2025
@github-actions github-actions bot removed the CI:Rerun Rerun failed CI jobs label Jan 15, 2025
hw/top_earlgrey/BUILD Outdated Show resolved Hide resolved
hw/top_earlgrey/BUILD Outdated Show resolved Hide resolved
hw/top_earlgrey/BUILD Outdated Show resolved Hide resolved
sw/device/silicon_creator/imm_rom_ext/defs.bzl Outdated Show resolved Hide resolved
* Refine ld and .S file for IMM_ROM_EXT.
* Update the hello-world IMM_ROM_EXT to access some data in .data and
  .bss sections to make sure the startup initialization is implemented
  correctly.

Signed-off-by: Chia-Wei Liu <[email protected]>
Remove calling imm_rom_ext_main in rom_ext_main, and use prebuilt
IMM_ROM_EXT instead.

Signed-off-by: Chia-Wei Liu <[email protected]>
* Add mechanism to select corresponding IMM_ROM_EXT sections when
  building ROM_EXT based on the exec_env
* Add a new "none manifest" and skip the signing phase when building
  binaries if we use the none manifest
* Add extra_bazel_features for IMM_ROM_EXT (as what we did for ROM_EXT
  targets) for code size optimization

Signed-off-by: Chia-Wei Liu <[email protected]>
@lchiawei lchiawei force-pushed the link-main-imm branch 2 times, most recently from 2d29fbb to 3613069 Compare January 22, 2025 05:14
As now we always link IMM_ROM_EXT into ROM_EXT, the address of
IMM_ROM_EXT's linker for slot A/B ROM_EXT should be adjusted. Apply
similar solution from ROM_EXT's linker scripts on IMM_ROM_EXT ones.

Also cleaned up the hello-world ROM code as we do not need them anymore.

Signed-off-by: Chia-Wei Liu <[email protected]>
@timothytrippel timothytrippel self-requested a review January 22, 2025 23:45
@timothytrippel timothytrippel merged commit 276caf8 into lowRISC:master Jan 22, 2025
38 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