-
Notifications
You must be signed in to change notification settings - Fork 8.2k
arch: riscv: common: linker: Add itcm & dtcm sections #37421
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
arch: riscv: common: linker: Add itcm & dtcm sections #37421
Conversation
|
@nandojve My opinion is DTCM and ITCM are implemented on SiFive SoCs, but are they based on some standard of RISC-V arch? |
Hi @katsuster , This is for a SiFive E24 core with two TCM units of 48k each. Both units can be used for instruction or data and can be combined on a big 96k region, since are continuous. |
|
The concept of TCM is not specific to any architecture. Just with a quick grep, it looks as though the concepts of itcm / dtcm are not architecture-specific in Zephyr (which is a good thing, and I'm happy to see that). The terminology originates from ARM of course. SiFive actually calls their implementation TIM (tightly-integrated memory). Sources:
Likely the addition did come from ARM / cortex-m though
Given that, I don't see a problem with adding it here as well, or to any other architecture for that matter. I think it was likely defined in an architecture-independent way specifically for this use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please increase alignment to 8 bytes to accomodate rv64. Alignment could also eventually be a DT property.
bf1a57c to
bd510ac
Compare
Yes, names were chosen to be compliant with zephyr,i/dtcm devicetree nodes, for instance: zephyr/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts Lines 25 to 26 in 689864e
All sections were align to 8 bytes, just to make sure. |
The current riscv linker script don't have sections for Data & Instruction Tightly Coupled Memory. Add itcm and dtcm sections to make it available. All sections were 8 byte align to keep compatible with rv64 SoCs. Signed-off-by: Gerson Fernando Budke <[email protected]>
bd510ac to
e99513e
Compare
|
Apply #37484 rename. |
The current riscv linker script don't have sections for Data & Instruction Tightly Coupled Memory. Add itcm and dtcm sections to make it available.
Signed-off-by: Gerson Fernando Budke [email protected]