Hi Tim,
you can use something like this:
unsigned int asm Read_Processor_ID(void)
{
mfspr r3,286 /* r3 is used for return value (given by EABI standard for power architecture), so just load the PIR register (SPR 286) to r3 */
}
Then just call the function:
unsigned int CoreID;
CoreID = Read_Processor_ID();
Lukas