mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
feat(plat/mediatek/mt8195): add EMI MPU surppot for SCP and DSP
1. Enable domain D0 and D3 (SCP) access 0x50000000~0x51400000. 2. Enable domain D4 (DSP & AFE) access 0x60000000~0x610FFFFF. BUG=b:204347737 TEST=build pass Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Change-Id: I7c9f8490b8898008ba6844c34c9e80caa6066cbc
This commit is contained in:
parent
20ef588e86
commit
690cb1265e
1 changed files with 35 additions and 0 deletions
|
@ -112,5 +112,40 @@ void dump_emi_mpu_regions(void)
|
|||
|
||||
void emi_mpu_init(void)
|
||||
{
|
||||
struct emi_region_info_t region_info;
|
||||
|
||||
/* SCP DRAM */
|
||||
region_info.start = 0x50000000ULL;
|
||||
region_info.end = 0x51400000ULL;
|
||||
region_info.region = 2;
|
||||
SET_ACCESS_PERMISSION(region_info.apc, 1,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
|
||||
NO_PROTECTION, FORBIDDEN, FORBIDDEN, NO_PROTECTION);
|
||||
emi_mpu_set_protection(®ion_info);
|
||||
|
||||
/* DSP protect address */
|
||||
region_info.start = 0x60000000ULL; /* dram base addr */
|
||||
region_info.end = 0x610FFFFFULL;
|
||||
region_info.region = 3;
|
||||
SET_ACCESS_PERMISSION(region_info.apc, 1,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION,
|
||||
FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION);
|
||||
emi_mpu_set_protection(®ion_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_PROTECTION);
|
||||
emi_mpu_set_protection(®ion_info);
|
||||
|
||||
dump_emi_mpu_regions();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue