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::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-Google-Smtp-Source: ANB0VdZSLOYMXIQbzqvL52+VOCZydY239IYUubUTC/8+H4V00Unhy0qtE9+4p5HvElr7SdEiXnyM9A== 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 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: 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: [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: , X-List-Received-Date: Thu, 20 Sep 2018 23:01:58 -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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.17.1