From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=odBdfayV; spf=pass (domain: linaro.org, ip: 209.85.210.196, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by groups.io with SMTP; Sun, 14 Apr 2019 12:53:00 -0700 Received: by mail-pf1-f196.google.com with SMTP id b3so7531333pfd.1 for ; Sun, 14 Apr 2019 12:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oE0LMpG0gNuvQCROXH9CsKIaomNEO3jOoOztaDgbDTg=; b=odBdfayVYNzOSMsgnhuRoZ0uojbm1CHJBU7T5HjnChAwSiQBq5kyJZ2gSYGnAJLxuN yhmvLB4/ldlt33t6oFQhVWF6Tb/12o6cam6CFA2yI8CoQA1UHP0FNBk5V92b1Gnr+Lmm Wps/7s8ybIYjmMApPEQuCMtBEXq34iXsJAyJjyCJQdFo5NYbAxakygK8T61sk3+r5OJw x39gGfokRm8IHae6L+YoEf2pCqMWmv6Kqb0gMDtGWvWytl06tCGSJ/57nHRywyy4BW5S XNDRb9WpdGC+N+0hVyHwUsQQ9VjO6leFNZZVS79cmTKO/2Dx3GZU32ezHy0HP8qyNp9z no/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oE0LMpG0gNuvQCROXH9CsKIaomNEO3jOoOztaDgbDTg=; b=fd1hGcBOD6xY1SCYWQDr7f237OOMBaUCKt+IGboXSiw/IbUYH4reOO5u68dQ2beMeN Ec8oJLMeagMoORX/y6jaWmDaoATuK/D8t1bFxUw7GRVTCrU2Rf1EJuc37JKAB8qxeiUf XaI6xIQfdJemf9npHgmbXbo5CvarlL3CiOsQqFT4El9nCq50dGeEso7Yt2ze0JbyrlsA W2D9pZ26vtfdEi8vTEyy/8kvczpDxwFhUVSVtK/FF0IkJd7z+9LkynEBIsoKVFxaWwLw ynFCJYb15payKlZItYnpYY8Rqxk+YkDkhRHXA2kqHSWjLRsirUHbDIqW1EvoG07RV7kX evfQ== X-Gm-Message-State: APjAAAX/ubysqI2joti/cSMXLxhRXQviY/NX6bOi12DF3LybzkyIuwf6 lryUxr+FuGqfIcz7c2O8oKYe7ioNidwuDepj X-Google-Smtp-Source: APXvYqwkxSttFHmDU3Z4lS2IW5jhKAzCkm+Gx82FGrhAiOrazvLpE8YMv5P+YOISac8usXEhUh/Xmg== X-Received: by 2002:a65:6148:: with SMTP id o8mr66932906pgv.153.1555271579648; Sun, 14 Apr 2019 12:52:59 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([50.236.184.206]) by smtp.gmail.com with ESMTPSA id j16sm62388977pfi.58.2019.04.14.12.52.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Apr 2019 12:52:58 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi , Jian J Wang , Hao Wu Subject: [PATCH v6 6/7] MdePkg/UefiBaseType.h: treat EBC as a non-native machine type Date: Sun, 14 Apr 2019 12:52:32 -0700 Message-Id: <20190414195233.30045-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190414195233.30045-1-ard.biesheuvel@linaro.org> References: <20190414195233.30045-1-ard.biesheuvel@linaro.org> Instead of classifying EBC as a supported machine type and have special handling in DXE core for loading EBC images, make it a foreign type and rely on the EDK2 PE/COFF image emulator protocol to claim the image when the DXE core finds that it cannot be supported natively. Signed-off-by: Ard Biesheuvel Reviewed-by: Michael D Kinney --- MdePkg/Include/Uefi/UefiBaseType.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 8c9d571eb1ce..33b872af91a9 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -250,14 +250,14 @@ typedef union { #if defined (MDE_CPU_IA32) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_IA32) #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64) #elif defined (MDE_CPU_X64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_X64) #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) @@ -270,7 +270,7 @@ typedef union { #elif defined (MDE_CPU_AARCH64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_AARCH64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_AARCH64) #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -- 2.17.1