Changeset 3d0d969 in rtems


Ignore:
Timestamp:
Sep 6, 2007, 12:03:18 AM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
921bb59
Parents:
4cb04f2
Message:

2007-09-05 Daniel Hellstrom <daniel@…>

  • shared/bspstart.c: LEON2 and LEON3 Data cache snooping detection on startup, for drivers. (LEON2,3 are configurable processors, they can be with or without DCache snooping. Caches without snooping needs the drivers to flush cache or use the sparc instruction lda to force cache miss...)
Location:
c/src/lib/libbsp/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/ChangeLog

    r4cb04f2 r3d0d969  
     12007-09-05      Daniel Hellstrom <daniel@gaisler.com>
     2
     3        * shared/bspstart.c: LEON2 and LEON3 Data cache snooping detection on
     4        startup, for drivers. (LEON2,3 are configurable processors, they can
     5        be with or without DCache snooping. Caches without snooping needs the
     6        drivers to flush cache or use the sparc instruction lda to force
     7        cache miss...)
     8
    192007-09-05      Daniel Hellstrom <daniel@gaisler.com>
    210
  • c/src/lib/libbsp/sparc/shared/bspstart.c

    r4cb04f2 r3d0d969  
    4848extern uint32_t rdb_start;
    4949
     50#ifdef LEON2
     51/*
     52 * Tells us if data cache snooping is available
     53 */
     54
     55int CPU_SPARC_HAS_SNOOPING;
     56#endif
     57
    5058/*
    5159 *  Use the shared implementations of the following routines
     
    5563void bsp_libc_init( void *, uint32_t, int );
    5664extern void bsp_spurious_initialize();
     65
     66#ifdef LEON2
     67/*
     68 * set_snooping
     69 *
     70 * Read the data cache configuration register to determine if
     71 * bus snooping is available. This is needed for some drivers so
     72 * that they can select the most efficient copy routines. 
     73 *
     74 */
     75
     76static inline int set_snooping(void)
     77{
     78        unsigned int tmp = *(unsigned int *)0x80000014; /* Cache control register */
     79        return ((tmp>>23) & 1); /* Data cache snooping enabled */
     80}
     81#endif
    5782
    5883/*
     
    119144
    120145  BSP_Configuration.work_space_start = work_space_start;
     146 
     147  #ifdef LEON2
     148  CPU_SPARC_HAS_SNOOPING = set_snooping();
     149  #endif
    121150}
Note: See TracChangeset for help on using the changeset viewer.