Hi,
The following code works for Win32bit platfomr properly, how can i port the same code on Linux platfrom,
using c or c++ language only, can someone point out how to port the following code to linux platfrom.
#define INITIAL_APIC_ID_BITS 0xFF000000 // EBX[31:24] unique APIC ID
int get_APICID()
{
int nAPICPhysicalID = 0;
unsigned nIds;
unsigned int reg_ebx = 0;
__asm
{
mov eax, 1
cpuid
mov reg_ebx, ebx
}
nAPICPhysicalID = ((reg_ebx & INITIAL_APIC_ID_BITS) >> 24);
return nAPICPhysicalID ;
}
Thanks in advance,
Start Free Trial