Commit 11a0a46a authored by XiaoDong Huang's avatar XiaoDong Huang
Browse files

rockchip: fix definition of struct param_ddr_usage



In extreme cases, the number of secure regions is one more than
non-secure regions. So array "s_base" and "s_top"s size
in struct param_ddr_usage need to be adjust to "DDR_REGION_NR_MAX + 1".
Signed-off-by: default avatarXiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ifc09da2c8f8afa1aebcc78f8fbc21ac95abdece2
parent 572fcdd5
...@@ -35,8 +35,8 @@ struct param_ddr_usage { ...@@ -35,8 +35,8 @@ struct param_ddr_usage {
uint64_t ns_top[DDR_REGION_NR_MAX]; uint64_t ns_top[DDR_REGION_NR_MAX];
uint32_t s_nr; uint32_t s_nr;
uint64_t s_base[DDR_REGION_NR_MAX]; uint64_t s_base[DDR_REGION_NR_MAX + 1];
uint64_t s_top[DDR_REGION_NR_MAX]; uint64_t s_top[DDR_REGION_NR_MAX + 1];
}; };
struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb); struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment