Skip to content

Commit f124350

Browse files
committedApr 2, 2015
runtime: disable kernel-CPU functions when kernel-CPU not present
1 parent 4b66e31 commit f124350

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

Diff for: ‎soc/runtime/test_mode.c

+4
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ static char *get_token(char **str)
305305
return d;
306306
}
307307

308+
#ifdef CSR_KERNEL_CPU_BASE
308309
static const unsigned int test_program[] = {
309310
0x1860dead, // l.movhi r3,0xdead
310311
0x1880d000, // l.movhi r4,0xd000
@@ -326,6 +327,7 @@ static void cputest(void)
326327
for(i=0;i<10;i++)
327328
printf("%08x\n", MMPTR(0xd0000000));
328329
}
330+
#endif
329331

330332
static void do_command(char *c)
331333
{
@@ -349,7 +351,9 @@ static void do_command(char *c)
349351
else if(strcmp(token, "ddsftw") == 0) ddsftw(get_token(&c), get_token(&c));
350352
else if(strcmp(token, "ddstest") == 0) ddstest(get_token(&c));
351353

354+
#ifdef CSR_KERNEL_CPU_BASE
352355
else if(strcmp(token, "cputest") == 0) cputest();
356+
#endif
353357

354358
else if(strcmp(token, "") != 0)
355359
printf("Command not found\n");

0 commit comments

Comments
 (0)
Please sign in to comment.