Changeset 69a5600 in mainline
- Timestamp:
- 2006-04-29T11:32:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2382d09
- Parents:
- 429ff2ea
- Location:
- arch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/proc/scheduler.c
r429ff2ea r69a5600 48 48 ptr_16_64_t cpugdtr; 49 49 descriptor_t *gdt_p; 50 tss_descriptor_t *tss_desc; 50 51 51 52 /* … … 62 63 bitmap_copy(&iomap, &TASK->arch.iomap, TASK->arch.iomap.bits); 63 64 /* 64 * It is safe to set the trailing fourbits because of the extra65 * It is safe to set the trailing eight bits because of the extra 65 66 * convenience byte in TSS_IOMAP_SIZE. 66 67 */ 67 bitmap_set_range(&iomap, TASK->arch.iomap.bits, 4);68 bitmap_set_range(&iomap, TASK->arch.iomap.bits, 8); 68 69 } 69 70 spinlock_unlock(&TASK->lock); … … 74 75 gdt_tss_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE + BITS2BYTES(bits) - 1); 75 76 gdtr_load(&cpugdtr); 77 78 /* 79 * Before we load new TSS limit, the current TSS descriptor 80 * type must be changed to describe inactive TSS. 81 */ 82 tss_desc = (tss_descriptor_t *) &gdt_p[TSS_DES]; 83 tss_desc->type = AR_TSS; 84 tr_load(gdtselector(TSS_DES)); 76 85 } 77 86 -
arch/ia32/src/proc/scheduler.c
r429ff2ea r69a5600 62 62 bitmap_copy(&iomap, &TASK->arch.iomap, TASK->arch.iomap.bits); 63 63 /* 64 * It is safe to set the trailing fourbits because of the extra64 * It is safe to set the trailing eight bits because of the extra 65 65 * convenience byte in TSS_IOMAP_SIZE. 66 66 */ 67 bitmap_set_range(&iomap, TASK->arch.iomap.bits, 4);67 bitmap_set_range(&iomap, TASK->arch.iomap.bits, 8); 68 68 } 69 69 spinlock_unlock(&TASK->lock); … … 74 74 gdt_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE + BITS2BYTES(bits) - 1); 75 75 gdtr_load(&cpugdtr); 76 77 /* 78 * Before we load new TSS limit, the current TSS descriptor 79 * type must be changed to describe inactive TSS. 80 */ 81 gdt_p[TSS_DES].access = AR_PRESENT | AR_TSS | DPL_KERNEL; 82 tr_load(selector(TSS_DES)); 76 83 } 77 84
Note:
See TracChangeset
for help on using the changeset viewer.