From nobody Sat Feb 7 11:05:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90389+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90389+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1654770440; cv=none; d=zohomail.com; s=zohoarc; b=CSyt4duD70QSS6wylLgNpm0Znwgx+3bwNM0jBEkMzkV1JmMg8gNab2vj6eqeCX1ksA4FZWqC1lswNI2DKBndwv72COGp+03rLAg262x5wEz7lBvgHv2ayYaMWbeYsK5XtHmqibhILgPj71d41GkZoDJ0YEDXA1L3LdanskU8nP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654770440; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=W/37nrYPhHZpswl2UafQOolqchSCOsP9Sdu8QL+V56s=; b=UA9KKajz9sIG7NUNw1O8TTkp3l2Sxt+xMDma1S6zj+kQNMBcDgYFa/gTQt0ecrwhfQdhXr9UoM5N9pExEAwcUC2pzpL9DzzcNWmr4UYFF82ia/TQ6qQ8S38/kyKIL7zsFK1umcT1JgNJCpR9+rb6c9bWoN/7+mChEWsUMdOAftg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90389+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 165477044023818.86739317646095; Thu, 9 Jun 2022 03:27:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DegwYY1788612x7k0qoH4BQz; Thu, 09 Jun 2022 03:27:19 -0700 X-Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx.groups.io with SMTP id smtpd.web08.9579.1654770439224106162 for ; Thu, 09 Jun 2022 03:27:19 -0700 X-Received: by mail-pl1-f173.google.com with SMTP id t2so19912304pld.4 for ; Thu, 09 Jun 2022 03:27:19 -0700 (PDT) X-Gm-Message-State: 0GiaMQVOBkA8r0P8Y2PI1X2Ax1787277AA= X-Google-Smtp-Source: ABdhPJxCI0tKvXWf/zccVTO4OK6K8shSQgd1EyCFoTKFQFqy1WsS6n43qp7sv0sjXrCNzma/MTELOQ== X-Received: by 2002:a17:902:ce88:b0:163:dbd5:9797 with SMTP id f8-20020a170902ce8800b00163dbd59797mr38835188plg.82.1654770438610; Thu, 09 Jun 2022 03:27:18 -0700 (PDT) X-Received: from kerodipc.Dlink ([49.206.9.238]) by smtp.gmail.com with ESMTPSA id e5-20020a170902784500b00163f8eb7eb3sm16994168pln.196.2022.06.09.03.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 03:27:18 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , G Edhaya Chandran , Barton Gao , Carolyn Gjertsen , Samer El-Haj-Mahmoud , Eric Jin , Arvin Chen , Supreeth Venkatesh , Ard Biesheuvel , Heinrich Schuchardt , Abner Chang Subject: [edk2-devel] [PATCH 1/5] uefi-sct/SctPkg: Add header file for RISCV_EFI_BOOT_PROTOCOL Date: Thu, 9 Jun 2022 15:57:05 +0530 Message-Id: <20220609102709.957985-2-sunilvl@ventanamicro.com> In-Reply-To: <20220609102709.957985-1-sunilvl@ventanamicro.com> References: <20220609102709.957985-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sunilvl@ventanamicro.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654770439; bh=plnR+NbQhdTkYwo3wWQX4J+JYwWzABZDKjl580vpZmc=; h=Cc:Date:From:Reply-To:Subject:To; b=OLsg04tp4biKM5qcfbXl88wAaO6ZZ6KEL0A6m7Eh3xqAq5pwvm5GUYm/5AO9J6ekZd0 ThC6wtq/De8l01L9/jdpH7+d/T1zhdVr/hZ/fOIt2ABqa9az+kOfVz4IiuRpDDKqTzD+S gB2/BYwzs6w5Dmw373teMSeLU73kmHMNmQw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654770442166100005 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3837 RISC-V platforms need to support new RISCV_EFI_BOOT_PROTOCOL to communicate the boot hart ID to the operating system. Add the required header file for this protocol. The specification of the protocol is maintained at: https://github.com/riscv-non-isa/riscv-uefi Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Cc: Samer El-Haj-Mahmoud Cc: Eric Jin Cc: Arvin Chen Cc: Supreeth Venkatesh Cc: Ard Biesheuvel Cc: Heinrich Schuchardt Cc: Abner Chang Signed-off-by: Sunil V L Reviewed-by: Heinrich Schuchardt Tested-by: Heinrich Schuchardt Reviewed-by: G Edhaya Chandran --- uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h diff --git a/uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h b/uefi-sct/SctPkg/UE= FI/Protocol/RiscVBoot.h new file mode 100644 index 00000000..71367425 --- /dev/null +++ b/uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h @@ -0,0 +1,72 @@ +/** @file + + Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ +/*++ + +Module Name: + + RiscVBoot.h + +Abstract: + + This UEFI protocol for RISC-V systems provides early information to the = bootloaders or Operating + Systems. Firmwares like EDK2/u-boot need to implement this protocol on R= ISC-V UEFI systems. +--*/ + +#ifndef _RISCV_BOOT_H_ +#define _RISCV_BOOT_H_ + + +// +// Global ID for the RISC-V Boot Protocol +// +#define RISCV_EFI_BOOT_PROTOCOL_GUID \ + { 0xccd15fec, 0x6f73, 0x4eec, { 0x83, 0x95, 0x3e, 0x69, 0xe4, 0xb9, 0x40,= 0xbf } } + +typedef struct _RISCV_EFI_BOOT_PROTOCOL RISCV_EFI_BOOT_PROTOCOL; + +typedef +EFI_STATUS +(EFIAPI *EFI_GET_BOOT_HARTID) ( + IN RISCV_EFI_BOOT_PROTOCOL *This, + OUT UINTN *BootHartId + ) +/*++ + + Routine Description: + This interface provides the hartid of the boot cpu. + + Arguments: + This - Protocol instance pointer. + BootHartId - Pointer to the variable receiving the hartid of the bo= ot cpu. + + Returns: + EFI_SUCCESS - The boot hart id could be returned. + EFI_INVALID_PARAMETER - This parameter is NULL or does not point to a = valid + RISCV_EFI_BOOT_PROTOCOL implementation. + EFI_INVALID_PARAMETER - BootHartId parameter is NULL. + +--*/ +; + +// +// Interface structure for the RISC-V Boot Protocol +// +struct _RISCV_EFI_BOOT_PROTOCOL { + UINTN Revision; + EFI_GET_BOOT_HARTID GetBootHartId; +}; + +extern EFI_GUID gBlackBoxEfiRiscVBootProtocolGuid; + +#endif --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90389): https://edk2.groups.io/g/devel/message/90389 Mute This Topic: https://groups.io/mt/91642395/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-