Subversion Repositories HelenOS-historic

Rev

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

Rev 814 Rev 822
Line 136... Line 136...
136
        }
136
        }
137
       
137
       
138
        /*
138
        /*
139
         * Prepare new GDT for CPU in question.
139
         * Prepare new GDT for CPU in question.
140
         */
140
         */
141
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
141
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor), FRAME_ATOMIC)))
142
            panic("couldn't allocate memory for GDT\n");
142
            panic("couldn't allocate memory for GDT\n");
143
 
143
 
144
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
144
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
145
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
145
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
146
        protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor);
146
        protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor);