From patchwork Thu Sep 20 23:01:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 147173 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp100180ljw; Thu, 20 Sep 2018 16:02:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYazBOgAiJ/8Hpi+xRSM/G1g6O3Cv0NnEtxfaj4WP5LtbQoOraZx8NVLuJUTUpkaC6dfZhS X-Received: by 2002:a63:2acc:: with SMTP id q195-v6mr35746205pgq.291.1537484531606; Thu, 20 Sep 2018 16:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537484531; cv=none; d=google.com; s=arc-20160816; b=o2L9lGC/hm7F5/OI9Vo+hUz16xTHwGSUIz896xMYEcC9fuGWLx2QpKnqVhIqfO4SO/ ocbz/4PJ4hZNoMlku19Os20Gu/bNvQXVS1FrOr9mZaj46TG1yCGVngXxUbsE4Halpxsu lgm73B/rkd6ssArvDk6IePqSX7T0Rev98aHyvSWCdv76fXoDERG229TNGnF9L9E3gApn yPFkLBgbK9BBCZCVvevjnZOlkhC4PGbA2kO9n09ouBj3eWakQBVCpC/v0/bQsRV1z6iF BCRSMPXxwX2Pz4h16MwxROOzv5V4PjlxlussGfVCzVPGFEnbZDsEQJQHNmTaN2sOPAJl n/sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=aSgBfGzeKVNGRhm4ZlKcmT3FMDmvCnz8cakJRezF3L8=; b=IZYncyZs4NS1F5lZpZhRlbC15IWEBAVaPoDSdWnK1iBIhRVFTeBXcsUoHO5DJJ+eE7 EsEwW55GnAlJeb+7166DzO2rU6JX2XM+fkmLkfGY5DG7k1jQOBs/jFCpr34dxyOPteWE p3c9dkBcCqaFVNomBMolrTtXOysQVZjI24YsHnTV/SFe3B9UnGzirD7FnjpuGuPjHzfI T/Hv7baOf0DZiog7LmE55WE2w8lLrBZGp80Bd030PSo/7aje9/nshZgbwNJ8BX3HFsX2 MSGYr1MybVBFdTD+7YLyAYWX+H8UfFCADdtqG6r/WALNLXmkMZAE0HpQSTZMpmsG9gdl 5PcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=f58H5xT3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id y18-v6si27424347pfb.161.2018.09.20.16.02.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 16:02:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=f58H5xT3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2FBD921BADAB3; Thu, 20 Sep 2018 16:02:00 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::544; helo=mail-pg1-x544.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6EDFB2114A6A1 for ; Thu, 20 Sep 2018 16:01:58 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id z3-v6so139941pgv.8 for ; Thu, 20 Sep 2018 16:01:58 -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=Ft0Q4pLHJguByhAwaNLJXdR9Pe2IpF6qrxp5PSAGM40=; b=f58H5xT3VcR711Vs/qcM4hcaBxdI5g1CocDEwVy3gLAhhdtlElkpXzZb8XHojOId+o K7c8IyYrwPcGwcynneAGdJ8Gru5P6/U1oZQojxsO2vCbfSpPNNEBlZ8oklXnQJKirQzZ +ZN2BuZFMYRJcezo2KXoeBAKB0gSIEXgtem2Y= 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=Ft0Q4pLHJguByhAwaNLJXdR9Pe2IpF6qrxp5PSAGM40=; b=X82C896/sDVyts6BgeM436u9AOfdInha9m2Ofp0JM5WA8biQWiyeh525Qzsqq7w9zb a8elZKlGEyx7f21flDkyHSpWqqQqb5wnBgZN3ZLGUJ6bPty2wBSIsvYHDypfo9Mr6t0A bIy5XoFiNujqRle6QqyTFzW0M3jQp1w8w/K81G9szjF8Nk7syVZQ0o4gCu9qT8HXpxvr 0JT3+DzDvNfNEBX3I3kR0HywYDEuueAk/r2NUfpHH0CNAsv0GVqR14YjyGB9O3DJ7moS 6cVuCU9FDz31YpTNIYpfoAhP3RVi/J/HNJpuYNutbzL2wzCODLAwC6J5WVAQkUCynoWQ O0zA== X-Gm-Message-State: APzg51CYXjCOvHa8uiVWMJwAjSr1gu216NZmupLy93TPu+BSpbmNZHcN AKRlYzBVNfVaM9j/GwV1ERns7CB/Qbc= X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr43006537pfa.63.1537484517902; Thu, 20 Sep 2018 16:01:57 -0700 (PDT) Received: from localhost.localdomain ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id p4-v6sm37507823pfd.65.2018.09.20.16.01.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 16:01:57 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 20 Sep 2018 16:01:44 -0700 Message-Id: <20180920230145.7565-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180920230145.7565-1-ard.biesheuvel@linaro.org> References: <20180920230145.7565-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 6/7] MdePkg/UefiBaseType.h: treat EBC as a non-native machine type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Vincent Zimmer , Eric Dong , Andrew Fish , Jaben Carsey , Brian Richardson , Liming Gao , Michael D Kinney , Star Zeng MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 401db7f620b3..e52121809deb 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -250,21 +250,21 @@ 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_IPF) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_IA64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_IA64) #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) #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) @@ -277,7 +277,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)