From patchwork Mon Feb 17 01:02:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1238919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 48LQh869nyz9sRJ for ; Mon, 17 Feb 2020 12:02:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lgvOQgzB; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48LQh85mMnzDqC5 for ; Mon, 17 Feb 2020 12:02:48 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::642; helo=mail-pl1-x642.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lgvOQgzB; dkim-atps=neutral Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48LQh064dTzDq8W for ; Mon, 17 Feb 2020 12:02:40 +1100 (AEDT) Received: by mail-pl1-x642.google.com with SMTP id ay11so6036174plb.0 for ; Sun, 16 Feb 2020 17:02:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JT5jtHXomcTXUnnGbjlj+i/H67KTT6fwHb24aqJCORE=; b=lgvOQgzB86HsVmdorGDSG6ucdn6JEW+4i9KVbFlS6tOXsHrfLw7rfy82579MXR9RS0 U2TnqZ0CSbjmXux5F2MsxNyIneuTMYcLLHSfb/8RZjac3m/UUDn2OjylMom6/WMJfqcp H9PiD4Px5VUngvn1RXgewwehsInTCUcITZhCsH+8rlcuRMN7IF5FxZQUerLXX/g0CRoC 3E5eiq4IZNaT5AAn4qjw4AuCnfwzPCOTj38I4bYNa3BULadssu9qdSwV8rG/J9eAUkQH ecrJrIq+PGAipg+cH0axP04oPZkCzqkOjNMDTtlY56WjA0bNssPlBzBfIKcnjQnooNlg U0Pw== 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:mime-version :content-transfer-encoding; bh=JT5jtHXomcTXUnnGbjlj+i/H67KTT6fwHb24aqJCORE=; b=oU4p5IZpnC9I45U9gpB0M+go+EhR/yZmE/AU0fL/CuyziOXN0Qe+1de/PYqbqCekka mive6Zj6Oj4Q/R4eKeb2O7i4g3/Fnutil0a/ZTYpwXaSIRZ0qbUfbC0toOWgoVzrBFrr Q/CyibUKPY2n01B27tud5mAAXx55JpeIRw9NYPFEzjAJYTIdXxfnGzkgjLQn45GS7ATK E8U5enqZN3LAB0PB1HkiluBKjNR84vybLxwwMkiW4Orgb2esiEkimIaW04E7De7Q2wOy qkPfw5G8bCcnkQqnvBFuKOK8r5CN71CbDhjk1rSqR6rj3Hg1lJ7jE/8OE6OEvnv5k8di FPuA== X-Gm-Message-State: APjAAAUuB84H++58FhGDe4csKDPqasvlvxguFM+UaDYSEsHqENu1GxXO PWN34k3Mj8daS3FzuhoH1jrzz/kF X-Google-Smtp-Source: APXvYqwWWn4MgF3r9pK/5zpBxOQ1QtwTGpVgAavFjPKQJxQpyeTCyfSBMv7lsKkwvdTBxciePi+k7w== X-Received: by 2002:a17:90a:8a98:: with SMTP id x24mr17787908pjn.113.1581901356594; Sun, 16 Feb 2020 17:02:36 -0800 (PST) Received: from wafer.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id i11sm14600061pjg.0.2020.02.16.17.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 17:02:36 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Mon, 17 Feb 2020 12:02:23 +1100 Message-Id: <20200217010224.26285-1-oohall@gmail.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Subject: [Skiboot] [PATCH 1/2] core/platform: Add an explicit fast-reboot type X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The OPAL_CEC_REBOOT2 OPAL call allows a specific type of reboot to be requested. We can use this to allow the OS to request a fast-reboot explicitly rather than relying on nvram hacks to change the default behaviour. Signed-off-by: Oliver O'Halloran --- core/platform.c | 4 ++++ include/opal-api.h | 1 + 2 files changed, 5 insertions(+) diff --git a/core/platform.c b/core/platform.c index 97bc7cb6fa1e..99cf5c985399 100644 --- a/core/platform.c +++ b/core/platform.c @@ -116,6 +116,10 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag) opal_cec_reboot(); for (;;); break; + case OPAL_REBOOT_FAST: + prlog(PR_NOTICE, "Reboot: Fast reboot requested by OS\n"); + fast_reboot(); + break; default: prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type); return OPAL_UNSUPPORTED; diff --git a/include/opal-api.h b/include/opal-api.h index 5b07dea1321b..e425d79f209a 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1135,6 +1135,7 @@ enum { OPAL_REBOOT_PLATFORM_ERROR, OPAL_REBOOT_FULL_IPL, OPAL_REBOOT_MPIPL, + OPAL_REBOOT_FAST, }; /* Argument to OPAL_PCI_TCE_KILL */