Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp917430pxm; Thu, 3 Mar 2022 07:06:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkH7tEoqXpnMSwjRWl7jYbScFAXCSgOgIri28rDEUNPPUKG+PmWiQ8wPMJVQ6OadtGmWly X-Received: by 2002:a17:906:2a97:b0:6b4:143f:37c6 with SMTP id l23-20020a1709062a9700b006b4143f37c6mr28272839eje.133.1646319988928; Thu, 03 Mar 2022 07:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646319988; cv=none; d=google.com; s=arc-20160816; b=sinbSfJGDVdyYoP1haxkKRhVErLbVUcGmyguyZQtV6SLqKidqHM7KbuEovNw9wmKk1 umvV+/TJV2/6CEQceMIMDwl6pYu3U3o9DpFFPoHv6xrTKElMItzTcjg3E+nJDnbYtCO2 ub/CL68jQy87/vxE6e20z9PIBBQRIDEVcfcn9ys57VzTiK/T1qsUSZVaRO9Ad6PZtHid 4IX8hwZSXgPCjvIOMe5BjAiml+rNJxBTpGjCvq1/rhsDfPs/rCVpPogrQo5i0MUNtnC8 bB6ORndvNmHvsqrN9V9X5mAiWC1DYHRGVJxA/T+agV+d74g5vqzhjGEmcUJMPfwS3z+W sgdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hyZKtms3/fooY346YEFh4aDUln7VR4f3ZkWUMV+VfiY=; b=LEHIhZhX1vVnfPxp/j6HQCnNnpdQ+0SUsPNEqZS6JuOJiLs6kLEvqV78baHL+H+VZp 5OGDPaoN0O3ye9bLYBP3aEo+L6qPGgpfTxrgxXjgpDG+USHnx88cqFu06KJEDAsjrSxf 6IsQ4p+byNlGfDEAbRJS2I3/Mu7HeZWzJwafbZJiACzZE9Ga7BlBvf2Ir3XsBBC+Qhuu CZH35qbEhmdtRJ5Euj3tUciz6muWuYrbt84Q6EVRaxYk8XNsg2DT2WhZIZS44Iu6uj9T G71wyplQmsp/ysNz3Mmi9vKi4E1SVrUpJClTfvzxd5I8IysA1vdYHVnGRqcg2wrIqENH 9y0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XoZI7nJB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz11-20020a170906bb0b00b006adefd98de1si1427564ejb.760.2022.03.03.07.06.04; Thu, 03 Mar 2022 07:06:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XoZI7nJB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234228AbiCCPAw (ORCPT + 99 others); Thu, 3 Mar 2022 10:00:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234225AbiCCPAp (ORCPT ); Thu, 3 Mar 2022 10:00:45 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A05C111EF0D for ; Thu, 3 Mar 2022 06:59:59 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id i6-20020a1c3b06000000b00386f2897400so123214wma.5 for ; Thu, 03 Mar 2022 06:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hyZKtms3/fooY346YEFh4aDUln7VR4f3ZkWUMV+VfiY=; b=XoZI7nJBCKEM9JhyOj4+4Q/Ee/yq2th4jAnz/UhBWAKDEgTrbUkfdcxKDciB6eEhjC eu1hktSPl2tRO0qnypW8sk7nLauSF373ejLjGCvkInaDqIkg8mTY8BOO0SbsT19/BQE8 FU24TDNc2ZrpGUMsktjKuOK6lRIqhUtV4r4tniYIIPW/fYzB+c9YvQK3ouion6eS/abr dcu5rUaZ6s2dWGZ4ZbaVtabVYr1ASu4BeEA8hiVMqCVbcERpTZOxGCHrMksDLSSRL2eX VzrlPgWl6ukUwfM+NF0fwROCvjlq/g3LVy9wr/qzTzkRy26qkAIUi27HY72ND5MxX4Qi ir/w== 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:mime-version :content-transfer-encoding; bh=hyZKtms3/fooY346YEFh4aDUln7VR4f3ZkWUMV+VfiY=; b=L0/Rc6KCrW20bVah1iojGAVGwEeHAxg+qH9fzGFq/mlI16rcnJl3O47qrr7uTUbJZU ZfbMkYf7mG4IHU3WKDzHTgQzTRGRSFHg0YyBtQFp84UdhiN79Ugtw1dMvP181B6Ve3Pq fpBDGyysijxNiB+au3sAlnPHEmnmVzOF4Aq9AEMiX8i8bt35qBXRRP5m1qqnJXC3SIKP xd4c1DfYZu8qXSBMGiwjJHQHq6fkg/BqPX2z20PBxqXFRAs7kSVcjUoHKqUKKfeA1w89 bn+EOPLYACe2LA7x/PT3QZAl9hUH5p7e9UqvmmerSvzL6wvFMsmOGZMHk6ED65Eg0PPK asPA== X-Gm-Message-State: AOAM533QFcY+/NebRfUNggoZW3nwGwqNgaqj/ybpYGAnEjULhlvMlT3Y Bw7iVpeZN7YohPhRGgDpJ9WBug== X-Received: by 2002:a05:600c:1c25:b0:380:d306:1058 with SMTP id j37-20020a05600c1c2500b00380d3061058mr4125847wms.150.1646319598144; Thu, 03 Mar 2022 06:59:58 -0800 (PST) Received: from localhost.localdomain ([49.206.7.17]) by smtp.gmail.com with ESMTPSA id i15-20020a5d522f000000b001e85b14dadcsm2224166wra.5.2022.03.03.06.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 06:59:57 -0800 (PST) From: Sunil V L To: Ard Biesheuvel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heinrich Schuchardt Cc: Atish Patra , Anup Patel , Abner Chang , Jessica Clarke , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Sunil V L Subject: [RFC PATCH V2 0/1] RISCV_EFI_BOOT_PROTOCOL support in linux Date: Thu, 3 Mar 2022 20:29:43 +0530 Message-Id: <20220303145944.307321-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds support for getting the boot hart ID using new RISCV_EFI_BOOT_PROTOCOL in linux efi stub. While there is an existing solution of passing the boot hart ID through Device Tree, it doesn't work for ACPI. Hence an EFI protocol protocol is recommended which works for both DT and ACPI based platforms. The latest draft spec of this new protocol is available at https://github.com/riscv-non-isa/riscv-uefi/releases/download/1.0-rc2/RISCV_UEFI_PROTOCOL-spec.pdf This linux ptach can be found in: riscv_boot_protocol_rfc_v2 branch at https://github.com/vlsunil/linux.git This is tested in qemu with u-boot 2022.04.rc3. Changes since V1: - Rebased to get the "Fix get_boot_hartid_from_fdt() return value" patch - Removed mixed_mode member - Separated return value and status. Sunil V L (1): riscv/efi_stub: Add support for RISCV_EFI_BOOT_PROTOCOL drivers/firmware/efi/libstub/efistub.h | 7 ++++++ drivers/firmware/efi/libstub/riscv-stub.c | 29 +++++++++++++++++++---- include/linux/efi.h | 1 + 3 files changed, 32 insertions(+), 5 deletions(-) -- 2.25.1