From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: APXvYqyVy0J5Yk8Ddkjpccy43r8IIr//WpMJb+pYqlYrvtc0VoREJr523fKDN6IyaKsfAzr2NFCWYw== 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 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 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: [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: , X-List-Received-Date: Mon, 01 Apr 2019 03:27:42 -0000 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