Subversion Repositories HelenOS-historic

Rev

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

Rev 195 Rev 205
Line 137... Line 137...
137
         * Prepare new GDT for CPU in question.
137
         * Prepare new GDT for CPU in question.
138
         */
138
         */
139
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
139
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
140
            panic("couldn't allocate memory for GDT\n");
140
            panic("couldn't allocate memory for GDT\n");
141
 
141
 
142
        memcopy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));           // swaped
142
        memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));
143
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
143
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
144
        gdtr.base = KA2PA((__address) gdt_new);
144
        gdtr.base = KA2PA((__address) gdt_new);
145
 
145
 
146
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
146
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
147
            /*
147
            /*