-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
plat-hikey: make DRAM0_SIZE and DRAM0_SIZE_NSEC configurable #6718
Conversation
DRAM0_SIZE is now defined as CFG_TZDRAM_START, allowing for dynamic configuration. DRAM0_SIZE_NSEC is modified to calculate the size relative to DRAM0_BASE. Signed-off-by: Wen Bin <[email protected]>
@@ -105,7 +105,7 @@ | |||
*/ | |||
|
|||
#define DRAM0_BASE 0x00000000 | |||
#define DRAM0_SIZE 0x3F000000 | |||
#define DRAM0_SIZE CFG_TZDRAM_START |
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.
size = start? This doesn't seem to make much sense does it?
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.
I think the size of DRAM0_SIZE should match that of CFG_TZDRAM_START, as it appears that only DRAM0 exists before TZDRAM. However, if you think this change is unnecessary, please let me know, and I will close this pull request later.
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.
You're right, sorry I did not see that. Would you mind adding a comment /* DRAM0 exists below TZDRAM */
?
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.
For consistency and for future new readers, prefer: #define DRAM0_SIZE (CFG_TZDRAM_START - DRAM0_BASE)
even if the result is the same in the generated image.
@@ -130,7 +130,7 @@ | |||
#if (CFG_DRAM_SIZE_GB == 3) | |||
#define DRAM1_SIZE_NSEC 0x80000000 | |||
#elif (CFG_DRAM_SIZE_GB == 4) | |||
#define DRAM1_SIZE_NSEC 0xA0000000 | |||
#define DRAM1_SIZE_NSEC 0xE0000000 - DRAM1_BASE |
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.
parentheses needed
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
This commit aims to enable the dynamic adjustment of DRAM0_SIZE and DRAM0_SIZE_NSEC for Hikey960 based on the changes in CFG_TZDRAM_START.