Subversion Repositories HelenOS-historic

Rev

Rev 993 | Rev 1187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 993 Rev 1138
Line 41... Line 41...
41
{
41
{
42
    __address base;
42
    __address base;
43
   
43
   
44
    base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH);
44
    base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH);
45
 
45
 
46
    if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + (1<<KERNEL_PAGE_WIDTH)) {
46
    if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + (1<<(KERNEL_PAGE_WIDTH))) {
47
        /*
47
        /*
48
         * Kernel stack of this thread is not mapped by DTR[TR_KERNEL].
48
         * Kernel stack of this thread is not mapped by DTR[TR_KERNEL].
49
         * Use DTR[TR_KSTACK] to map it.
49
         * Use DTR[TR_KSTACK1] and DTR[TR_KSTACK2] to map it.
50
         */
50
         */
51
         dtlb_kernel_mapping_insert((__address) THREAD->kstack, KA2PA(THREAD->kstack), true, DTR_KSTACK);
51
        dtlb_kernel_mapping_insert((__address) THREAD->kstack, KA2PA(THREAD->kstack), true, DTR_KSTACK1);
-
 
52
        dtlb_kernel_mapping_insert((__address) THREAD->kstack + PAGE_SIZE, KA2PA(THREAD->kstack) + FRAME_SIZE, true, DTR_KSTACK2);
52
    }
53
    }
53
   
54
   
54
    /*
55
    /*
55
     * Record address of kernel backing store to bank 0 r22.
56
     * Record address of kernel backing store to bank 0 r22.
56
     * Record address of kernel stack to bank 0 r23.
57
     * Record address of kernel stack to bank 0 r23.