Changeset 9591970 in rtems


Ignore:
Timestamp:
Feb 2, 2012, 2:46:27 PM (8 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.10
Children:
1fe0257
Parents:
45eaf8c
git-author:
Daniel Hellstrom <daniel@…> (02/02/12 14:46:27)
git-committer:
Joel Sherrill <joel.sherrill@…> (02/02/12 18:08:01)
Message:

LEON3: change d-cache snoop detect implementation

PR 2010/bsps

The previous code only checked if d-cache snooping was implemented,
however snooping may be available but not enabled which may lead
to driver bugs.

Signed-off-by: Daniel Hellstrom <daniel@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/startup/bspstart.c

    r45eaf8c r9591970  
    3737 *
    3838 * Read the data cache configuration register to determine if
    39  * bus snooping is available. This is needed for some drivers so
    40  * that they can select the most efficient copy routines.
    41  *
     39 * bus snooping is available and enabled. This is needed for some
     40 * drivers so that they can select the most efficient copy routines.
    4241 */
    43 
    4442static inline int set_snooping(void)
    4543{
    4644  int tmp;
    47   asm(" lda [%1] 2, %0 "
     45  __asm__ (" lda [%%g0] 2, %0 "
    4846      : "=r"(tmp)
    49       : "r"(0xC)
     47      :
    5048  );
    51   return (tmp >> 27) & 1;
     49  return (tmp >> 23) & 1;
    5250}
    5351
Note: See TracChangeset for help on using the changeset viewer.