Changeset e6a78b9 in mainline for kernel/arch
- Timestamp:
- 2012-06-29T15:31:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9432f08
- Parents:
- 34ab31c0 (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/arch
- Files:
-
- 17 edited
-
amd64/Makefile.inc (modified) (2 diffs)
-
amd64/src/userspace.c (modified) (3 diffs)
-
arm32/src/userspace.c (modified) (1 diff)
-
ia32/Makefile.inc (modified) (2 diffs)
-
ia32/src/userspace.c (modified) (2 diffs)
-
ia64/src/drivers/ski.c (modified) (1 diff)
-
ia64/src/ia64.c (modified) (1 diff)
-
mips32/src/mips32.c (modified) (1 diff)
-
mips64/src/mips64.c (modified) (1 diff)
-
ppc32/src/ppc32.c (modified) (1 diff)
-
sparc64/Makefile.inc (modified) (1 diff)
-
sparc64/src/drivers/niagara.c (modified) (1 diff)
-
sparc64/src/proc/sun4u/scheduler.c (modified) (2 diffs)
-
sparc64/src/proc/sun4v/scheduler.c (modified) (2 diffs)
-
sparc64/src/proc/thread.c (modified) (1 diff)
-
sparc64/src/sun4u/sparc64.c (modified) (1 diff)
-
sparc64/src/sun4v/sparc64.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/Makefile.inc
r34ab31c0 re6a78b9 55 55 GCC_CFLAGS += $(CMN1) 56 56 ICC_CFLAGS += $(CMN1) 57 SUNCC_CFLAGS += -m64 -xmodel=kernel58 57 59 58 BITS = 64 … … 67 66 GCC_CFLAGS += $(CMN2) 68 67 ICC_CFLAGS += $(CMN2) 69 SUNCC_CFLAGS += -xtarget=opteron70 68 endif 71 69 -
kernel/arch/amd64/src/userspace.c
r34ab31c0 re6a78b9 55 55 asm volatile ( 56 56 "pushq %[udata_des]\n" 57 "pushq %[stack_ size]\n"57 "pushq %[stack_top]\n" 58 58 "pushq %[ipl]\n" 59 59 "pushq %[utext_des]\n" … … 65 65 "iretq\n" 66 66 :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 67 [stack_size] "r" (kernel_uarg->uspace_stack + STACK_SIZE), 67 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 68 kernel_uarg->uspace_stack_size), 68 69 [ipl] "r" (ipl), 69 70 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), … … 74 75 75 76 /* Unreachable */ 76 while (1) 77 ; 77 while (1); 78 78 } 79 79 -
kernel/arch/arm32/src/userspace.c
r34ab31c0 re6a78b9 92 92 93 93 /* set user stack */ 94 ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + STACK_SIZE; 94 ustate.sp = ((uint32_t) kernel_uarg->uspace_stack) + 95 kernel_uarg->uspace_stack_size; 95 96 96 97 /* set where uspace execution starts */ -
kernel/arch/ia32/Makefile.inc
r34ab31c0 re6a78b9 38 38 GCC_CFLAGS += $(CMN1) 39 39 ICC_CFLAGS += $(CMN1) 40 SUNCC_CFLAGS += $(CMN1)41 40 CLANG_CFLAGS += $(CMN1) 42 41 … … 50 49 ifeq ($(PROCESSOR),athlon_xp) 51 50 CMN2 = -march=athlon-xp 52 SUNCC_CFLAGS += -xarch=ssea53 51 endif 54 52 55 53 ifeq ($(PROCESSOR),athlon_mp) 56 54 CMN2 = -march=athlon-mp 57 SUNCC_CFLAGS += xarch=ssea58 55 endif 59 56 60 57 ifeq ($(PROCESSOR),pentium3) 61 58 CMN2 = -march=pentium3 62 SUNCC_CFLAGS += -xarch=sse63 59 endif 64 60 65 61 ifeq ($(PROCESSOR),pentium4) 66 62 CMN2 = -march=pentium4 67 SUNCC_CFLAGS += -xarch=sse268 63 endif 69 64 70 65 ifeq ($(PROCESSOR),core) 71 66 CMN2 = -march=prescott 72 SUNCC_CFLAGS += -xarch=sse373 67 endif 74 68 -
kernel/arch/ia32/src/userspace.c
r34ab31c0 re6a78b9 63 63 64 64 "pushl %[udata_des]\n" 65 "pushl %[stack_ size]\n"65 "pushl %[stack_top]\n" 66 66 "pushl %[ipl]\n" 67 67 "pushl %[utext_des]\n" … … 75 75 : 76 76 : [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 77 [stack_size] "r" ((uint8_t *) kernel_uarg->uspace_stack + STACK_SIZE), 77 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 78 kernel_uarg->uspace_stack_size), 78 79 [ipl] "r" (ipl), 79 80 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), -
kernel/arch/ia64/src/drivers/ski.c
r34ab31c0 re6a78b9 150 150 151 151 if (instance) { 152 instance->thread = thread_create(kskipoll, instance, TASK, 0,153 "kskipoll", true);152 instance->thread = thread_create(kskipoll, instance, TASK, 153 THREAD_FLAG_UNCOUNTED, "kskipoll"); 154 154 155 155 if (!instance->thread) { -
kernel/arch/ia64/src/ia64.c
r34ab31c0 re6a78b9 232 232 * 233 233 * When calculating stack addresses, mind the stack split between the 234 * memory stack and the RSE stack. Each occuppies STACK_SIZE / 2 bytes. 234 * memory stack and the RSE stack. Each occuppies 235 * uspace_stack_size / 2 bytes. 235 236 */ 236 237 switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry, 237 ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE / 2 - 238 ((uintptr_t) kernel_uarg->uspace_stack) + 239 kernel_uarg->uspace_stack_size / 2 - 238 240 ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 239 ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE / 2, 241 ((uintptr_t) kernel_uarg->uspace_stack) + 242 kernel_uarg->uspace_stack_size / 2, 240 243 (uintptr_t) kernel_uarg->uspace_uarg, psr.value, rsc.value); 241 242 while (1) 243 ; 244 245 while (1); 244 246 } 245 247 -
kernel/arch/mips32/src/mips32.c
r34ab31c0 re6a78b9 211 211 cp0_status_um_bit | cp0_status_ie_enabled_bit)); 212 212 cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); 213 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE), 213 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + 214 kernel_uarg->uspace_stack_size), 214 215 (uintptr_t) kernel_uarg->uspace_uarg, 215 216 (uintptr_t) kernel_uarg->uspace_entry); -
kernel/arch/mips64/src/mips64.c
r34ab31c0 re6a78b9 188 188 cp0_status_um_bit | cp0_status_ie_enabled_bit)); 189 189 cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); 190 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE), 190 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + 191 kernel_uarg->uspace_stack_size), 191 192 (uintptr_t) kernel_uarg->uspace_uarg, 192 193 (uintptr_t) kernel_uarg->uspace_entry); -
kernel/arch/ppc32/src/ppc32.c
r34ab31c0 re6a78b9 269 269 { 270 270 userspace_asm((uintptr_t) kernel_uarg->uspace_uarg, 271 (uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE - SP_DELTA, 271 (uintptr_t) kernel_uarg->uspace_stack + 272 kernel_uarg->uspace_stack_size - SP_DELTA, 272 273 (uintptr_t) kernel_uarg->uspace_entry); 273 274 -
kernel/arch/sparc64/Makefile.inc
r34ab31c0 re6a78b9 32 32 33 33 GCC_CFLAGS += -m64 -mcpu=ultrasparc -mcmodel=medlow -mno-fpu 34 SUNCC_CFLAGS += -m64 -xarch=sparc -xregs=appl,no%float35 34 36 35 LFLAGS += -no-check-sections -
kernel/arch/sparc64/src/drivers/niagara.c
r34ab31c0 re6a78b9 184 184 185 185 instance = malloc(sizeof(niagara_instance_t), FRAME_ATOMIC); 186 instance->thread = thread_create(kniagarapoll, NULL, TASK, 0,187 "kniagarapoll", true);186 instance->thread = thread_create(kniagarapoll, NULL, TASK, 187 THREAD_FLAG_UNCOUNTED, "kniagarapoll"); 188 188 189 189 if (!instance->thread) { -
kernel/arch/sparc64/src/proc/sun4u/scheduler.c
r34ab31c0 re6a78b9 51 51 void before_thread_runs_arch(void) 52 52 { 53 if ( (THREAD->flags & THREAD_FLAG_USPACE)) {53 if (THREAD->uspace) { 54 54 /* 55 55 * Write kernel stack address to %g6 of the alternate and … … 74 74 void after_thread_ran_arch(void) 75 75 { 76 if ( (THREAD->flags & THREAD_FLAG_USPACE)) {77 /* sample the state of the userspace window buffer */ 76 if (THREAD->uspace) { 77 /* sample the state of the userspace window buffer */ 78 78 THREAD->arch.uspace_window_buffer = (uint8_t *) read_from_ag_g7(); 79 79 } -
kernel/arch/sparc64/src/proc/sun4v/scheduler.c
r34ab31c0 re6a78b9 54 54 void before_thread_runs_arch(void) 55 55 { 56 if ( (THREAD->flags & THREAD_FLAG_USPACE)) {56 if (THREAD->uspace) { 57 57 uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE - 58 58 (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)); … … 66 66 void after_thread_ran_arch(void) 67 67 { 68 if ( (THREAD->flags & THREAD_FLAG_USPACE)) {69 /* sample the state of the userspace window buffer */ 68 if (THREAD->uspace) { 69 /* sample the state of the userspace window buffer */ 70 70 THREAD->arch.uspace_window_buffer = 71 71 (uint8_t *) asi_u64_read(ASI_SCRATCHPAD, SCRATCHPAD_WBUF); -
kernel/arch/sparc64/src/proc/thread.c
r34ab31c0 re6a78b9 61 61 void thread_create_arch(thread_t *t) 62 62 { 63 if ((t-> flags & THREAD_FLAG_USPACE) && (!t->arch.uspace_window_buffer))63 if ((t->uspace) && (!t->arch.uspace_window_buffer)) 64 64 { 65 65 /* -
kernel/arch/sparc64/src/sun4u/sparc64.c
r34ab31c0 re6a78b9 156 156 (void) interrupts_disable(); 157 157 switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry, 158 ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE 159 - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 158 ((uintptr_t) kernel_uarg->uspace_stack) + 159 kernel_uarg->uspace_stack_size - 160 (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 160 161 (uintptr_t) kernel_uarg->uspace_uarg); 161 162 for (;;) 163 ; 164 /* not reached */ 162 163 /* Not reached */ 164 while (1); 165 165 } 166 166 -
kernel/arch/sparc64/src/sun4v/sparc64.c
r34ab31c0 re6a78b9 154 154 (void) interrupts_disable(); 155 155 switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry, 156 ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE 157 - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 156 ((uintptr_t) kernel_uarg->uspace_stack) + 157 kernel_uarg->uspace_stack_size - 158 (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 158 159 (uintptr_t) kernel_uarg->uspace_uarg); 159 160 for (;;) 161 ; 162 /* not reached */ 160 161 /* Not reached */ 162 while (1); 163 163 } 164 164
Note:
See TracChangeset
for help on using the changeset viewer.
