Comments (4)
When blx r3
which is the instruction which cause system hangs. Seems this is cache or mmu set issue. Still have no clear idea.
movw r3, #35e5
movt r3, #9c10
blx r3 --> system hangs
from optee_os.
Without LPAE ttbr0 is only supposed to cover low address (<= 32 MiB), perhaps TTBCR.N isn't 7.
from optee_os.
Hi Jens,
I have found the root cause. Actually TTBCR.N is 7. We should first clear the tbl_info.table before fill mmu entries. From my debug info, the first entry is leaved and not set. So when set ttbr0, it corrupts system and hangs. After the following piece of code, all is fine.
diff --git a/core/arch/arm/mm/core_mmu_v7.c b/core/arch/arm/mm/core_mmu_v7.c
index 0ea0da3..10ed12b 100644
--- a/core/arch/arm/mm/core_mmu_v7.c
+++ b/core/arch/arm/mm/core_mmu_v7.c
@@ -379,6 +379,13 @@ static paddr_t populate_user_map(struct tee_mmu_info *mmu)
tbl_info.shift = SECTION_SHIFT;
tbl_info.num_entries = TEE_MMU_UL1_NUM_ENTRIES;
+ /*
-
\* Need to clear the table before use, because there maybe junk
-
\* data at tlb_info.table, which may corrupt system when set ttbr0
-
*/
-
memset(tbl_info.table, 0x00,
-
sizeof(unsigned long) \* tbl_info.num_entries);
-
region.pa = 0;
region.va = va_range_base;
region.attr = 0;
from optee_os.
Fix in #342
from optee_os.
Related Issues (20)
- 0xffff0007 = TEEC_ERROR_BAD_STATE when RPMB is enabled in OPTEE HOT 4
- TEE_BigInt use TEE_Malloc init it panic HOT 1
- Potenssial issue in persistent_token.c::init_persistent_db() HOT 5
- rcu_preempt stalls detected on EMSG, IMSG and DMSG in optee HOT 4
- low memory in Android U CTS test HOT 2
- how can i use Gmp library in TA with optee 4.2? HOT 2
- Mapping of memory for external DT HOT 3
- PKCS11 doesn't write Persistent keys: Keys removed after reboot HOT 1
- Is there a discrepancy between QEMU and the actual development board? HOT 7
- optee rpmb secure storage example in u-boot: TEE_ERROR_ITEM_NOT_FOUND HOT 7
- When i use for init TEE_BigInt *par0[NUM_PRIMES],it toast init failed. HOT 1
- how can i init a very large uint8_t arry to TEE_BigInt??? HOT 2
- Supporting Ubuntu + OP-TEE as a QEMU Target HOT 2
- import sm2 public key and encrypt by it
- [Build][Device tree] Device tree update ignored due to makefile dependency HOT 2
- Subject: Buildroot Error: [package/pkg-generic.mk:273: /optee/out-br/build/host-tar-1.35/.stamp_configured] Error 1 HOT 3
- Potential memory leak? HOT 2
- Support for changing the secure storage provisioning path. HOT 2
- CKM_HKDF_DERIVE support in OP-TEE PKCS#11 ? HOT 9
- PKCS#11 TA Pin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optee_os.