Changeset 8ac5fe7 in mainline
- Timestamp:
- 2005-12-02T16:18:23Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 060ce90
- Parents:
- 414f59c
- Location:
- arch/sparc64
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/Makefile.inc
r414f59c r8ac5fe7 55 55 arch/$(ARCH)/src/mm/page.c \ 56 56 arch/$(ARCH)/src/sparc64.c \ 57 arch/$(ARCH)/src/start.S 57 arch/$(ARCH)/src/start.S \ 58 arch/$(ARCH)/src/trap_table.S -
arch/sparc64/include/asm.h
r414f59c r8ac5fe7 86 86 } 87 87 88 /** Read Trap Base Address register. 89 * 90 * @return Current value in TBA. 91 */ 92 static inline __u64 tba_read(void) 93 { 94 __u64 v; 95 96 __asm__ volatile ("rdpr %%tba, %0\n" : "=r" (v)); 97 98 return v; 99 } 100 101 /** Write Trap Base Address register. 102 * 103 * @param New value of TBA. 104 */ 105 static inline void tba_write(__u64 v) 106 { 107 __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0)); 108 } 109 110 88 111 void cpu_halt(void); 89 112 void cpu_sleep(void); -
arch/sparc64/src/context.S
r414f59c r8ac5fe7 32 32 /** 33 33 * Both context_save_arch() and context_restore_arch() are 34 * leaf-optimized procedures. Both of them touch %sp and 35 * %fp and thus break SCD 2.4 compliance. However, these 36 * functions are special enough to be allowed this 37 * kind of behavior. Moreover, this kind of optimization 38 * is very important and prevents any window spill/ 39 * fill/clean traps in these very core kernel functions. 34 * leaf-optimized procedures. This kind of optimization 35 * is very important and prevents any implicit window 36 * spill/fill/clean traps in these very core kernel 37 * functions. 40 38 */ 41 39 -
arch/sparc64/src/sparc64.c
r414f59c r8ac5fe7 28 28 29 29 #include <arch.h> 30 #include <print.h> 31 #include <arch/asm.h> 32 #include <memstr.h> 33 #include <arch/trap_table.h> 30 34 31 35 void arch_pre_mm_init(void) … … 39 43 void arch_pre_smp_init(void) 40 44 { 45 /* 46 * Copy OFW's trap table into kernel and point TBA there. 47 */ 48 memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); 49 /* 50 * TBA cannot be changed until there are means of getting it into TLB. 51 * tba_write((__u64) trap_table); 52 */ 41 53 } 42 54 -
arch/sparc64/src/start.S
r414f59c r8ac5fe7 52 52 1: 53 53 set ofw, %l0 54 stx %o4, [%l0]55 54 56 55 call ofw_init 57 nop56 stx %o4, [%l0] 58 57 59 58 call main_bsp
Note:
See TracChangeset
for help on using the changeset viewer.