Changeset 4533601 in mainline


Ignore:
Timestamp:
2005-09-03T17:24:17Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e2455a
Parents:
b6d20a7
Message:

yet another GDT/IDT fix/cleanup

Location:
arch/ia32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/boot/boot.S

    rb6d20a7 r4533601  
    108108        movw %ax, %ss
    109109       
     110        jmpl $KTEXT, $multiboot_meeting_point
     111        multiboot_meeting_point:
     112       
    110113        call map_kernel                                                 # map kernel and turn paging on
    111114       
  • arch/ia32/src/pm.c

    rb6d20a7 r4533601  
    7373struct ptr_16_32 bsp_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
    7474struct ptr_16_32 ap_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
    75 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
    76 struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(idt), .base = KA2PA((__address) idt) };
     75struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt };
    7776
    7877void gdt_setbase(struct descriptor *d, __address base)
     
    167166void pm_init(void)
    168167{
    169         struct descriptor *gdt_p = (struct descriptor *) PA2KA(gdtr.base);
    170 
     168        struct descriptor *gdt_p = (struct descriptor *) gdtr.base;
     169        struct ptr_16_32 idtr;
    171170
    172171        /*
    173172         * Update addresses in GDT and IDT to their virtual counterparts.
    174173         */
    175         if (config.cpu_active == 1)
    176                 gdtr.base = (__address) gdt;
     174        idtr.limit = sizeof(idt);
    177175        idtr.base = (__address) idt;
    178176        __asm__ volatile ("lgdt %0\n" : : "m" (gdtr));
Note: See TracChangeset for help on using the changeset viewer.