/kernel/trunk/arch/sparc64/include/trap_table.h |
---|
File deleted |
/kernel/trunk/arch/sparc64/include/asm.h |
---|
85,29 → 85,6 |
return v; |
} |
/** Read Trap Base Address register. |
* |
* @return Current value in TBA. |
*/ |
static inline __u64 tba_read(void) |
{ |
__u64 v; |
__asm__ volatile ("rdpr %%tba, %0\n" : "=r" (v)); |
return v; |
} |
/** Write Trap Base Address register. |
* |
* @param New value of TBA. |
*/ |
static inline void tba_write(__u64 v) |
{ |
__asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0)); |
} |
void cpu_halt(void); |
void cpu_sleep(void); |
void asm_delay_loop(__u32 t); |
/kernel/trunk/arch/sparc64/src/trap_table.S |
---|
File deleted |
/kernel/trunk/arch/sparc64/src/context.S |
---|
31,10 → 31,12 |
/** |
* Both context_save_arch() and context_restore_arch() are |
* leaf-optimized procedures. This kind of optimization |
* is very important and prevents any implicit window |
* spill/fill/clean traps in these very core kernel |
* functions. |
* leaf-optimized procedures. Both of them touch %sp and |
* %fp and thus break SCD 2.4 compliance. However, these |
* functions are special enough to be allowed this |
* kind of behavior. Moreover, this kind of optimization |
* is very important and prevents any window spill/ |
* fill/clean traps in these very core kernel functions. |
*/ |
.text |
/kernel/trunk/arch/sparc64/src/sparc64.c |
---|
27,10 → 27,6 |
*/ |
#include <arch.h> |
#include <print.h> |
#include <arch/asm.h> |
#include <memstr.h> |
#include <arch/trap_table.h> |
void arch_pre_mm_init(void) |
{ |
42,14 → 38,6 |
void arch_pre_smp_init(void) |
{ |
/* |
* Copy OFW's trap table into kernel and point TBA there. |
*/ |
memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); |
/* |
* TBA cannot be changed until there are means of getting it into TLB. |
* tba_write((__u64) trap_table); |
*/ |
} |
void arch_post_smp_init(void) |
/kernel/trunk/arch/sparc64/src/start.S |
---|
51,9 → 51,10 |
1: |
set ofw, %l0 |
stx %o4, [%l0] |
call ofw_init |
stx %o4, [%l0] |
nop |
call main_bsp |
nop |
/kernel/trunk/arch/sparc64/Makefile.inc |
---|
54,5 → 54,4 |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/sparc64.c \ |
arch/$(ARCH)/src/start.S \ |
arch/$(ARCH)/src/trap_table.S |
arch/$(ARCH)/src/start.S |