Changeset f6297e0 in mainline for arch/ia32/src/pm.c


Ignore:
Timestamp:
2005-09-03T15:45:14Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab08b42
Parents:
2f08a55d
Message:

proper way of initializing GDT during boot on IA-32, fixes the nasty hack
SMP might be still broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/pm.c

    r2f08a55d rf6297e0  
    7171
    7272/* gdtr is changed by kmp before next CPU is initialized */
    73 struct ptr_16_32 gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
     73struct ptr_16_32 bsp_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
     74struct ptr_16_32 ap_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
     75struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
    7476struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(idt), .base = KA2PA((__address) idt) };
    7577
     
    171173         * Update addresses in GDT and IDT to their virtual counterparts.
    172174         */
    173         gdtr.base = KA2PA(gdtr.base);
     175        gdtr.base = (__address) gdt;
    174176        idtr.base = (__address) idt;
    175177        __asm__ volatile ("lgdt %0\n" : : "m" (gdtr));
Note: See TracChangeset for help on using the changeset viewer.