From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9736CC433F5 for ; Wed, 8 Sep 2021 13:38:35 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 207BB61168 for ; Wed, 8 Sep 2021 13:38:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 207BB61168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EC43F83495; Wed, 8 Sep 2021 15:35:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="j4z/FJqh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 793BC83390; Wed, 8 Sep 2021 15:35:04 +0200 (CEST) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E596E83353 for ; Wed, 8 Sep 2021 15:34:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wr1-x42e.google.com with SMTP id n5so3300073wro.12 for ; Wed, 08 Sep 2021 06:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xTDSOEIpNBSxeC+cyoiHZAOLocEa1YsRKCUBZa05TlY=; b=j4z/FJqhVOiPe/9X2iJw/h5n4w0L0U2sjlhi/aSQbMN9yQ+r+YCyW4pwiW5UUauBxO ALRjpCQAZMx1mUqdhYBeeIvmmGvu/QO69V4XlHQW3yzPruwf4eazZcJFlDEGTqW0CKGp EzuAFqU0TSt0ZBXLecliXTq0N9pB91H4hX1NI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xTDSOEIpNBSxeC+cyoiHZAOLocEa1YsRKCUBZa05TlY=; b=lIewOFCRIYl3Yco/x7C4JPV+PN9viQGQWrfvWaeqtdWhaBTaqMpx1HzWtGMCVm0tmk j0mmv+CQ+N5EN9IJRC2Zbi4u4drqcZmgYLU8aYjZIXXnq2TkDKah2tq/Why87sq6CCC8 wHzIWsElSvlQUknRr8evJfB6oaUxuvfbnLWUf1gLkhlsCukWEMtQDs+V/C/CFIQB4pVd EbuoWseLsa2ATiAloS3cbHD41fe4iP1HdbfzWQJ7K+ZtEFfSWaEtrYOCt26i0wb7oMcz MzyBME/1jCSuw9Zf45XFhrcClOeuwDI9mNoHInNrZQIkHoEGvN27UcV7VIQZwVdCWeBZ 8n+w== X-Gm-Message-State: AOAM530Bhp9X2kHdaNdrI3JXCjm6rCH2elbVqnNi7xAZ0k6aiuxH0bJ4 D3RqGhZbjJdrV3V2PN4iU1J+O/LKHAZKzn/o X-Google-Smtp-Source: ABdhPJwdbOv+na1j+rhRCZsBN2iAjNmvvoFLwESt6tNg+j35rYbq74fJTCR5ItUzjyAMOxhGW7+Qwg== X-Received: by 2002:a05:6000:188d:: with SMTP id a13mr4127048wri.99.1631108088196; Wed, 08 Sep 2021 06:34:48 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:47 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass Subject: [PATCH 24/35] x86: Allow booting a kernel from the EFI app Date: Wed, 8 Sep 2021 07:33:54 -0600 Message-Id: <20210908133405.696481-9-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean At present this is disabled, but it should work so long as the kernel does not need EFI services. Enable it and add a note about remaining work. Signed-off-by: Simon Glass --- arch/x86/lib/bootm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 733dd712570..ff0e9f6a085 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -179,10 +179,14 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) * U-Boot is setting them up that way for itself in * arch/i386/cpu/cpu.c. * - * Note that we cannot currently boot a kernel while running as - * an EFI application. Please use the payload option for that. + * Note: this is incomplete for EFI kernels! + * + * This can boot a kernel while running as an EFI application, + * but if the kernel requires EFI support then that support needs + * to be enabled first (see EFI_LOADER). Also the EFI information + * must enabled with setup_efi_info(). See setup_zimage() for + * how this is done with the stub. */ -#ifndef CONFIG_EFI_APP __asm__ __volatile__ ( "movl $0, %%ebp\n" "cli\n" @@ -191,7 +195,6 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) [boot_params] "S"(setup_base), "b"(0), "D"(0) ); -#endif } /* We can't get to here */ -- 2.33.0.153.gba50c8fa24-goog