[syslinux] x86 vs. x86_64 detection proof of concept patch

Chris Newton chrisn at aspsys.com
Mon Oct 4 17:19:25 PDT 2004


Greetings all,

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
architectures.

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
x86_64.

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.

Chris Newton
-- 
J. Christopher Newton
Software Engineer

Aspen Systems, Inc.
3900 Youngfield Street
Wheat Ridge, Co 80033
Tel +01 (303) 431-4606 Ext. 132
Fax +01 (303) 431-7196
Email: chrisn at aspsys.com
www.aspsys.com



More information about the Syslinux mailing list