Code for determining chip type and firmware/bootloader info

Friends:

Is there some code I can run on a Basic Atom Pro chip and the MiniABB or Bot Board II that would read back the chip type and firmware/bootloader version details?

Thanks in advance, -Migs