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: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ifc09da2c8f8afa1aebcc78f8fbc21ac95abdece2
This commit is contained in:
XiaoDong Huang 2020-02-13 14:11:31 +08:00
parent 572fcdd547
commit 11a0a46a89

View File

@ -35,8 +35,8 @@ struct param_ddr_usage {
uint64_t ns_top[DDR_REGION_NR_MAX];
uint32_t s_nr;
uint64_t s_base[DDR_REGION_NR_MAX];
uint64_t s_top[DDR_REGION_NR_MAX];
uint64_t s_base[DDR_REGION_NR_MAX + 1];
uint64_t s_top[DDR_REGION_NR_MAX + 1];
};
struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb);