From patchwork Mon Apr 1 03:27:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 161516 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4874724jan; Sun, 31 Mar 2019 20:27:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyebdXZrYuBiOGl1aswsLzPAU0C9j2xTFpQg0ghTQjmWRTb46EiA29pnGMDiGp3vm/CKDzh X-Received: by 2002:a17:902:29ca:: with SMTP id h68mr37468349plb.297.1554089264290; Sun, 31 Mar 2019 20:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554089264; cv=none; d=google.com; s=arc-20160816; b=a5I1yaGfabbcc5FFdJLfIriLgATS7K1Z6BwXfbHKKvfkDimha6+lvjoMK5ZulZ2hxv qxXvXgJ8nkGnlGkWnJs+/2Ru22AijrV0GL7JzkYOBc1nHRuP14kmtbhtrBePabls7ere L6nGn8AQSz59aWFZR47SdRswhMW1fFZYjjZ3k5ATDBxW0JNYIAs3oXI2T8EzA95iOICJ g4zaxVBShkVR0tmuyF5vIpVL71ZyIr3zt+exmS6HC+0U2/+knaY7YZ3MFOSb+dMYPv44 QCtk5F1VIJDMMJpiVZyKUSGT6i3Gg0DER2Cbi4CMzS2tP/sATkZJ1mXW+UrJVR+s/61w 0E1w== 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=kiN/YD3YQreQ/OmHpnjtC0bakpYGVun5XjxuAwjlQio=; b=LGhJyUprF5TjvuowTdwzjDCh0BRNKgo3aaHbqPK/tEDwaqcabGYYedZFIt6Ax86i6q ySgYjn5AC6q+SKjuBYE3af0+ROj/ZydMhB0T8ois9voPFUPnMSoMQINNKzS+gW741krp hKonfk1YFVmtco44PIcmqcKlMODzidccro/3wWQ0bUcqky2HZCqmm0cR3UUCpX5+1c0K 75YbBuacorsmDf5Y66BlBZgJCQNwSPD0QarWbnvzzWtwqu5OLeYBNQdURYYPQNSfk4nS V9kOD4IKjP4zi2Cng8q85K/Db/3b5hxJl3rCQwpGw8J7ZWN/dGmcITWSsVgC5FVCw/lP JwiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j9REY+Ef; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id w126si8247890pfb.196.2019.03.31.20.27.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 20:27:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j9REY+Ef; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 E1D17211EDB42; Sun, 31 Mar 2019 20:27:43 -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::641; helo=mail-pl1-x641.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) (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 46982211E011B for ; Sun, 31 Mar 2019 20:27:42 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id b3so769490plr.7 for ; Sun, 31 Mar 2019 20:27:42 -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=j9REY+EfsXh7Q1+XV/HCwKWyHy2ezj0LvFGpScdCRxAgSEbl+KBGyejtILP9FZZ5/x z0YrC22Q4Ux31vpbiZoIOCHBXr/JHijk3yA2YDosVyb8vCLVa9UAZwh5oFD8MY8bsJiI bEWiTcpvMOfjfV9UnUQlj62/s50rVzOFRpNRls13lMwb7gbh5VdWTnkRZ27l9Yy9RP5l Q35MI29Ouom7moG3UXBvW/ZBVCuC+RUfverU5acpa7Y/WHeWgLK7Ae3o6o+1XgJD9ThQ +ycsMqu/TAZoiT0O2TtfILR13flHTpnJI1BmEUnPa8VQNriwUGIDiLjN/CtWx80aa5/j s5OA== 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=Ly6q0J9d8hUgWooz2H05ZPMAJBkBl6sG1Nbtm0NKLeHMkflnS5Jk5YbqbBM3s5bK0Y l6vPIMuI6UQEn/njZyQMJULeKc1oM3LE0oEqlaQ8oN430VLBSer/RalPO3+LO7lIMbAe nFoI/spMHPjr6Gi5HFanuVC1DRjHgWdFEiiStHfvrW/pmsNBNVdznt/ywDSj6bYMvpMh XbDTAjFlVJ2sHdChD/3BDpDW2RDowWWD2vYP5EqLpGZ8PaewzanTqkiSgGNWmhSe7Mib 0mM/pHfoCx/3XmzmzTc0WtVsccramOfZ81GH57fp1fnssQJVYjyiVvl0TZopyZafszzb mptg== X-Gm-Message-State: APjAAAX+60Ld6Qww6230cDmBlz5gcrUgwRA/jLrBNCDpbBMdMWUbVANy 8sv/y8njvKzusphustE5prs4iH4QdYg4bQ== X-Received: by 2002:a17:902:9a0b:: with SMTP id v11mr61901911plp.194.1554089261626; Sun, 31 Mar 2019 20:27:41 -0700 (PDT) Received: from mba13.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id 16sm12758092pfz.106.2019.03.31.20.27.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 20:27:40 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 1 Apr 2019 10:27:08 +0700 Message-Id: <20190401032709.14787-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401032709.14787-1-ard.biesheuvel@linaro.org> References: <20190401032709.14787-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v4 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 , 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 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 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)