Linux: What are the possible values returned by `uname -m` and `uname -p`?

Solution 1:

i386 i686 x86_64 ia64 alpha amd64 arm armeb armel hppa m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc

Found here, on the right. The list is no full i guess, but close to that :) Googling for linux "list of architectures" helps!

Solution 2:

I'd hardly call PowerPC, Alpha or SPARC "exotic".

The values returned by uname are quite arbitrary, they form an open set. You may find lists of some possible values (autoconf project has one), but there is no real list that will list everything.

Solution 3:

Maybe someone knows of a complete list somewhere...

As far as how the kernel implements the uname system call, filling in the proper information for the uname structure is spread across each of the arch directories in the kernel. So filling in the processor name and machine type for an x86 processor is done within the arch/x86 kernel source tree, and filling in that information for a powerpc is done someplace within the arch/powerpc tree.

I would figure that the kernel source has the answer to your question, it just may be that finding it may be time consuming.