ti: k3: common: Fix RO data area size calculation
authorAndrew F. Davis <afd@ti.com>
Thu, 25 Apr 2019 17:52:54 +0000 (13:52 -0400)
committerAndrew F. Davis <afd@ti.com>
Fri, 26 Apr 2019 15:45:50 +0000 (11:45 -0400)
The size of the RO data area was calculated by subtracting the area end
address from itself and not the base address due to a typo. Fix this
here.

Note, this was noticed at a glance thanks to the new aligned formating
of this table.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Change-Id: I994022ac9fc95dc5e37a420714da76081c61cce7

plat/ti/k3/common/k3_bl31_setup.c

index b4ec37458b6ae15d623d3364466c429bc11c4633..b3843a4d36735837b8edb89aaa76b1279bc7bd74 100644 (file)
@@ -101,7 +101,7 @@ void bl31_plat_arch_setup(void)
        const mmap_region_t bl_regions[] = {
                MAP_REGION_FLAT(BL31_START,      BL31_END       - BL31_START,     MT_MEMORY  | MT_RW | MT_SECURE),
                MAP_REGION_FLAT(BL_CODE_BASE,    BL_CODE_END    - BL_CODE_BASE,   MT_CODE    | MT_RO | MT_SECURE),
-               MAP_REGION_FLAT(BL_RO_DATA_BASE, BL_RO_DATA_END - BL_RO_DATA_END, MT_RO_DATA | MT_RO | MT_SECURE),
+               MAP_REGION_FLAT(BL_RO_DATA_BASE, BL_RO_DATA_END - BL_RO_DATA_BASE, MT_RO_DATA | MT_RO | MT_SECURE),
                { /* sentinel */ }
        };