Changeset 99d6fd0 in mainline for kernel/arch/ia32/src/smp/smp.c
- Timestamp:
- 2009-03-13T12:57:15Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 421c833
- Parents:
- 0160b1c8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/smp.c
r0160b1c8 r99d6fd0 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ … … 132 132 133 133 for (i = 0; i < ops->cpu_count(); i++) { 134 struct descriptor*gdt_new;135 134 descriptor_t *gdt_new; 135 136 136 /* 137 137 * Skip processors marked unusable. … … 160 160 * the memory subsystem 161 161 */ 162 gdt_new = ( struct descriptor*) malloc(GDT_ITEMS *163 sizeof( struct descriptor), FRAME_ATOMIC);162 gdt_new = (descriptor_t *) malloc(GDT_ITEMS * 163 sizeof(descriptor_t), FRAME_ATOMIC); 164 164 if (!gdt_new) 165 165 panic("Cannot allocate memory for GDT."); 166 166 167 memcpy(gdt_new, gdt, GDT_ITEMS * sizeof( struct descriptor));168 memsetb(&gdt_new[TSS_DES], sizeof( struct descriptor), 0);169 protected_ap_gdtr.limit = GDT_ITEMS * sizeof( struct descriptor);167 memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(descriptor_t)); 168 memsetb(&gdt_new[TSS_DES], sizeof(descriptor_t), 0); 169 protected_ap_gdtr.limit = GDT_ITEMS * sizeof(descriptor_t); 170 170 protected_ap_gdtr.base = KA2PA((uintptr_t) gdt_new); 171 171 gdtr.base = (uintptr_t) gdt_new;
Note:
See TracChangeset
for help on using the changeset viewer.