Changeset 2b2e409d in rtems


Ignore:
Timestamp:
Feb 2, 2012, 2:46:27 PM (7 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
600bd1bb
Parents:
735b0ca
git-author:
Daniel Hellstrom <daniel@…> (02/02/12 14:46:27)
git-committer:
Joel Sherrill <joel.sherrill@…> (02/02/12 18:08:15)
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

    r735b0ca r2b2e409d  
    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.
     39 * bus snooping is available and enabled. This is needed for some
     40 * drivers so that they can select the most efficient copy routines.
    4141 *
    4242 */
     
    4545{
    4646  int tmp;
    47   __asm__ (" lda [%1] 2, %0 "
     47  __asm__ (" lda [%%g0] 2, %0 "
    4848      : "=r"(tmp)
    49       : "r"(0xC)
     49      :
    5050  );
    51   return (tmp >> 27) & 1;
     51  return (tmp >> 23) & 1;
    5252}
    5353
Note: See TracChangeset for help on using the changeset viewer.