Subversion Repositories HelenOS-historic

Rev

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

Rev 687 Rev 693
Line 28... Line 28...
28
 
28
 
29
#include <smp/smp.h>
29
#include <smp/smp.h>
30
#include <arch/smp/smp.h>
30
#include <arch/smp/smp.h>
31
#include <arch/smp/mps.h>
31
#include <arch/smp/mps.h>
32
#include <arch/smp/ap.h>
32
#include <arch/smp/ap.h>
-
 
33
#include <arch/boot/boot.h>
33
#include <genarch/acpi/acpi.h>
34
#include <genarch/acpi/acpi.h>
34
#include <genarch/acpi/madt.h>
35
#include <genarch/acpi/madt.h>
35
#include <config.h>
36
#include <config.h>
36
#include <synch/waitq.h>
37
#include <synch/waitq.h>
37
#include <synch/synch.h>
38
#include <synch/synch.h>
Line 139... Line 140...
139
         * Prepare new GDT for CPU in question.
140
         * Prepare new GDT for CPU in question.
140
         */
141
         */
141
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
142
        if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
142
            panic("couldn't allocate memory for GDT\n");
143
            panic("couldn't allocate memory for GDT\n");
143
 
144
 
144
        memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));
145
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
145
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
146
        memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
-
 
147
        protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor);
146
        real_bootstrap_gdtr.base = KA2PA((__address) gdt_new);
148
        protected_ap_gdtr.base = KA2PA((__address) gdt_new);
147
        gdtr.base = (__address) gdt_new;
149
        gdtr.base = (__address) gdt_new;
148
 
150
 
149
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
151
        if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
150
            /*
152
            /*
151
             * There may be just one AP being initialized at
153
             * There may be just one AP being initialized at