feat(plat/mediatek/mpu): add MPU support for DSP

Forbidden domain D4(DSP) access 0x40000000~0x1FFFF0000.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Change-Id: If409df10cecbcccc493d7958ab2765fd110d9009
This commit is contained in:
Jiaxin Yu 2021-04-28 16:36:15 +08:00 committed by Rex-BC Chen
parent b35f8f2d1e
commit 6c4973b0a9

View file

@ -117,7 +117,7 @@ void emi_mpu_init(void)
NO_PROT, FORBIDDEN, FORBIDDEN, NO_PROT);
emi_mpu_set_protection(&region_info);
/* Forbidden All */
/* DSP protect address */
region_info.start = 0x40000000ULL; /* dram base addr */
region_info.end = 0x1FFFF0000ULL;
region_info.region = 3;
@ -128,6 +128,17 @@ void emi_mpu_init(void)
FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROT);
emi_mpu_set_protection(&region_info);
/* Forbidden All */
region_info.start = 0x40000000ULL; /* dram base addr */
region_info.end = 0x1FFFF0000ULL;
region_info.region = 4;
SET_ACCESS_PERMISSION(region_info.apc, 1,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROT);
emi_mpu_set_protection(&region_info);
dump_emi_mpu_regions();
}