views:

80

answers:

2

Yesterday, while I was pondering over Why can’t OS use entire 64-bits for addressing? I found another interesting thing. Lets take Intel Core 2 Duo Processor for example.

From "4.2 Alphabetical Signals Reference" of Intel Core 2 Duo Processor E8000 and E7000 Series - Datasheet I came to know that it has 36 address lines & 64 data lines. Data sheet refers address lines as A[35:3] and data lines as D[63:0].

What exactly does this imply? This is my understanding (with few unanswered questions) from above:

  1. Since, there are 36 address lines. Total addressable memory is 2^36=64GB and each physical memory location (byte) is addressed by 36-bit number.
  2. Since, A[2:0] is not mentioned. It implies that MMU (Paging unit to be more specific) after translating virtual address to physical address (with the help of Address tables) it only puts 33 most significant bits on address lines A[35:3]. RAM sends all 8 possible bytes (with 3 LSB, A[2:0]) i.e.. for any request in these 8 byte range. RAM sends the same 8 byte data. right? I guess this is done for efficiency purposes.
  3. What happens next? I mean MMU needed 1 byte data but RAM sent 8 bytes. How is it gonna handle it?
  4. Is this adress bus width been 36-bits since intel enabled PAE?
  5. I'm unable to find address-bus and data-bus width in new processor datasheets (Intel® Core™ i7 Processor Extreme Edition). :( Help me!
+2  A: 

The chip's byte-enable (BE) pins specify which of the bits in the 8-byte chunk are actually relevant.

To access address 0x1 you put all zeros on A[35:3] and set BE[1] (I may have the pin numbers and polarity for BE a bit wrong, but the idea is still correct).

To access bytes 0x3:0x0 you put all zeros on A[35:3] and set BE[3:0].

This should answer questions 1, 2 and 3.

Regarding question 4, it is in fact PAE that will allow you to use 36 bits of address. In later processors the same can be achieved with 64-bit mode paging.

can't help with 5...

Nathan Fellman
A: 

About 5: The Core i7 Architecture uses 3 (On Chip) Memory Controller (for each Channel one Controller) with a width of 64-Bit for each Channel.

But of course you can no where use the 3*64 Bit because the SSE units are conected with 128-Bit lines to the L1 cache(that are of course two 64-Bit Chache lines).

The three Channels are only useful for fast prefetching of different adresses at the same time.

But on GPR's u can only use 64-Bits (because it is a 64 Bit Architecture).

The adressspace should be 36 Bits too, because for what would you need the other bits if you could never connect so much memory.

Quonux
Without meaning any offense, it looks like you have an incomplete understanding of memory addressing. The address in the GPR is only part of the address. To that you have to add a segment base to get a linear address, and that needs to be converted to a physical address by way of the page tables. The page tables are built in such a way that you can create addresses up to 64 bits wide, more than enough to cover the 36 bits that PAE requires.
Nathan Fellman
you're also wrong when you say you can't access 3*64 bits. When you have multiple threads or cores, this enables them to access memory in parallel rather than in sequence, which improves performance.
Nathan Fellman
i wrote the same... here "The three Channels are only useful for fast prefetching of different adresses at the same time.", i just mean, where the hell do you have a SSE operation or elsewhat that uses 3*64 bit? right, nowhere, there are only 128 Bit operations available (SSE stuff)
Quonux
@'Nathan Fellman' , what is the use of using today 64 bit adresses, right, they are only useful in 200 years or something..., so it is ok to limit the real adress space to 36 Bits (for today)
Quonux
My point is that when there are multiple threads running, it is possible to generate requests to fill the cache that are more than 128 bits wide because each thread can request 128 bits at the same time. Also, prefetchers can fill the cache regardless of the instructions that are currently running. That's why when you can read 3*64-bit your performance improves. about the use of 64-bit addresses, the architecture is enough so that in the forseeable future Intel and AMD won't have to increase the address space, which is very complicated. 36 bits is only 64GB, which isn't enough for big servers
Nathan Fellman