Subversion Repositories HelenOS

Rev

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

Rev 3153 Rev 3211
Line 153... Line 153...
153
       
153
       
154
        /*
154
        /*
155
         * Prepare new GDT for CPU in question.
155
         * Prepare new GDT for CPU in question.
156
         */
156
         */
157
        gdt_new = (struct descriptor *) malloc(GDT_ITEMS *
157
        gdt_new = (struct descriptor *) malloc(GDT_ITEMS *
158
            sizeof(struct descriptor), FRAME_ATOMIC);
158
            sizeof(struct descriptor), FRAME_ATOMIC | FRAME_LOW_4_GiB);
159
        if (!gdt_new)
159
        if (!gdt_new)
160
            panic("couldn't allocate memory for GDT\n");
160
            panic("couldn't allocate memory for GDT\n");
161
 
161
 
162
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
162
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
163
        memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);
163
        memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);