Intel's i960Jx processors have the capability to program two specific contiguous regions in their memory space as being cacheable, with the rest of the memory space being non-cacheable or vice versa. These regions are programmmed using the Logical Memory Attributes Registers: LMADR0-1 and LMMR0-1. Due to the nature of the programming mechanism, it is not always possible to include all of the contiguous memory between arbitrary starting and ending addresses.
This document describes how to determine what should be programmed into the Logical Memory Attributes Registers given the desired starting and ending addresses for the memory region. It is intended to supplement the Memory Configuration chapter found in the user's manual. Users may find this paper helpful when the address boundaries requied by a system are not easily programmable in the Logical Memory Attributes Registers. For detailed information on 80960Jx processors please refer to the following:
Electrical specifications for the 80960Jx product are found in the following documents:
Functional descriptions for the 80960Jx product are found in the following document:
Determining Starting Address & Largest Contiguous Memory Area
The following procedure can be used to determine the largest amount of contiguous memory possible between any arbitrary starting and ending addresses using one LMCON (Logical Memory Control) register pair. This procedure assumes that it is permissible not to include some pieces of memory that can be mapped as cacheable. It does ensure, however, never to map a non-cacheble area as cacheable.
It should be noted that this method does not necessarily need to be used if the starting address and size of the cacheable memory regions in a system conforms to the following rules:
Let D = 2int( log2( (addr2+1) - addr1) ) ;
Let d = D/2;
D represents the largest area of contiguous area that can be mapped between addr1 and addr2. d represents the smallest area of contiguous area that can be mapped between addr1 and addr2
ceiling(n) = n; | # If n is an integer | ||
= int(n+1); | # If n is not an integer |
if(( DStart+D-1) <= addr2)
{ | Start = Dstart; |
Size = D; | |
} |
{ | Start = dStart; |
Size = d; | |
} |
LMADR = Start + Cacheable;
LMMR = not( Size - 1) + Enable Template;
Map the region (0, 0x00DFFFFF) as cacheable.
(0 + 0x00800000 -1) is <= 0x00DFFFFF therefore:
LMADR = 0x2;
LMMR = not(0x007FFFFF) +1;
= 0xFF800001;
Map the region (0x00F00000, 0x0FFFFFFF) as cacheable.
(0x08000000 + 0x08000000-1) is <= 0x0FFFFFFF therefore:
LMADR = 0x08000002;
LMMR = not(0x07FFFFFF) +1;
= 0xF8000001;
Map the region (0x00E5C000, 0x00F93FFF) as cacheable.
(0x00F00000 + 0x00100000-1) is not <= 0x00F93FFF therefore:
LMADR = 0x00E80002;
LMMR = not(0x0007FFFF) +1;
= 0xFFF80001;
Legal Stuff © 1997 Intel Corporation