Skip to content

Commit

Permalink
plat-hikey: make DRAM0_SIZE and DRAM0_SIZE_NSEC configurable
Browse files Browse the repository at this point in the history
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 <a1231512a@163.com>
  • Loading branch information
zwb-233 committed Apr 25, 2024
1 parent 7f124eb commit 9b64e6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/arch/arm/plat-hikey/platform_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
*/

#define DRAM0_BASE 0x00000000
#define DRAM0_SIZE 0x3F000000
/* DRAM0 exists below TZDRAM */
#define DRAM0_SIZE (CFG_TZDRAM_START - DRAM0_BASE)
#define DRAM0_SIZE_NSEC 0x3E000000
#define DRAM1_BASE CFG_DRAM1_BASE

Expand All @@ -130,7 +131,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)
#define DRAM2_BASE 0x200000000
#define DRAM2_SIZE_NSEC 0x20000000
#elif (CFG_DRAM_SIZE_GB == 6)
Expand Down

0 comments on commit 9b64e6e

Please sign in to comment.