User's Manual

Chapter 7 — Programming
CN30 Mobile Computer User’s Manual 153
None.
IOCTL_PROCESSOR_INFORMATION
Returns processor information.
Usage
#include “pkfuncs.h”
Syntax
BOOL KernelIoControl( IOCTL_PROCESSOR_INFORMATION,LPVOID
lpInBuf,DWORD nInBufSize,LPVOID lpOutBuf,DWORD
nOutBufSize,LPDWORD lpBytesReturned );
Parameters
lpInBuf Should set to NULL.
nInBufSize Should set to zero.
lpOutBuf Should be a pointer to the PROCESSOR_INFO structure. The
PROCESSOR_INFO structure stores information that describes
the CPU more descriptively.
typedef __PROCESSOR_INFO {
WORD wVersion; // Set to value 1
WCHAR szProcessorCore[40]; // ìARM\0î
WORD wCoreRevision; // 4
WCHAR szProcessorName[40]; // ìPXA255\0î
WORD wProcessorRevision; // 0
WCAHR szCatalogNumber[100]; // 0
WCHAR szVendor[100]; // ìIntel Corporation\0î
DWORD dwInstructionSet; // 0
DWORD dwClockSpeed; // 400
}
nOutBufSize Should set to sizeof(PROCESSOR_INFO) in bytes.
lpBytesReturned Returns sizeof(PROCESSOR_INFO);
Return Values
Returns TRUE if function succeeds. Returns FALSE if the function fails.
May use GetLastError() to get the extended error value.
IOCTL_GET_CPU_ID
Returns Xscale processor ID.
Usage
#include “oemioctl.h”
Syntax
BOOL KernelIoControl( IOCTL_GET_CPU_ID,LPVOID lpInBuf,
DWORD nInBufSize,LPVOID lpOutBuf,DWORD nOutBufSize,LPDWORD
lpBytesReturned );
Parameters
lpInBuf Should point to a CPUIdInfo structure defined in OEMIOCTL.H.
lpInBufSize Should be sizeof(CPUIdInfo).
lpOutBuf Should be NULL.
nOutBufSize Should set to 0.