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=yQjk5kq9; spf=pass (domain: linaro.org, ip: 209.85.215.196, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by groups.io with SMTP; Thu, 11 Apr 2019 11:58:30 -0700 Received: by mail-pg1-f196.google.com with SMTP id i2so3928752pgj.11 for ; Thu, 11 Apr 2019 11:58:30 -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=hKgow8tW34pETiYCoOIXaLyUO/aUyZupfBLVnz4OeR0=; b=yQjk5kq9pRF4tSMd+kc4b3QKu/Y/RWsaEg8fKl4PbmQfK33quMgeDrGqGSmedrvAvn 9pgJluyrhoWC8Tq4T+0xK67MEETnl68w5YsaoaQK8QMiq8+Oqv2K5T4HpzLIYbktkauh UksHbeN6dUrzWL/61sIz6Dm1oK0+M9eJQPyRqjfd+EOIMckXotIkC4R7Zt7Xasovn8db FZ10AaHU5wAElx3LfvlcU7LYc5AabxYJwUKqaGYB2TFmS9xfQ8fMsBD7AY4YNOdxmAuY lk/1VOuP/pB+e8AKaVqqxfrb5xZv2G8mn0Yg/QXInqNw7Cqlr1/3I7iw0K821uLXdPyv sqZw== 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=hKgow8tW34pETiYCoOIXaLyUO/aUyZupfBLVnz4OeR0=; b=S9svGP8TJfceoB2NNV2eEaxNX2hXTtE6TyKzejwcDhlecwtrDnk7gGY8JJjGlH/d2K Ba7+6wck1g6uSyJpYd/sKgqXOndKtuR7qTUuZJNRkW/Owm9JolqnvMnJKtaomV8VwCjL vouhdX9X27MTNn/XrFy6xBu/rDVfqbIqWh4kMQox+18sDPrdc+phxA92LILAD3jE+9kW PzfK0AREMW7+VSSTnwdznfPo92zmVL/EGzlNS/QV1SKXhw9Vl2ys0YXUEb3ErRSKPijq oXPm2/tQE3BwRcoNAZN5EvPqxjR9lUkwCxLVH+qMu14Nka1gvtUPMP6YO7EqrXgyA8cX Bplw== X-Gm-Message-State: APjAAAUGlR7lfPWzLK3fam7yrPBs4HRSskB0ggu1oK+hGtyDpjrQAR7P CqXQ8SorS5X6v0Ljv1fYY6eW5MBpIVGGwBCW X-Google-Smtp-Source: APXvYqxd6ro1Imi5mDucD03qtL2o6KFKhaCJx2zq634q0GEgXYM14uLgbPf3PbEHK7PvsKpENIeI4g== X-Received: by 2002:a62:e304:: with SMTP id g4mr45678980pfh.71.1555009109153; Thu, 11 Apr 2019 11:58:29 -0700 (PDT) Return-Path: Received: from localhost.localdomain (50-205-23-12-static.hfc.comcastbusiness.net. [50.205.23.12]) by smtp.gmail.com with ESMTPSA id w3sm82712861pfn.179.2019.04.11.11.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 11:58:28 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Vincent Zimmer , Brian Richardson , Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi Subject: [PATCH v5 6/7] MdePkg/UefiBaseType.h: treat EBC as a non-native machine type Date: Thu, 11 Apr 2019 11:58:12 -0700 Message-Id: <20190411185813.2084-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190411185813.2084-1-ard.biesheuvel@linaro.org> References: <20190411185813.2084-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. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- 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