Subversion Repositories HelenOS

Rev

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

Rev 4343 Rev 4344
Line 120... Line 120...
120
   
120
   
121
    /*
121
    /*
122
     * Save 0xa to address 0xf of the CMOS RAM.
122
     * Save 0xa to address 0xf of the CMOS RAM.
123
     * BIOS will not do the POST after the INIT signal.
123
     * BIOS will not do the POST after the INIT signal.
124
     */
124
     */
125
    pio_write_8(0x70, 0xf);
125
    pio_write_8((ioport8_t *)0x70, 0xf);
126
    pio_write_8(0x71, 0xa);
126
    pio_write_8((ioport8_t *)0x71, 0xa);
127
 
127
 
128
    pic_disable_irqs(0xffff);
128
    pic_disable_irqs(0xffff);
129
    apic_init();
129
    apic_init();
130
   
130
   
131
    uint8_t apic = l_apic_id();
131
    uint8_t apic = l_apic_id();
Line 152... Line 152...
152
        }
152
        }
153
       
153
       
154
        /*
154
        /*
155
         * Prepare new GDT for CPU in question.
155
         * Prepare new GDT for CPU in question.
156
         */
156
         */
-
 
157
       
-
 
158
        /* XXX Flag FRAME_LOW_4_GiB was removed temporarily,
-
 
159
         * it needs to be replaced by a generic fuctionality of
-
 
160
         * the memory subsystem
-
 
161
         */
157
        gdt_new = (struct descriptor *) malloc(GDT_ITEMS *
162
        gdt_new = (struct descriptor *) malloc(GDT_ITEMS *
158
            sizeof(struct descriptor), FRAME_ATOMIC | FRAME_LOW_4_GiB);
163
            sizeof(struct descriptor), FRAME_ATOMIC);
159
        if (!gdt_new)
164
        if (!gdt_new)
160
            panic("Cannot allocate memory for GDT.");
165
            panic("Cannot allocate memory for GDT.");
161
 
166
 
162
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
167
        memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
163
        memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);
168
        memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);