Changeset 4cb04f2 in rtems for c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
- Timestamp:
- 09/06/07 00:03:16 (15 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 3d0d969
- Parents:
- 5982921
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
r5982921 r4cb04f2 43 43 extern uint32_t rdb_start; 44 44 45 /* 46 * Tells us if data cache snooping is available 47 */ 48 49 int CPU_SPARC_HAS_SNOOPING; 50 45 51 void bsp_postdriver_hook(void); 46 52 void bsp_libc_init( void *, uint32_t, int ); 47 53 extern void bsp_spurious_initialize(); 54 55 /* 56 * set_snooping 57 * 58 * Read the data cache configuration register to determine if 59 * bus snooping is available. This is needed for some drivers so 60 * that they can select the most efficient copy routines. 61 * 62 */ 63 64 static inline int set_snooping(void) 65 { 66 int tmp; 67 asm(" lda [%1] 2, %0 " 68 : "=r"(tmp) 69 : "r"(0xC) 70 ); 71 return (tmp >> 27) & 1; 72 } 48 73 49 74 /* … … 113 138 114 139 BSP_Configuration.work_space_start = work_space_start; 140 141 CPU_SPARC_HAS_SNOOPING = set_snooping(); 115 142 }
Note: See TracChangeset
for help on using the changeset viewer.