Alpha Microsystems Eagle 100 Specifikace Strana 85

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 89
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 84
APPENDIX D
ROADRUNNER AM-174
PROGRAMMING INFORMATION
D.1ROADRUNNER AM-174 PROGRAMMING INFORMATION
The MC68040 processor used on the AM-174 Roadrunner board contains more internal
instruction cache (4096 bytes) than earlier MC68040-based processors. Increased
internal cache is one of the features which contributes to the improved performance of
the Roadrunner 040 board; however, if your software does not properly manage this
instruction cache, it could be adversely affected.
When the instruction cache is enabled—as it would be during normal system
operation—any memory location which is executed by the processor is loaded into the
instruction cache. This improves performance for those cases where the same location
is executed again, since the instruction will be read from cache instead of slower main
memory.
D.1.1The Problem and Why It’s A Problem
The problem arises when that same memory location, which has now been loaded into
cache, is modified. Because data operations—such as the MOV instruction—do not
update the instruction cache, when your program next executes the memory location, it
may read the old contents, which are still in the instruction cache, rather than pulling the
instruction from main memory where it was updated. This is known as self-modifying
code.
In this context, self modifying code is any code which is written to memory as data, such
as when read from disk to memory, and then executed as instructions. AMOS handles
the most common cases, such as reading data from disk or during the FETCH monitor
call, but cannot handle cases in your software where you are handling program overlays
or building instructions on the fly. Such code is often present in "trick" code like that
used to perform SSD-based software protection, although it may be present anywhere.
This issue was present on 68030 based systems, but the limited cache size on that
processor made it a much smaller problem. Tricks to flush the cache that worked on the
68030, such as forcing a context switch, will probably not work reliably on the 68040.
PDI-00172-60, Rev. A02
Zobrazit stránku 84
1 2 ... 80 81 82 83 84 85 86 87 88 89

Komentáře k této Příručce

Žádné komentáře