On 01/15/14 04:06, Roy Franz 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?
Just a guess, from "BaseTools/Source/C/Common/BasePeCoff.c", function PeCoffLoaderCheckImageType():
if (ImageContext->Machine == IMAGE_FILE_MACHINE_ARM) { // // There are two types of ARM images. Pure ARM and ARM/Thumb. // If we see the ARM say it is the ARM/Thumb so there is only // a single machine type we need to check for ARM. // ImageContext->Machine = EFI_IMAGE_MACHINE_ARMT; if (ImageContext->IsTeImage == FALSE) { PeHdr->Pe32.FileHeader.Machine = ImageContext->Machine; } else { TeHdr->Machine = ImageContext->Machine; }
} else {
Laszlo