Changeset 25b9e2c in mainline
- Timestamp:
- 2007-11-26T22:24:55Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4e38c7
- Parents:
- 263e1ec
- Location:
- kernel/arch
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/proc/task.h
r263e1ec r25b9e2c 40 40 41 41 typedef struct { 42 count_t iomapver; /**< I/O Permission bitmap Generation counter. */ 43 bitmap_t iomap; /**< I/O Permission bitmap. */ 42 /** I/O Permission bitmap Generation counter. */ 43 count_t iomapver; 44 /** I/O Permission bitmap. */ 45 bitmap_t iomap; 44 46 } task_arch_t; 45 47 -
kernel/arch/amd64/src/ddi/ddi.c
r263e1ec r25b9e2c 75 75 return ENOMEM; 76 76 77 bitmap_initialize(&oldiomap, task->arch.iomap.map, task->arch.iomap.bits); 77 bitmap_initialize(&oldiomap, task->arch.iomap.map, 78 task->arch.iomap.bits); 78 79 bitmap_initialize(&task->arch.iomap, newmap, bits); 79 80 … … 81 82 * Mark the new range inaccessible. 82 83 */ 83 bitmap_set_range(&task->arch.iomap, oldiomap.bits, bits - oldiomap.bits); 84 bitmap_set_range(&task->arch.iomap, oldiomap.bits, 85 bits - oldiomap.bits); 84 86 85 87 /* … … 88 90 */ 89 91 if (oldiomap.bits) { 90 bitmap_copy(&task->arch.iomap, &oldiomap, oldiomap.bits); 92 bitmap_copy(&task->arch.iomap, &oldiomap, 93 oldiomap.bits); 91 94 free(oldiomap.map); 92 95 } … … 128 131 129 132 ASSERT(TASK->arch.iomap.map); 130 bitmap_initialize(&iomap, CPU->arch.tss->iomap, TSS_IOMAP_SIZE * 8); 133 bitmap_initialize(&iomap, CPU->arch.tss->iomap, 134 TSS_IOMAP_SIZE * 8); 131 135 bitmap_copy(&iomap, &TASK->arch.iomap, TASK->arch.iomap.bits); 132 136 /* 133 * It is safe to set the trailing eight bits because of the extra134 * convenience byte in TSS_IOMAP_SIZE.137 * It is safe to set the trailing eight bits because of the 138 * extra convenience byte in TSS_IOMAP_SIZE. 135 139 */ 136 140 bitmap_set_range(&iomap, ALIGN_UP(TASK->arch.iomap.bits, 8), 8); -
kernel/arch/ia32/include/proc/task.h
r263e1ec r25b9e2c 40 40 41 41 typedef struct { 42 count_t iomapver; /**< I/O Permission bitmap Generation counter. */ 43 bitmap_t iomap; /**< I/O Permission bitmap. */ 42 /** I/O Permission bitmap Generation counter. */ 43 count_t iomapver; 44 /** I/O Permission bitmap. */ 45 bitmap_t iomap; 44 46 } task_arch_t; 45 47 -
kernel/arch/ia32/src/ddi/ddi.c
r263e1ec r25b9e2c 76 76 return ENOMEM; 77 77 78 bitmap_initialize(&oldiomap, task->arch.iomap.map, task->arch.iomap.bits); 78 bitmap_initialize(&oldiomap, task->arch.iomap.map, 79 task->arch.iomap.bits); 79 80 bitmap_initialize(&task->arch.iomap, newmap, bits); 80 81 … … 82 83 * Mark the new range inaccessible. 83 84 */ 84 bitmap_set_range(&task->arch.iomap, oldiomap.bits, bits - oldiomap.bits); 85 bitmap_set_range(&task->arch.iomap, oldiomap.bits, 86 bits - oldiomap.bits); 85 87 86 88 /* … … 89 91 */ 90 92 if (oldiomap.bits) { 91 bitmap_copy(&task->arch.iomap, &oldiomap, oldiomap.bits); 93 bitmap_copy(&task->arch.iomap, &oldiomap, 94 oldiomap.bits); 92 95 free(oldiomap.map); 93 96 } … … 129 132 130 133 ASSERT(TASK->arch.iomap.map); 131 bitmap_initialize(&iomap, CPU->arch.tss->iomap, TSS_IOMAP_SIZE * 8); 134 bitmap_initialize(&iomap, CPU->arch.tss->iomap, 135 TSS_IOMAP_SIZE * 8); 132 136 bitmap_copy(&iomap, &task->arch.iomap, task->arch.iomap.bits); 133 137 /* 134 * It is safe to set the trailing eight bits because of the extra135 * convenience byte in TSS_IOMAP_SIZE.138 * It is safe to set the trailing eight bits because of the 139 * extra convenience byte in TSS_IOMAP_SIZE. 136 140 */ 137 141 bitmap_set_range(&iomap, ALIGN_UP(TASK->arch.iomap.bits, 8), 8); -
kernel/arch/ia32/src/proc/scheduler.c
r263e1ec r25b9e2c 59 59 void before_thread_runs_arch(void) 60 60 { 61 CPU->arch.tss->esp0 = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; 61 CPU->arch.tss->esp0 = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - 62 SP_DELTA]; 62 63 CPU->arch.tss->ss0 = selector(KDATA_DES); 63 64 … … 70 71 the_t *the = THE; 71 72 breakpoint_add(&((the_t *) the->thread->kstack)->as, 72 73 BKPOINT_WRITE | BKPOINT_CHECK_ZERO, the->cpu->id); 73 74 } 74 75 #endif
Note:
See TracChangeset
for help on using the changeset viewer.