From patchwork Mon Sep 26 03:34:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 674918 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sj8yd0Fg9z9s65 for ; Mon, 26 Sep 2016 13:46:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=b8okK44e; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3627B399B; Mon, 26 Sep 2016 05:40:58 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 71lFmrmieXW1; Mon, 26 Sep 2016 05:40:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01F2DA77E9; Mon, 26 Sep 2016 05:37:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 976B8A7788 for ; Mon, 26 Sep 2016 05:35:58 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KgxwmP34ClfA for ; Mon, 26 Sep 2016 05:35:58 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) by theia.denx.de (Postfix) with ESMTPS id 131FFB3895 for ; Mon, 26 Sep 2016 05:35:27 +0200 (CEST) Received: by mail-it0-f48.google.com with SMTP id j69so33742349itb.0 for ; Sun, 25 Sep 2016 20:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=SXrxHKICoPz/pwJpfsNQqtrtkQy+3dGK9qPt/qzhN84=; b=b8okK44eVHeEoUXs7RZRUQU85s6i2ovlq3KRYgzui5mrzI579e+kWye5KhxVLqcJzz 9VC6S00MDCN7mE+nwlvqzJ+uHD5GK5gqQUPPfsyW4xIxHpWXybXLooTbK/kS0wLaVOA4 aXyheMM6D/PtnJAWISPVcODI7COMGmbng3ySAmeHhnrH7QN2kJThZk1/qhBMiV0k3uP3 9SSaY8IYOkaWeca0zzGLKN0GhH9YnuJ7L5jEEZA8yhXlmfmtlqXVmYGbL7Ng7co3LOmh TroEkX5seqI5/hc05w2OVCO2rUDsizwFFntCiOgs3eHKqeUbi/ZjUavGHymRVaaCH4PQ eEUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=SXrxHKICoPz/pwJpfsNQqtrtkQy+3dGK9qPt/qzhN84=; b=e0SqyZipHZpBRkWcVUWagVWPAY64+z6d+DG21vrq5PW6F/omWCXRy/XZYUDTuVTaSy tgDjc/xVCFU3koHgYeME3Y6sJoz84//RYJQ0M/9Z9MSj4LFtAl662eoVsKVeeYW2m3bg aP6fWL97FfXE91Ax9R7UxUlaVlhHIz7P05IoHYy5m+Qh1nUosiyxqBIJXPauJ6Rac+e3 QJnKRWT6KeNHTtcLYzJsQmjsCB7a6LgNxsr6kDymDGu0xau/LGepKV4SuE+ZAwYGL1OK DWWRP/2n2Nltrpv72Mz1ftClqwFcEQMU/XXjhK72kJbprK1FdwRKJoKftKS6RNHPkGcq LPgg== X-Gm-Message-State: AA6/9Rm1ihi3PROqzhh7MhY+3FKAq5zwpQ4JQhoVMF9NWAgL2FNdK9JaKPhfrRtgty9Cmv7c X-Received: by 10.36.144.68 with SMTP id x65mr15443213itd.70.1474860926404; Sun, 25 Sep 2016 20:35:26 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.55]) by smtp.gmail.com with ESMTPSA id v7sm3143214ita.9.2016.09.25.20.35.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 20:35:24 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 45E8E22306E; Sun, 25 Sep 2016 21:35:19 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 25 Sep 2016 21:34:09 -0600 Message-Id: <1474860866-16406-67-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1474860866-16406-1-git-send-email-sjg@chromium.org> References: <1474860866-16406-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH 66/82] x86: Don't build call64 and setjmp on 64-bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" These are currently not supported. Calling 64-bit code from 64-bit U-Boot is much simpler, so this code is not needed. setjmp() is not yet implemented for 64-bit. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile | 6 +++++- arch/x86/lib/bootm.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index 7f89ff0..f0135a7 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -14,7 +14,11 @@ else extra-y = start.o endif extra-$(CONFIG_$(SPL_)X86_16BIT_INIT) += resetvec.o start16.o -obj-y += cpu.o cpu_x86.o call64.o setjmp.o +ifndef CONFIG_$(SPL_)X86_64 +obj-y += call64.o setjmp.o +endif + +obj-y += cpu.o cpu_x86.o AFLAGS_REMOVE_call32.o := -mregparm=3 \ $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32) diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 7cf9de4..b7ed1e6 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -146,7 +146,9 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) puts("Cannot boot 64-bit kernel on 32-bit machine\n"); return -EFAULT; } +#if !CONFIG_IS_ENABLED(X86_64) return cpu_jump_to_64bit(setup_base, load_address); +#endif } else { /* * Set %ebx, %ebp, and %edi to 0, %esi to point to the