From patchwork Mon Sep 18 17:47:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 815055 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vOck9m86"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xwtlS127pz9s06 for ; Tue, 19 Sep 2017 03:48:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8CCF3C21C62; Mon, 18 Sep 2017 17:48:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AE64FC21C4C; Mon, 18 Sep 2017 17:48:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7C21EC21C41; Mon, 18 Sep 2017 17:48:07 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by lists.denx.de (Postfix) with ESMTPS id F2C4AC21C2B for ; Mon, 18 Sep 2017 17:48:06 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id r66so782548qke.4 for ; Mon, 18 Sep 2017 10:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=iaO37GZ8kOoy7iC1VbXK+uUgHlF2EzPzkl6DgLQz0LQ=; b=vOck9m86ZICWUWAKyNEGGo1bdfXc5Scq5EO41QoBmPzFEI2T2wK8+L9ym7gkx/H/W7 /8JbFuK5xQTdarqvjKGU3pNKMI2jutiLr1aTr1kU4UTSIcjhuR/eBx/gQUbF9mU+bFWs jhr0mS94j4jKVwXG6OW5qekt/lR3JVNijPNHd4Vav9nThuymvCVBaPaPf1nXh4PMBsfC K9w7sk6ZjDwo/YWqu08f4kFiuMZ+ZmXx5b4swmDIQ+C6z/KzFQpKb5uv28NPPa3IpxLj zTMSrXOWsgCKw+wJoDKTSIG1TNxt36O+LQQGJC4lLsQVavB99xpq0ilfWqjX1P8FxolB 75Rw== 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; bh=iaO37GZ8kOoy7iC1VbXK+uUgHlF2EzPzkl6DgLQz0LQ=; b=jZv8yEK5z0PGNh+AtLj1WYSUB/u8ycAEvyaAfCbpgQHhum+XJWU/8Zzp8f03MHoUAR URR058XmNp5eAc/cCDM507WCnw8jptRqeI3mIYSTfn2pg7KCIMF/grPqz4jez8kvCGyV ZYtiJRQsSc9iNDImtCRBUk+TY7lD378fpsotqnd0Ym/RpQyXZttdVjxijIzZysBvLS/B 9baSdE1yV2dmZgjZXVDsk8yg89FjgHustktntiWUwS9qGBMrOtS1MHoSg+hd2QYsXi3P AciRvW9fCn68Q6B/4hgZq8iyPe6Vrn0KFKrSgOFufdTUXcAVSCiqwG1+rSOGsNY6ypgB c09g== X-Gm-Message-State: AHPjjUgUJjhR4/hvlNab/4A8L7UjHNGAKX9RmxlxcWxb/uCCCSde2f83 PyB821P56s5udOdUWWE= X-Google-Smtp-Source: AOwi7QDQ1O835RyQH/NcVekDjCb7bzQi933PwHsmXVD9761pldk9xLBxKXilPv4ElytOELTY1aTuEg== X-Received: by 10.55.39.193 with SMTP id n184mr19987027qkn.273.1505756885269; Mon, 18 Sep 2017 10:48:05 -0700 (PDT) Received: from localhost ([144.121.20.163]) by smtp.gmail.com with ESMTPSA id s66sm5370335qkc.8.2017.09.18.10.48.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Sep 2017 10:48:04 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Mon, 18 Sep 2017 13:47:58 -0400 Message-Id: <20170918174801.31792-1-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH] efi_loader: EFI entry point should be EFIAPI X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This is needed to run 'bootefi' from sandbox. I suspect StartImage() must have been broken too on x86. Signed-off-by: Rob Clark Reviewed-by: Simon Glass --- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index fb8ba9be6a..3c9a466e20 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -96,7 +96,7 @@ static void *copy_fdt(void *fdt) static ulong efi_do_enter(void *image_handle, struct efi_system_table *st, - asmlinkage ulong (*entry)(void *image_handle, + EFIAPI ulong (*entry)(void *image_handle, struct efi_system_table *st)) { efi_status_t ret = EFI_LOAD_ERROR; diff --git a/include/efi.h b/include/efi.h index 04e83220b4..47c2c8f398 100644 --- a/include/efi.h +++ b/include/efi.h @@ -19,7 +19,7 @@ #include #include -#ifdef CONFIG_EFI_STUB_64BIT +#if defined(CONFIG_EFI_STUB_64BIT) || defined(CONFIG_SANDBOX) /* EFI uses the Microsoft ABI which is not the default for GCC */ #define EFIAPI __attribute__((ms_abi)) #else diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 22bb95d738..3e10e6f6b5 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -950,7 +950,7 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, unsigned long *exit_data_size, s16 **exit_data) { - ulong (*entry)(void *image_handle, struct efi_system_table *st); + EFIAPI ulong (*entry)(void *image_handle, struct efi_system_table *st); struct efi_loaded_image *info = image_handle; EFI_ENTRY("%p, %p, %p", image_handle, exit_data_size, exit_data);