Ignore:
Timestamp:
Jan 31, 2005, 7:03:41 PM (16 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
fa5dfe8
Parents:
9be8c2d
Message:

Processor doesn't snoop FEC DMA so we must invalidate the cache appropriately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c

    r9be8c2d r518edef  
    110110void _CPU_cache_invalidate_1_instruction_line(const void *addr)
    111111{
    112   asm volatile ("cpushl %%ic,(%0)" :: "a" (addr));
     112    /*
     113     * Top half of cache is I-space
     114     */
     115    addr = (void *)((int)addr | 0x400);
     116    asm volatile ("cpushl %%bc,(%0)" :: "a" (addr));
    113117}
    114118
     
    128132
    129133    rtems_interrupt_disable(level);
     134    rtems_interrupt_disable(level);
    130135    cacr_mode |= MCF5XXX_CACR_DISD;
    131136    m68k_set_cacr(cacr_mode);
     
    140145void _CPU_cache_invalidate_1_data_line(const void *addr)
    141146{
    142   asm volatile ("cpushl %%dc,(%0)" :: "a" (addr));
     147    /*
     148     * Bottom half of cache is D-space
     149     */
     150    addr = (void *)((int)addr & ~0x400);
     151    asm volatile ("cpushl %%bc,(%0)" :: "a" (addr));
    143152}
    144153
Note: See TracChangeset for help on using the changeset viewer.