I know that, for 32-bit Intel Linuces, it returns i[3-6]86
. For 64-bit Intel, it says x86_64
. But what about other, exotic architectures? (PowerPC, Alpha, SPARC...) Is there an authoritative list somewhere?
Bonus points if there's info about other non-Linux Unices too.
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!
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.
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.