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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 49823C433F5 for ; Fri, 28 Jan 2022 15:19:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A08C5837C9; Fri, 28 Jan 2022 16:18:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="ZtFH3ubm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6232682BA6; Fri, 28 Jan 2022 16:18:57 +0100 (CET) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (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 E16C8820F8 for ; Fri, 28 Jan 2022 16:18:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sunilvl@ventanamicro.com Received: by mail-pf1-x42a.google.com with SMTP id 192so6412875pfz.3 for ; Fri, 28 Jan 2022 07:18:53 -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=PlZF2+23hRSAP2p1i4KlS+LL/YEe0sazQnIvcnM9s8E=; b=ZtFH3ubmvCWRP8+j7yyzE15kQAI2vxK2OWWe0Ug5JN73Y9YNsckGYp9XMHQkcqxYiX gKkt+x5jcp13mTR4X6trSjmyT2HNtz28KNwzi674aES5uPLDNjqZqzF3Es8szTxDNvIJ q243RXPDx3I2xQoV6rUWfdFy1hFpbFLQHxQqOBuuROMoQT3Y+a/DE88nvNPxgXcHf7i0 7kKpkWYMc8EECgh3YVtKlEi3NHYlOhfEoCnIrWjiDm/iokoAfsi6/wgAFoVU5S2NqEPN KtdnGF6eS6WW5ySNfzD+vJuzCgEk36QeOUe7tjJsOaewOU90BjPz9snM6xcdsOQ9I5Uz 2Vvw== 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=PlZF2+23hRSAP2p1i4KlS+LL/YEe0sazQnIvcnM9s8E=; b=gbFJJLZLaCEHvpVFvRctlmvZVzihyUBwARvpacfUuZVm1AWV+QfHCCps4l/RFbWVVU 3zYTrtAaMY87wjFMiY9MNMa4tAwD4JIRmLme+oong8g08xgf/lro3TEmEkwgM8yYBDfv elMS9PO0qKtToRN39Py1caaGlgEAkVZ1W+2uzNLRkQjWM790UC6qlOIUGx4ppNMFX7VB t0AlEXdNkHf0g8QaFcRmZZ1WZHQLIe05k83Yaz05m7kjoU0eIIfsfzr034iSVIMoYC47 RHdJmarG6mQT3pTUhhdGBZiPg7RXG0EUNZZnlNWVzI7LpaeifvHuBi2bcZiQde9dkTkD HBQA== X-Gm-Message-State: AOAM530q8/dKq/pXd46ltFKaRqdEPRCVooT7/SIXMaVpTCnKzDRsEejy A8bexRuIQgVaEAVATeQdlgl1Jg== X-Google-Smtp-Source: ABdhPJyH9Z7mGGSohGRp79j7oAHye883GF1xQnkHaHd7jZbOXnw9LbTfBblFKB1FukINSPXI/4m8Ig== X-Received: by 2002:a05:6a00:1691:: with SMTP id k17mr8632717pfc.54.1643383132293; Fri, 28 Jan 2022 07:18:52 -0800 (PST) Received: from sunil-ThinkPad-T490.dc1.ventanamicro.com ([49.206.3.187]) by smtp.gmail.com with ESMTPSA id c7sm9192205pfo.131.2022.01.28.07.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 07:18:51 -0800 (PST) From: Sunil V L To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Ard Biesheuvel , Anup Patel , Atish Patra , Abner Chang , Jessica Clarke , Sunil V L Subject: [RFC PATCH V2 0/2] RISCV_EFI_BOOT_PROTOCOL support in U-boot Date: Fri, 28 Jan 2022 20:48:43 +0530 Message-Id: <20220128151845.114159-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean This patch series adds the support in u-boot for new RISCV_EFI_BOOT_PROTOCOL for RISC-V UEFI platforms. This protocol is required to communicate the boot hart ID to the bootloader/kernel which need to follow the EFI calling conventions. 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 u-boot patches can be found in: riscv_boot_protocol_rfc_v2 branch at https://github.com/vlsunil/u-boot.git These patches are tested in qemu. To fully test the feature, we need Linux changes which consume this protocol. The linux patch can be found in: riscv_boot_protocol_rfc_v2 branch at https://github.com/vlsunil/linux.git Changes since RFC V1: - Used EFI_ENTRY/EXIT and removed need for static variable - Addressed other comments from Heinrich - Added unit test patch Sunil V L (2): efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support efi_selftest: unit test for RISCV_EFI_BOOT_PROTOCOL include/efi_api.h | 4 + include/efi_loader.h | 2 + include/efi_riscv.h | 24 ++++++ lib/efi_loader/Kconfig | 8 ++ lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_riscv.c | 60 +++++++++++++ lib/efi_loader/efi_setup.c | 6 ++ lib/efi_selftest/Makefile | 1 + lib/efi_selftest/efi_selftest_riscv.c | 119 ++++++++++++++++++++++++++ 9 files changed, 225 insertions(+) create mode 100644 include/efi_riscv.h create mode 100644 lib/efi_loader/efi_riscv.c create mode 100644 lib/efi_selftest/efi_selftest_riscv.c -- 2.25.1