Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 80 → Rev 81

/SPARTAN/trunk/test/synch/rwlock4/test.c
33,6 → 33,7
#include <proc/thread.h>
#include <arch/types.h>
#include <arch/context.h>
#include <panic.h>
 
#include <synch/waitq.h>
#include <synch/rwlock.h>
/SPARTAN/trunk/src/main/main.c
94,7 → 94,7
config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE;
 
context_save(&ctx);
ctx.sp = config.base + config.kernel_size - 8;
ctx.sp = config.base + config.kernel_size - SP_DELTA;
ctx.pc = FADDR(main_bsp_separated_stack);
context_restore(&ctx);
/* not reached */
192,7 → 192,7
* collide with another CPU coming up. To prevent this, we
* switch to this cpu's private stack prior to waking kmp up.
*/
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8];
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA];
CPU->saved_context.pc = FADDR(main_ap_separated_stack);
context_restore(&CPU->saved_context);
/* not reached */
/SPARTAN/trunk/src/proc/scheduler.c
232,7 → 232,7
* scheduler_separated_stack().
*/
context_save(&CPU->saved_context);
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8];
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA];
CPU->saved_context.pc = FADDR(scheduler_separated_stack);
context_restore(&CPU->saved_context);
/* not reached */
/SPARTAN/trunk/src/proc/thread.c
166,7 → 166,7
context_save(&t->saved_context);
t->saved_context.pc = FADDR(cushion);
t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-8];
t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-SP_DELTA];
 
pri = cpu_priority_high();
t->saved_context.pri = cpu_priority_read();
/SPARTAN/trunk/arch/ia64/include/context.h
31,6 → 31,8
 
#include <arch/types.h>
 
#define SP_DELTA 16
 
struct context {
__u64 r1;
__u64 r2;
/SPARTAN/trunk/arch/ia64/src/asm.S
38,3 → 38,7
sub r33 = r32, r33
br _memcopy
 
.global memcopy
memcopy:
br _memcopy
/SPARTAN/trunk/arch/ia64/src/start.S
34,11 → 34,18
 
stack0:
kernel_image_start:
.auto
# initialize PSR
mov psr.l = r0
# initialize register stack
alloc r1 = ar.pfs, 0, 0, 0, 0 ;;
mov ar.rsc = r0
loadrs
 
.explicit
# initialize memory stack to some sane value
movl r12=stack0
movl r12 = stack0 ;;
add r12 = - 16, r12 /* allocate a scratch area on the stack */
 
# initialize gp (Global Pointer) register
movl r1=k_text_start
/SPARTAN/trunk/arch/mips/include/context.h
31,9 → 31,9
 
#include <arch/types.h>
 
#define SP_DELTA 0
 
 
 
struct context {
__u32 r0;
__u32 r1;
/SPARTAN/trunk/arch/ia32/include/smp/apic.h
129,7 → 129,7
extern int l_apic_send_init_ipi(__u8 apicid);
extern void l_apic_debug(void);
extern void l_apic_timer_interrupt(__u8 n, __u32 stack[]);
extern inline __u8 l_apic_id(void);
extern __u8 l_apic_id(void);
 
extern __u32 io_apic_read(__u8 address);
extern void io_apic_write(__u8 address , __u32 x);
/SPARTAN/trunk/arch/ia32/include/context.h
31,8 → 31,8
 
#include <arch/types.h>
 
#define SP_DELTA 8
 
 
struct context {
__u32 sp;
__u32 pc;
/SPARTAN/trunk/arch/ia32/src/smp/apic.c
324,7 → 324,7
clock();
}
 
inline __u8 l_apic_id(void)
__u8 l_apic_id(void)
{
return (l_apic[L_APIC_ID] >> L_APIC_IDShift)&L_APIC_IDMask;
}