From patchwork Sat Sep 15 13:28:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 146774 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1805192ljw; Sat, 15 Sep 2018 06:29:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrykvFbLD/lz0zZFYU6u47FWi6ViwO/WJ71u8/7xQl/9D/ZyVpENCapG3SIg7q20I53zHC X-Received: by 2002:a63:df04:: with SMTP id u4-v6mr16547005pgg.434.1537018163888; Sat, 15 Sep 2018 06:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537018163; cv=none; d=google.com; s=arc-20160816; b=veYL0EVNfC5Z2dqvxd9I1REK4Wq64rzyo/SyisI4nVM3LkJ0X5oBQYAMFy1PYpEouG RqNDZlZ2GfdXtiO6//376hJgDmJp8ngrZ9Ouu8QwlfsehL5SRW/rQ/FmNL1vby81bjEm YZNCheJ1zJ88vUaTQRnf6wPmLc+BTXzf+2LXScYbXIA29aYx1f4iUAHBgP+AJJnoDxX/ 7G3HLVOFQ/fV46gPbUhktw0BtZs8lP8Qb800zN0hxL9iSS1rngkLAEYc5lryqHW0NsnZ YvVTlOoeOvKZzN/S5ej/bez0Jt/+0uTCmFXO6F/tGv7x45zJWFNJwoqoD2pW8hwvEXyU hudw== 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=U4VGv+eVFkY03QKZrgqqTzOGLf8Xbbj3VZUDjoMQx8Cl0BXLj5pxwIKrwegyXYUylY XRIW/p9TcC6Y4BCF5a435Kj5JZNuT65fJtKZgnVJWRTeXHHikltCtbUm2R5Mk6zgHK5c x64Rz6wHIE6HUpBsR55WArkuKWfSRCzKY+MwLBZRGRzEl8xkGu4rZoQTvjCgv8hDltMz yMseUv3q7RtgteVFsDM+IuycE+2oegbqjkRQSkDxWmTt9ch63l22tvfIf7VUaST/valq klCEkFP7IP7oGom0T7/KpIPyK0F1cHgI60xjEiCVyhitSzsgkhihqneToZAlP/qBN5DG n1CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BW3dkVs2; 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 k1-v6si8101255pgo.0.2018.09.15.06.29.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 06:29:23 -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=BW3dkVs2; 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 E426B211350F8; Sat, 15 Sep 2018 06:29:16 -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=2a00:1450:4864:20::542; helo=mail-ed1-x542.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) (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 A996F211350DA for ; Sat, 15 Sep 2018 06:29:15 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id l5so9500961edw.9 for ; Sat, 15 Sep 2018 06:29:15 -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=BW3dkVs2QJNLZsLc+LBgiJjgbLSwLVxVG2jJIFhGibS82dOS7XrKqMtNmdYfFrUPTF uPbqIy+kdH35i7hgOtfzJTO7wLxpTwRSokmh5HjII9uRa7PusT0RJldpZ0dweZ9Epfyi BreECLdvIM0tPUh454uNWxSkUkREd+qWuwWdQ= 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=LiNNG8B6S76cDgicOfIe4VZGOQDBDKRL7vdlK5I7HGvKdtjVNT6BkMbo0Lx3mU6rvP AHmgJ4AY5O+QY2n08NkrpEkEm1kCGu7w5FpXFLF01Jk3cHN/tRWTwa/egcA2iQ6YNDGa EE6ZcmGp921NR/xTADjnF0QsY2kb5qvhabTk9R3VWYzV4Fx7DE7DX9UaKXvxaBCoVDpn VcFhSeQ+sry/Oa64GXPc5l9ObSyN5OvxzwxORaLIiudgsVQsLWRLSDPbW6X8dbQ+Mddx HBxC+uD7AQIGE+ktcMTUcokGKFzksluwyxmMoEGxZYy31JM8/lbtbOLz9l/CpwCqwnt9 o6Dw== X-Gm-Message-State: APzg51Cvej0FxKisRhJrsVP+vSwMOit0nNAnLNvagQ22p5Zx/1L7UBKn 0P+xyCzN+X8QricnCPPchi/jMJdWV6rssQ== X-Received: by 2002:a50:c05a:: with SMTP id u26-v6mr29518067edd.107.1537018153903; Sat, 15 Sep 2018 06:29:13 -0700 (PDT) Received: from mba13.kuq.prv ([194.138.39.100]) by smtp.gmail.com with ESMTPSA id j23-v6sm4449262edh.29.2018.09.15.06.29.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 06:29:13 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Sat, 15 Sep 2018 15:28:58 +0200 Message-Id: <20180915132859.25727-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180915132859.25727-1-ard.biesheuvel@linaro.org> References: <20180915132859.25727-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 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)