From patchwork Mon Jan 27 05:06:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1229597 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XJSt+OON; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 485dXF0gV3z9sR1 for ; Mon, 27 Jan 2020 16:26:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A8AE78193A; Mon, 27 Jan 2020 06:14:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XJSt+OON"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 80731817D4; Mon, 27 Jan 2020 06:10:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (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 B41BC817D8 for ; Mon, 27 Jan 2020 06:09:42 +0100 (CET) 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-io1-xd42.google.com with SMTP id x1so8556438iop.7 for ; Sun, 26 Jan 2020 21:09:42 -0800 (PST) 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=nzMpw6jsZpaN7Vu4orvqqoAdcoRoZnYmrQHKNyzBUlA=; b=XJSt+OONjFOnivq3BuPqMi3F7KAOFbj+az5h9jkPIb20QAsbptW1pV2DmSOownTcLu GvLs4s4yYWz+1OPswVqy1D3DEqG1b905rjeo3+pWqHltca8HVqOdf7RNIdsFsgrep+/Q jZMgtb+2ahhaKCQpc0emTppqr9dnEafQbyZDQ= 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:mime-version:content-transfer-encoding; bh=nzMpw6jsZpaN7Vu4orvqqoAdcoRoZnYmrQHKNyzBUlA=; b=K6ifYn8XM/LPEVpgvtoMKp+BhTDxUX2WUUqXnR1m+znDY2fUsKAI5scJM0jxe5OqzT Xi1TCj1eicHUTzLVlbxM8y+yF4q/p1hpoTJa0S5pBCk32dSCg/J342/OKE7VR/Cv4dlJ k2VnTPoyuOG4BU4xtZKdgle1kSC+sEQ/WUJA8nNxCTHFE2VXM0JOgBWv/50w4Dfs5A4H NIP1QuIkWmzt+Qq3sfB1dukt5IG/ggvBaF8OQzNiCAEwPNNMB/UCrFZ/CktHZKGYcWuj y5BWWzKOInhryxRoYo1UzE5nJjBNHiWk6UU3wJl/w0f6nXL2365QNq6bsG3RhHH9Hmau THmQ== X-Gm-Message-State: APjAAAV4z2pLe4k6FagXf3fVFt5BVwVHoyz9vyPHlk6Pk4NjXmFmmC4b Xr4Tb4o+fROHROTbyXBjKDGyLu5T5zy8lg== X-Google-Smtp-Source: APXvYqz/rBnh04F9S9cbYH4wlxQC7FbUFB9/GtHwA/sjJJRMuwD6fycMOoFxjLMa6qPNxIIEoY10Kw== X-Received: by 2002:a6b:8ec9:: with SMTP id q192mr11421158iod.237.1580101781419; Sun, 26 Jan 2020 21:09:41 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id h23sm4313195ilf.57.2020.01.26.21.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 21:09:41 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 097/108] x86: fsp: Update the FSP API with the end-firmware method Date: Sun, 26 Jan 2020 22:06:44 -0700 Message-Id: <20200126220508.97.Ie333ce385111e0f6aff34920acf69bd06f1d053a@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200127050655.170614-1-sjg@chromium.org> References: <20200127050655.170614-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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.101.4 at phobos.denx.de X-Virus-Status: Clean This new method is intended to be called when UEFI shuts down the 'boot services', i.e. any lingering code in the boot loader that might be used by the OS. Add a definition for this new method and update the comments a little. Signed-off-by: Simon Glass --- arch/x86/include/asm/fsp/fsp_api.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/fsp/fsp_api.h b/arch/x86/include/asm/fsp/fsp_api.h index e9ac86b2da..c39581c4e5 100644 --- a/arch/x86/include/asm/fsp/fsp_api.h +++ b/arch/x86/include/asm/fsp/fsp_api.h @@ -8,9 +8,18 @@ enum fsp_phase { /* Notification code for post PCI enuermation */ - INIT_PHASE_PCI = 0x20, - /* Notification code before transferring control to the payload */ - INIT_PHASE_BOOT = 0x40 + INIT_PHASE_PCI = 0x20, + /* + * Notification code before transferring control to the payload. + * This is issued at the end of init before starting main(), i.e. + * the command line / boot script. + */ + INIT_PHASE_BOOT = 0x40, + /* + * Notification code before existing boot services. This is issued + * just before removing devices and booting the kernel. + */ + INIT_PHASE_END_FIRMWARE = 0xf0, }; struct fsp_notify_params {