Skip to contentSkip to conversation

Can software discover MPC8xx variant?

DISCUSSION Alex Zeffertt 3 participants 4 messages Jan 29, 2003 – Feb 3, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

Can anybody tell me if there is a way to identify which processor from the MPC8xx family software is running on. I hoped I could use the IMMR special purpose register. However, this only tells you the silicon revision, which can have the same value even if the processors are different!

Does the processor type (e.g. 862, 857T, 857DSL) reside anywhere in the processor?

Thanks,

Alex

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 8 lines · Alex Zeffertt

Can anybody tell me if there is a way to identify which processor from the MPC8xx family software is running on. I hoped I could use the IMMR special purpose register. However, this only tells you the silicon revision, which can have the same value even if the processors are different!

Does the processor type (e.g. 862, 857T, 857DSL) reside anywhere in the processor?

U-Boot/PPCboots cpu/mpc8xx/cpu.c contains a lot of generic type detection code, but even there the assumes that the basic type is known at compile time.

Regards,
Marius

-----------------------------------------------------------------------------

Marius Groeger           SYSGO Real-Time Solutions AG       [email protected]
Software Engineering     Embedded and Real-Time Software    www.sysgo.de
Voice: +49-6136-9948-0   Am Pfaffenstein 14                 www.osek.de
FAX:   +49-6136-9948-10  55270 Klein-Winternheim, Germany   www.elinos.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Alex Zeffertt
Quoted 2 lines · Alex Zeffertt

Can anybody tell me if there is a way to identify which processor from the MPC8xx family software is running on.

I haven't checked recently, but I believe the PVR still has the same core type for all 8xx processors. This is arguably a valid thing to do since all of the PPC cores are the same in these processors. There are some mmu and cache differences, but they all behave in the same generic manner.

Quoted 4 lines

.... I hoped I could use the IMMR
special purpose register. However, this only tells you the silicon revision, which can have the same value even if the processors are different!

Right. The processors also have a CPM microcode revision number stored in the DPRAM. Since the real difference among the processors is the CPM, you can read this number and likely detect the CPM configuration. Perhaps from all three values you can detect the processor variant. From a software perspective, it really doesn't matter if you can determine the actual part number printed on the package (that's only for human consumption), but you can detect the silicon configurations if you wish to dynamically adapt to the different CPM configurations.

From the first day of Linux on 8xx, we decided it wasn't worth the baggage to try and dynamically detect all of these details (and we weren't sure we could). In the interest of small, efficient, embedded kernels we adpoted the direction of configuring specifically for a known part.

Thanks.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw

Thank you everyone for your suggestions. It looks like I can't determine the 8xx variant from software in a reliable way. The idea about using pull up/pull down resistors is a good one - but the boards have already been manufactured, so I am not in the position to be able to hard-wire the information in this way.

The reason I want to know the 8xx variant, however, is to optimise s/w for the performance of the chip. So, I guess I can get away with just knowing the clock speeds, and the cache sizes.

I know how to determine the clock speeds (they're in /proc/cpuinfo), but can anybody tell me how to determine the cache sizes (in a non-destructive manner such as is used by ppcboot).

Thanks,

Alex

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/