(I responded to the original thread on linux-kernel, but I'll respond here to so as not to leave it hanging.)
On 15 January 2014 03:06, Roy Franz roy.franz@linaro.org wrote:
I'm trying to nail down what the proper Machine Type value in the PE/COFF header should be for ARM linux images with the stub.
The PE/COFF specification lists two values that seem appropriate:
IMAGE_FILE_MACHINE_ARM 0x1c0 "ARM little endian" IMAGE_FILE_MACHINE_THUMB 0x1c2 "ARM or Thumb ("interworking")"
Tianocore currently only supports the 0x1c2 value, but it seems that the 0x1c0 should also be supported. Is there a specific reason only 0x1c2 is supported?
0x1c2 specifies that the application supports "interworking" - an application can contain both ARM (A32) and Thumb (T32) instructions. This is mandated by modern procedure-call standards (which are mandated by the UEFI spec). . 0x1c0 is "ARM (now A32) only", so not conformant to modern PCS. There is also an 0x1c4 code - "Thumb (T32) only", invalid for similar reasons.
Regards,
Leif