Commit 88ddb601 authored by Madhukar Pappireddy's avatar Madhukar Pappireddy Committed by TrustedFirmware Code Review
Browse files

Merge "mediatek: mt8192: Add MPU Support for SCP/PCIe" into integration

parents 258f6a2d a564bdc5
......@@ -91,30 +91,41 @@ int emi_mpu_set_protection(struct emi_region_info_t *region_info)
void emi_mpu_init(void)
{
/* Set permission */
struct emi_region_info_t region_info;
/* PCE-e protect address(TODO) */
region_info.start = 0x80000000ULL;
region_info.end = 0x83FF0000ULL;
/* reserve region 0 for future use */
/* PCI-e protect address(64MB) */
region_info.start = 0xC0000000ULL;
region_info.end = 0xC3FF0000ULL;
region_info.region = 1;
SET_ACCESS_PERMISSION(region_info.apc, 1,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, NO_PROT,
NO_PROT /*FORBIDDEN*/);
FORBIDDEN, FORBIDDEN, NO_PROT, NO_PROT);
emi_mpu_set_protection(&region_info);
/* SCP protect address */
region_info.start = 0x50000000ULL;
region_info.end = 0x513F0000ULL;
region_info.region = 2;
SET_ACCESS_PERMISSION(region_info.apc, 1,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN,
NO_PROT, 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 = 2;
region_info.region = 3;
SET_ACCESS_PERMISSION(region_info.apc, 1,
NO_PROT, NO_PROT, NO_PROT, NO_PROT,
NO_PROT, NO_PROT, NO_PROT, NO_PROT,
NO_PROT, NO_PROT, NO_PROT, NO_PROT,
NO_PROT, FORBIDDEN, NO_PROT, NO_PROT);
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();
......
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