(toppers-users 3547) Issues on SafeG/NT-/T-ASP/IDEA6410 execution

Roman Kochanek roman.kochanek @ rub.de
2011年 9月 29日 (木) 22:30:30 JST


Hello,

I just started to investigate the SafeG/ASP Project Implementation as a
starting point for another project that
I am working on. So I managed to figure out how to use the different
Cross-Development-Toolchains
as well as to compile different source codes like u-boot, safeg etc. for
the IDEA6410 platform on my own.
Therefore I used the guide which is provided in
"safeg-0.2-10jun2011-src". The result is that compiling is
fine but the execution does not work properly. To emphasize the problem,
I modified the output
values on the console in order to distinguish between the trusted ASP
and the non-trusted ASP.
As far as I understand the execution, firstly Safe_G initializes the
hardware layer and after that starts the
trusted ASP. In the trusted ASP two different tasks are defined and
executed whereas the one w/ a low priority
jumps towards the non-secure world by means of SafeG and starts the
non-trusted ASP executable. And here the
problem occurs so far. On both OS run times, a cyclic task is defined
which will be executed like the name already
says cyclically. But only on the trusted ASP. The attached log shows
that the MAIN task on both sides will be
deployed properly but the cyclic task is only executed on the trusted
ASP. What is the reason for this misbehavior?

NT-ASP:

INCLUDE("target_timer.cfg");

#include "sample1.h"

CRE_CYC(CYCHDR1, { TA_NULL, 0, cyclic_handler, 1000, 0 });
CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, STACK_SIZE,
NULL });

T-ASP:

INCLUDE("target_timer.cfg");
INCLUDE("syssvc/syslog.cfg");
INCLUDE("syssvc/banner.cfg");
INCLUDE("syssvc/serial.cfg");
INCLUDE("syssvc/logtask.cfg");

#include "sample1.h"
CRE_TSK(TASK1, { TA_NULL, 1, task, HIGH_PRIORITY, STACK_SIZE, NULL });
CRE_TSK(BTASK, { TA_ACT, 2, btask, LOW_PRIORITY, STACK_SIZE, NULL });
CRE_CYC(CYCHDR1, { TA_NULL, 0, cyclic_handler, 4000, 0 });
CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, STACK_SIZE,
NULL });

DEF_EXC(EXCH_NO_UNDEF, { TA_NULL, default_exch_undef });
DEF_EXC(EXCH_NO_SWI, { TA_NULL, default_exch_swi });
DEF_EXC(EXCH_NO_PABORT, { TA_NULL, default_exch_pabort });
DEF_EXC(EXCH_NO_DABORT, { TA_NULL, default_exch_dabort });

LOG:
U-Boot 1.1.6 (Sep 22 2011 - 11:14:58) for SMDK6410

****************************************
**    UT-S3C6410/idea6410 SD boot v0.20
**    ShenZhen Urbetter Technology   
**    Http://www.urbetter.com         
****************************** 0
dm9000 i/o: 0x18000300, id: 0x90000a46
MAC: 00:40:5c:26:0a:5b
TFTP from server 192.168.2.153; our IP address is 192.168.2.222
Filename 'safeg.bin'.
Load address: 0x57800000
Loading: T T #######
done
Bytes transferred = 34448 (8690 hex)
dm9000 i/o: 0x18000300, id: 0x90000a46
MAC: 00:40:5c:26:0a:5b
TFTP from server 192.168.2.153; our IP address is 192.168.2.222
Filename 'trust.bin'.
Load address: 0x57a00000
Loading: T #####
done
Bytes transferred = 21024 (5220 hex)
dm9000 i/o: 0x18000300, id: 0x90000a46
MAC: 00:40:5c:26:0a:5b
TFTP from server 192.168.2.153; our IP address is 192.168.2.222
Filename 'non-trust.bin'.
Load address: 0x57c00000
Loading: T ##
done
Bytes transferred = 8272 (2050 hex)
## Starting application at 0x57808640 ...

TOPPERS/ASP Kernel Release 1.6.0 for IDEA6410T(ARM) (Sep 26 2011, 10:44:41)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
                            Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2010 by Embedded and Real-Time Systems Laboratory
            Graduate School of Information Science, Nagoya Univ., JAPAN

Trust-ASP: Sample program starts (exinf = 0).
Trust-ASP: *(0x7F008820)=0x1111
(1) Trust-ASP: Sample program starts (exinf = 0).
(2) Trust-ASP: Sample program starts (exinf = 0).
(5) Trust-ASP: *(0x7F008824)=0x3F(should be F)
NON-TRUST: hello!
(4) Trust-ASP: *(0x7F008824)=0x3A(should be 0)
(5) Trust-ASP: *(0x7F008824)=0x3F(should be F)
(4) Trust-ASP: *(0x7F008824)=0x3A(should be 0)