On Thu, Jan 5, 2017 at 12:06 PM, Ajith Kumar Kumsi < ajithkumar.kumsi@inedasystems.com> wrote:
Hi,
I tried to read DFAR and DFSR registers by adding the below code inside _spinlock_loop as shown below:
_spinlock_loop: MRC p15, 0, r10, c6, c0, 0 MRC p15, 0, r9, c5, c0, 0 ldrex r1, [r0]
In r10 the value is FFFFFFFC
In r9 the value is 8
Any suggestions in this regard.
So DFSR says "Synchronous external abort" and the address is 0xfffffffc. I'm afraid I don't have much to add to that.
Regards, Jens
Regards,
Ajith
*From:* Jens Wiklander jens.wiklander@linaro.org *Sent:* Thursday, January 5, 2017 3:54:51 PM
*To:* Ajith Kumar Kumsi *Cc:* tee-dev@lists.linaro.org *Subject:* Re: [Tee-dev] OpTee porting on ARMv7
On Thu, Jan 5, 2017 at 10:43 AM, Ajith Kumar Kumsi <ajithkumar.kumsi@ inedasystems.com> wrote:
Hi,
Thanks for the quick response.
R0 holds an valid address which belongs to TEE_RAM.
Inside that address the value is 0.
So what's causing the abort then? DFAR and DFSR will give you some clues. Is the address in r0 4 byte aligned?
Regards, Jens
Regards,
Ajith
*From:* Jens Wiklander jens.wiklander@linaro.org *Sent:* Thursday, January 5, 2017 2:55:32 PM
*To:* Ajith Kumar Kumsi *Cc:* tee-dev@lists.linaro.org *Subject:* Re: [Tee-dev] OpTee porting on ARMv7
Hi,
On Thu, Jan 5, 2017 at 10:11 AM, Ajith Kumar Kumsi ajithkumar.kumsi@inedasystems.com wrote:
Hi,
While porting Op-tee.elf on ARM A5 board, it is giving a data abort.
I further tried to debug the code, and I could see that in
generic_boot.c
inside "init_runtime" function when malloc_add_pool(__heap1_start, __heap1_end - __heap1_start) is called, __mutex_lock is getting called
and
when cpu_spin_lock(&m->spin_lock) is called at the below point it gives a data abort exception after "cmp r1, #SPINLOCK_UNLOCK".
_spinlock_loop: ldrex r1, [r0] cmp r1, #SPINLOCK_UNLOCK wfene
Can you let me know if I need to make any modifications to make it work.
That piece of code is used by other platforms so I guess the problem is with the input. What's in r0 would give some clue, because it's supposed to point ot spinlock within __malloc_mu
Regards, Jens
Regards, Ajith
From: Jens Wiklander jens.wiklander@linaro.org Sent: Tuesday, November 29, 2016 6:25:53 PM To: Ajith Kumar Kumsi Cc: tee-dev@lists.linaro.org Subject: Re: [Tee-dev] OpTee porting on ARMv7
On Tue, Nov 29, 2016 at 1:31 PM, Ajith Kumar Kumsi ajithkumar.kumsi@inedasystems.com wrote:
Hi,
Thank you for the reply.
As suggested, I have gone through the http://www.slideshare.net/linaroorg/lcu14-302-how-to-port-
optee-to-another-platform
http://www.slideshare.net/linaroorg/lcu14-302-how-to-port-optee-to-another-platform LCU14 302- How to port OP-TEE to another platform http://www.slideshare.net/linaroorg/lcu14-302-how-to-port-optee-to-another-platform www.slideshare.net LCU14 302- How to port OP-TEE to another platform ----- Speaker: Joakim Bech, Jens Wiklander and Pascal Brand
and https://github.com/OP-TEE/optee_os#3-platforms-supported
https://github.com/OP-TEE/optee_os#3-platforms-supported GitHub - OP-TEE/optee_os: Trusted side of the TEE https://github.com/OP-TEE/optee_os#3-platforms-supported github.com The optee_os git, contains the source code for the TEE in Linux using the ARM® TrustZone® technology. This component meets the GlobalPlatform TEE System ...
I have downloaded optee_os.
I have gone through the other platforms given under "optee_os/core/arch/arm" and created a new platform and modified
changes in
platform_config.h, conf.mk, main.c, uart.c, uart.h files accordingly
related
to the new platform (arm7v-a (cortex a5)).
I tried to export the platform to the new-platform name and tried to
build
using "make".
I can see that tee.bin got generate in optee_os/out/arm-plat-new/core.
I tried to flash tee.elf in to SRAM and I tried to debug using
eclipse, I
can see that it is getting halted at optee_os/core/arch/arm/kernel/generic_entry_a32.S at line 58.
FUNC _start , :
58 b . /* Data abort */
Please suggest me on how to proceed further in this regard.
Since you've obviously got a data abort I'd suggest checking LR and
DFAR for
more clues to the abort.
Regards, Jens
This email has been scanned by the Symantec Email Security.cloud
service.
For more information please visit http://www.symanteccloud.com
Threat Protection Solutions | Symantec http://www.symanteccloud.com/ www.symanteccloud.com Backed by one of the most comprehensive global threat intelligence networks, Symantec protects against known and emerging cyber security threats.
This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify the system
manager.
This message contains confidential information and is intended only for
the
individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and
delete
this e-mail from your system. If you are not the intended recipient you
are
notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.