|
Intel® Atom™ Processor Series |
Devices |
64-bit Support |
Hyper-threading |
|
N270, N280 |
Netbooks |
No |
Yes |
|
N4xx series , N5xx series |
Netbooks |
Yes |
Yes |
|
D4xx series, D5xx series |
Entry level desktops (e.g. nettops) |
Yes |
Yes |
|
230, 330 |
Entry level desktops (e.g. nettops) |
Yes |
Yes |
|
Z5xx |
Mobile Internet Devices (MIDs), some netbooks |
No |
Yes (except Z510) |
|
Z6xx |
Mobile Internet Devices (MIDs), some netbooks |
No |
Yes |
|
CE4100 |
Consumer Electronics (e.g. Internet TV) |
No |
Yes |
|
E-series |
Embedded |
No |
Yes |
|
Extended Family |
Extended Model |
Type |
Family Code |
Model No. |
|
00000000 |
0001 |
00 |
0110 |
1100 |
Процедура определения процессора:
struct CPUInfoStruct
{
union {
char CPUBrandString[48];
__int32 nCPUBrandString[16*3];
};
int nSteppingID;
int nModel;
int nFamily;
int nProcessorType;
int nBasicProcessorID;
int nExtendedModel;
int nExtendedFamily;
bool bAtomProcessor;
bool bHyperThreading;
char CPUString[13];
};
bool isAtom( const CPUInfoStruct& info)
{
// firstChar is beginning pointer, c is end minus the string
// length we're looking for
char const * firstChar = info.CPUBrandString;
// Atom(TM) = 8 chars
char const * c =
info.CPUBrandString + sizeof(info.CPUBrandString)/sizeof(char) - 8;
// search backwards, looking for 'A' 't' 'o' 'm' '(' 'T' 'M' ')' or till
// we hit decrement past firstChar
while ( c >= firstChar )
{
if ( c[0] == 'A' &&
c[1] == 't' &&
c[2] == 'o' &&
c[3] == 'm' &&
c[4] == '(' &&
c[5] == 'T' &&
c[6] == 'M' &&
c[7] == ')' )
{
return true;
}
--c;
}
return false;
}
// This function fills up the CPU Info Struct for us.
// multiple CPUID calls are necessary to get all the information and
// each call gives you more information about the depth of calls you can make.
void fillCPUInfo(CPUInfoStruct& info)
{
__int32 CPUInfo[4] = {0};
::memset(&info, 0, sizeof(CPUInfoStruct));
// cpuid intrinsic calls the cpuid instruction and returns 4 32bit values
// the results depend upon the InfoType parameter passed in
// Get the number of maximum InfoType value we can call for this
// processor and also get the ID string
::__cpuid(CPUInfo, 0);
// Swap last two to put in readable form
int temp = CPUInfo[2];
CPUInfo[2] = CPUInfo[3];
CPUInfo[3] = temp;
// Copy 12 characters
::memcpy(info.CPUString, &(CPUInfo[1]), 12 ); // 13th position is zero
// Check to see if we can make the next call
if( CPUInfo[0] < 1 )
{
return;
}
// Call with InfoType == 1
// CPUInfo will be set to the following:
// 0: Bits 0-3: Stepping ID
// 0: Bits 4-7: Model Number
// 0: Bits 8-11: FamilyCode
// 0: Bits 12-13: Processor Type
// 0: Bits 14-15: Reserved
// 0: Bits 16-19: Extended Model
// 0: Bits 20-27: Extended Family
// 0: Bits 28-31: Reserved
// 3: Bit 28: Hyper-threading technology
::__cpuid(CPUInfo, 1);
info.nSteppingID = CPUInfo[0] & 0xf; // bits 0-3
info.nModel = (CPUInfo[0] >> 4) & 0xf; // bits 4-7
info.nFamily = (CPUInfo[0] >> 8) & 0xf; // bits 8-11
info.nProcessorType = (CPUInfo[0] >> 12) & 0x3; // bits 12-13
info.nExtendedModel = (CPUInfo[0] >> 16) & 0xf; // bits 16-19
info.nExtendedFamily = (CPUInfo[0] >> 20) & 0xff;// bits 20-27
info.bHyperThreading = (CPUInfo[3] & 0x10000000) != 0;// bit 28
// Check to see if we can get the Processor Brand String
// Call with InfoType == 0x80000000
::__cpuid(CPUInfo, 0x80000000);
if( CPUInfo[0] < 0x80000004 ) // extended info supported up to 4?
{
return;
}
// Yes, make the 3 calls (16 chars each or 4 ints each)
// to make up the brand string - it's null terminated
::__cpuid(info.nCPUBrandString + 0, 0x80000002);
::__cpuid(info.nCPUBrandString + 4, 0x80000003);
::__cpuid(info.nCPUBrandString + 8, 0x80000004);
// Now we can check for Atom(TM) processors
info.bAtomProcessor = isAtom( info );
}
int _tmain(int argc, _TCHAR* argv[])
{
// This is how to use the code
CPUInfoStruct info; // Create the struct
fillCPUInfo(info); // Fill it
// Query the bits
printf_s("CPUString : %s\n", info.CPUString);
printf_s("Brand String : %s\n", info.CPUBrandString);
printf_s("Hyperthreaded?: %s\n", info.bHyperThreading ? "Yes": "No");
printf_s("is it an Atom : %s\n", info.bAtomProcessor ? "Yes": "No");
return 0;
}
| Вложение | Размер |
|---|---|
| Intel-Atom-Block-Diagram.png | 231 КБ |
у меня по етому поводу два вопроса :
- какими из открытых источников вы пользуетесь
- присутствует ли в Атомах - АМТ, или планируется ли
с уважением
судосборщик, ЧСЗ
... иди туда, незнаю куда, возьми то, не знаю что ... (C) Русские народные сказки
Отправить комментарий