Subversion Repositories HelenOS-historic

Rev

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

Rev 170 Rev 195
Line 40... Line 40...
40
#include <debug.h>
40
#include <debug.h>
41
#include <arch/asm.h>
41
#include <arch/asm.h>
42
#include <mm/frame.h>
42
#include <mm/frame.h>
43
#include <mm/page.h>
43
#include <mm/page.h>
44
#include <mm/heap.h>
44
#include <mm/heap.h>
-
 
45
#include <print.h>
-
 
46
#include <memstr.h>
-
 
47
#include <arch/i8259.h>
45
 
48
 
46
#ifdef __SMP__
49
#ifdef __SMP__
47
 
50
 
48
static struct smp_config_operations *ops = NULL;
51
static struct smp_config_operations *ops = NULL;
49
 
52
 
Line 134... Line 137...
134
         * Prepare new GDT for CPU in question.
137
         * Prepare new GDT for CPU in question.
135
         */
138
         */
136
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
139
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
137
            panic("couldn't allocate memory for GDT\n");
140
            panic("couldn't allocate memory for GDT\n");
138
 
141
 
139
        memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor));
142
        memcopy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));           // swaped
140
        memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);
143
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
141
        gdtr.base = KA2PA((__address) gdt_new);
144
        gdtr.base = KA2PA((__address) gdt_new);
142
 
145
 
143
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
146
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
144
            /*
147
            /*
145
                 * There may be just one AP being initialized at
148
                 * There may be just one AP being initialized at