[syslinux] x86 vs. x86_64 detection proof of concept patch (try two)
H. Peter Anvin
hpa at zytor.com
Thu Oct 7 11:17:24 PDT 2004
Chris Newton wrote:
> Greetings all,
> Sorry, resending this with the attachment inline.
> First of all, a disclaimer: Please forgive my horrible assembly code.
> This is just a quick munging of code to achieve x86 versus x86_64
> detection within pxelinux. So please look at it as a proof of concept
> and not a real piece of code. :) For example it only works on pxelinux
> and has no thought for extending it beyond simple x86 versus x86_64
> I had the need for pxelinux to be able to detect if the cpu its running
> on is a x86 or x86_64 machine. Seeing as the two opteron motherboards I
> have don't specify any difference in the PXE identification string in
> the DHCP discover packets they send out. So I have copied some code from
> the linux kernel for detecting the cpu and added in a 'kernel64'
> configuration option. The kernel64 option is ignored if the cpu is not a
> So my machines can now boot with a 32bit or 64bit kernel depending on
> their architecture. I did not put in a similar append64 option because
> my initrd works for both kind of kernels.
> Hopefully this can benefit someone. :) Best of luck.
I think this kind of things are better done with a comboot image, mostly
because x86 vs x86-64 is only one of *many* selections one may wish to
make when selecting a kernel. Some people would want to have
i586/i686/athlon/pentium4/k8/em64t kernels on tap, for example.
More information about the Syslinux