diff options
author | Yingjoe Chen <yingjoe.chen@mediatek.com> | 2015-11-13 15:58:55 +0800 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2015-11-19 13:05:07 -0800 |
commit | 7f6c72e2f64ea8bc8e8f024bae384b3ab25b51a8 (patch) | |
tree | 41e23b846f5cee07dae9ee4189dcfb7a787a3ac5 | |
parent | 49a76dbb29dedaa9468f5ac737208aa013e2d8e7 (diff) | |
download | mediatek-7f6c72e2f64ea8bc8e8f024bae384b3ab25b51a8.tar.gz |
[ALPS02156818] M4U: mt8173: enable 4GB mode for trustzone [1/2]
[Detail] if 4GB mode is enable, we also should add 4GB bit in
security pagetable
[Solution] pass the 4GB flag to trustzone and add bit9 in trustzone
pagetable. this is for kernel part.
[Feature] M4U/TEE
[Test] boot ok.
Change-Id: Ie0d461b31061ce72f200429f5d811662d857ae75
CR-Id: ALPS02156818
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
-rw-r--r-- | drivers/misc/mediatek/m4u/mt8173/m4u.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/misc/mediatek/m4u/mt8173/m4u.c b/drivers/misc/mediatek/m4u/mt8173/m4u.c index 5eccff1c4a2c..50450feed749 100644 --- a/drivers/misc/mediatek/m4u/mt8173/m4u.c +++ b/drivers/misc/mediatek/m4u/mt8173/m4u.c @@ -1393,7 +1393,7 @@ static int m4u_sec_init(unsigned int u4NonSecPa, TZ_RESULT ret; param[0].value.a = u4NonSecPa; - param[0].value.b = L2_enable; + param[0].value.b = gM4U_4G_DRAM_Mode; param[1].value.a = 1; paramTypes = TZ_ParamTypes2(TZPT_VALUE_INPUT, TZPT_VALUE_OUTPUT); @@ -1989,9 +1989,12 @@ static int m4u_probe(struct platform_device *pdev) } m4u_domain_init(gM4uDev, &gMvaNode_unknown); + } -#ifdef M4U_TEE_SERVICE_ENABLE - if (!m4u_tee_en) { + m4u_hw_init(gM4uDev, pdev->id); + +#ifdef M4U_TEE_SERVICE_ENABLE /*TEE initial */ + if (0 == pdev->id && !m4u_tee_en) { m4u_buf_info_t *pMvaInfo; unsigned int mva = 0; unsigned int securitymemorysize = 0; @@ -2010,12 +2013,8 @@ static int m4u_probe(struct platform_device *pdev) pMvaInfo->mva = mva; } M4UMSG("reserve sec sz 0x%x mva 0x%x\n", securitymemorysize, mva); - } -#endif } - - m4u_hw_init(gM4uDev, pdev->id); - +#endif M4UINFO("m4u_probe 3 finish...\n"); return 0; |