Subversion Repositories freemyipod

Rev

Rev 90 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90 Rev 92
Line 22... Line 22...
22
 
22
 
23
 
23
 
24
#include "global.h"
24
#include "global.h"
25
#include "console.h"
25
#include "console.h"
26
#include "execimage.h"
26
#include "execimage.h"
-
 
27
#include "mmu.h"
27
 
28
 
28
 
29
 
29
int execimage(void* image)
30
int execimage(void* image)
30
{
31
{
31
    struct execimage_header* header = (struct execimage_header*)image;
32
    struct execimage_header* header = (struct execimage_header*)image;
Line 47... Line 48...
47
    {
48
    {
48
        cprintf(CONSOLE_BOOT, "execimage: Image loaded to wrong address! "
49
        cprintf(CONSOLE_BOOT, "execimage: Image loaded to wrong address! "
49
                              "(expected: %08X, got: %08X)\n", header->baseaddr, image);
50
                              "(expected: %08X, got: %08X)\n", header->baseaddr, image);
50
        return -3;
51
        return -3;
51
    }
52
    }
-
 
53
    clean_dcache();
-
 
54
    invalidate_icache();
52
    return thread_create(header->threadname, header->entrypoint, header->stackaddr,
55
    return thread_create(header->threadname, header->entrypoint, header->stackaddr,
53
                         header->stacksize, header->threadtype, header->threadpriority, true);
56
                         header->stacksize, header->threadtype, header->threadpriority, true);
54
}
57
}