- /* Set minimum cache line size */
- if (CacheLine < 128) CacheLine = 128;
-
- /* Hard-code size/associativity */
- Associativity = 8;
- switch (RegisterByte)
- {
- case 0x22:
- Size = 512 * 1024;
- Associativity = 4;
- break;
-
- case 0x23:
- Size = 1024 * 1024;
- break;
-
- case 0x25:
- Size = 2048 * 1024;
- break;
-
- case 0x29:
- Size = 4096 * 1024;
- break;
-
- default:
- Size = 0;
- break;
- }
-
- /* Check if this cache is bigger than the last */
- if ((Size / Associativity) > CurrentSize)
- {
- /* Set the L2 Cache Size and Associativity */
- CurrentSize = Size / Associativity;
- Pcr->SecondLevelCacheSize = Size;
- Pcr->SecondLevelCacheAssociativity = Associativity;
- }
- }
- else if (((RegisterByte > 0x65) && (RegisterByte < 0x69)) ||
- (RegisterByte == 0x2C) || (RegisterByte == 0xF0))
- {
- /* Indicates L1 cache line of 64 bytes */
- KePrefetchNTAGranularity = 64;
- }
- else if (RegisterByte == 0xF1)
- {
- /* Indicates L1 cache line of 128 bytes */
- KePrefetchNTAGranularity = 128;
- }
- else if (((RegisterByte >= 0x4A) && (RegisterByte <= 0x4C)) ||
- (RegisterByte == 0x78) ||
- (RegisterByte == 0x7D) ||
- (RegisterByte == 0x7F) ||
- (RegisterByte == 0x86) ||
- (RegisterByte == 0x87))
- {
- /* Set minimum cache line size */
- if (CacheLine < 64) CacheLine = 64;
-
- /* Hard-code size/associativity */
- switch (RegisterByte)
- {
- case 0x4A:
- Size = 4 * 1024 * 1024;
- Associativity = 8;
- break;
-
- case 0x4B:
- Size = 6 * 1024 * 1024;
- Associativity = 12;
- break;
-
- case 0x4C:
- Size = 8 * 1024 * 1024;
- Associativity = 16;
- break;
-
- case 0x78:
- Size = 1 * 1024 * 1024;
- Associativity = 4;
- break;
-
- case 0x7D:
- Size = 2 * 1024 * 1024;
- Associativity = 8;
- break;
-
- case 0x7F:
- Size = 512 * 1024;
- Associativity = 2;
- break;
-
- case 0x86:
- Size = 512 * 1024;
- Associativity = 4;
- break;
-
- case 0x87:
- Size = 1 * 1024 * 1024;
- Associativity = 8;
- break;
-
- default:
- Size = 0;
- break;
- }
-
- /* Check if this cache is bigger than the last */
- if ((Size / Associativity) > CurrentSize)
- {
- /* Set the L2 Cache Size and Associativity */
- CurrentSize = Size / Associativity;
- Pcr->SecondLevelCacheSize = Size;
- Pcr->SecondLevelCacheAssociativity = Associativity;
- }