
System Initialization
3-12
Élan™SC520 Microcontroller User’s Manual
3.7.2
Address Region Attributes
The address region attributes (as specified in the ATTR bit field of a PAR register) can be
used with ROM or SDRAM regions to control how the regions can be accessed. This section
includes some examples of how the attributes can be used with SDRAM and ROM regions.
3.7.2.1
Write-Protect Attribute
When this feature is enabled for an address region in SDRAM or ROM, an interrupt is
generated when a write is performed to the region. This interrupt can be used to find
problems with errant software or to help debug Flash programming code.
3.7.2.2
Cacheability Control Attribute
The Cacheability Control Attribute bit in the PAR registers provides a simple mechanism
for controlling the caching of memory regions. This mechanism is much easier to use than
the Am5
x
86 CPU’s paging unit.
For SDRAM regions, turning off caching can be useful for regions that contain buffers used
for DMA or for PCI bus mastering devices.
This feature is also useful for Flash regions. For some operations, it is necessary to turn
off caching for a Flash region. An example is when a Flash device needs to be erased or
programmed. Any time a Flash device’s internal registers need to be read or written, caching
should be disabled for the device. For example, the Flash sector erasing code needs to
poll the device to see when erases and other operations are complete. If caching is not
turned off, then the software will merely continue to read the value from the processor’s
cache and not the correct value from the device. This is also true during the Flash
programming write/verify cycle. For more information, see page 12-12.
3.7.2.3
Code Execution Attribute
Execution control works in a similar manner to the Write-Protect Attribute bit. The difference
is that when this bit is set, any code fetches by the CPU to the defined region will cause
an invalid opcode fetch fault to be generated. This is accomplished by returning an invalid
opcode to the CPU, instead of the data resident in the device at the requested address.
This is very useful for debugging problems. Large areas of the address space can be
execute-protected. For example, the Flash for a file system could be protected from code
execution. Data reads and writes for the Flash file system would happen normally. But, if
a code erroneously jumped into this data area, an invalid opcode fetch fault would be
generated immediately.
3.7.2.4
Performance Considerations
It is possible to control the same attributes that the PAR registers provide using the native
mechanisms in the Am5
x
86 CPU core. For example, 4-Kbyte pages can be write-protected
using the paging unit and paging tables. Noncached regions can also be created using this
mechanism. Execution protection can also be performed using a segmented code model
and descriptor attributes.
Using the native x86 mechanisms will work, but using the address region attributes in a
PAR register is easier and provides higher performance. If the CPU’s paging unit is enabled,
the entire system takes a small performance hit because all linear address must be
translated to physical address. Also, defining nonexecutable regions is very difficult to do
and requires 48-bit code pointers (huge pointers) and a fully segmented 32-bit code model.
This is a high price to pay to obtain execute-only regions. These performance penalties
are not incurred when using the ÉlanSC520 microcontroller’s address region attribute
mechanism.
Содержание Elan SC520
Страница 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Страница 4: ...iv lan SC520 Microcontroller User s Manual...
Страница 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Страница 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Страница 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Страница 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Страница 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Страница 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Страница 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Страница 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Страница 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Страница 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Страница 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Страница 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Страница 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Страница 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...