From nobody Mon Feb 9 08:56:19 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+99985+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+99985+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1676032260; cv=none; d=zohomail.com; s=zohoarc; b=UCtiVypWmsZJ0dxoVDppWxzNmYfABniKqMlKOjTmrl0mauk63V8KXY1yamXhGB9F18JdGF3qpzd4an3ZJpsD3RcKvmJlkDRH3qRu6d+kMFVTkSi6LiHOkjPMRUw0zgayHR5DC3klQSx8Ig8jrnZIkp/3vIBrJzhzCDNyuL/Wtf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676032260; 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=0OxoTTYbpNAhkCnzn/Foj85UPqNqql3pLtYYwic0Mh4=; b=WiFR9YmuxH1N83KG/P7FILwstlPhn+Qj1q0jhgPf5+Fs40sC9wh3j+rZ7uIrPuMeuVPC1mBbo+LybOcKH+nGpsqtZpNR5yLIuHHPicfhiCdVOtUyBK7WgGG1B/2MTtZFSw/jgkwkqV5JLcW5bIQLXV0G8plKgIMp6ZjbzBV81XA= 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+99985+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1676032260827306.03969924460307; Fri, 10 Feb 2023 04:31:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7mynYY1788612xV45vuUJoVI; Fri, 10 Feb 2023 04:31:00 -0800 X-Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mx.groups.io with SMTP id smtpd.web10.13404.1676032259676605953 for ; Fri, 10 Feb 2023 04:30:59 -0800 X-Received: by mail-pj1-f48.google.com with SMTP id z14-20020a17090abd8e00b00233bb9d6bdcso189288pjr.4 for ; Fri, 10 Feb 2023 04:30:59 -0800 (PST) X-Gm-Message-State: wuleNX8wD9S1fZI5s3xJ78OQx1787277AA= X-Google-Smtp-Source: AK7set/V8VrVolNbFEsQ3Fg+zG4Vzjd3KZx10qyAEyQemD8os4sz5kL863ZImvo3GhnMLs9OTsDFsQ== X-Received: by 2002:a17:902:dac6:b0:196:59a0:bffe with SMTP id q6-20020a170902dac600b0019659a0bffemr17589488plx.17.1676032259014; Fri, 10 Feb 2023 04:30:59 -0800 (PST) X-Received: from localhost.localdomain ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id b17-20020a170902ed1100b0019a73faf773sm1172961pld.71.2023.02.10.04.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 04:30:58 -0800 (PST) From: "Sunil V L" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Daniel Schaefer , Gerd Hoffmann , Abner Chang , Heinrich Schuchardt , Andrei Warkentin Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V8 04/19] UefiCpuPkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Date: Fri, 10 Feb 2023 18:00:26 +0530 Message-Id: <20230210123041.1489506-5-sunilvl@ventanamicro.com> In-Reply-To: <20230210123041.1489506-1-sunilvl@ventanamicro.com> References: <20230210123041.1489506-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=1676032260; bh=ybXbNnTQy/hNaUm2nivh9zF6pmTAbTSsEAczSsNHeMs=; h=Cc:Date:From:Reply-To:Subject:To; b=ZUvst/zTgmasERDT7dTV2ogG++D7K6sTjc1O4tvJ4WwAw9/nWoMltBJERMKeG9nwrMH 3bzKbPn90zB1Afxt8dI77qHnheg6yheiY/yxGrnTk2T+J4pMgG8mOt9y2P1HmGPWnblFM cqXGySkSTJe6SaeV+lYPyWSUAYthTnQW7hI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1676032262940100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4076 RISC-V UEFI based platforms need to support RISCV_EFI_BOOT_PROTOCOL. Add this protocol GUID definition and the header file required. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Daniel Schaefer Cc: Gerd Hoffmann Signed-off-by: Sunil V L Acked-by: Abner Chang Reviewed-by: Heinrich Schuchardt Reviewed-by: Andrei Warkentin Acked-by: Ray Ni --- UefiCpuPkg/UefiCpuPkg.dec | 7 ++++ UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h | 34 ++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index cff239d5283e..903ad52da91b 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -86,6 +86,13 @@ [Protocols] ## Include/Protocol/SmMonitorInit.h gEfiSmMonitorInitProtocolGuid =3D { 0x228f344d, 0xb3de, 0x43bb, { 0xa4,= 0xd7, 0xea, 0x20, 0xb, 0x1b, 0x14, 0x82 }} =20 +[Protocols.RISCV64] + # + # Protocols defined for RISC-V systems + # + ## Include/Protocol/RiscVBootProtocol.h + gRiscVEfiBootProtocolGuid =3D { 0xccd15fec, 0x6f73, 0x4eec, { 0x83, 0x9= 5, 0x3e, 0x69, 0xe4, 0xb9, 0x40, 0xbf }} + # # [Error.gUefiCpuPkgTokenSpaceGuid] # 0x80000001 | Invalid value provided. diff --git a/UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h b/UefiCpuPkg/I= nclude/Protocol/RiscVBootProtocol.h new file mode 100644 index 000000000000..ed223b852d34 --- /dev/null +++ b/UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h @@ -0,0 +1,34 @@ +/** @file + RISC-V Boot Protocol mandatory for RISC-V UEFI platforms. + + @par Revision Reference: + The protocol specification can be found at + https://github.com/riscv-non-isa/riscv-uefi + + Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef RISCV_BOOT_PROTOCOL_H_ +#define RISCV_BOOT_PROTOCOL_H_ + +typedef struct _RISCV_EFI_BOOT_PROTOCOL RISCV_EFI_BOOT_PROTOCOL; + +#define RISCV_EFI_BOOT_PROTOCOL_REVISION 0x00010000 +#define RISCV_EFI_BOOT_PROTOCOL_LATEST_VERSION \ + RISCV_EFI_BOOT_PROTOCOL_REVISION + +typedef +EFI_STATUS +(EFIAPI *EFI_GET_BOOT_HARTID)( + IN RISCV_EFI_BOOT_PROTOCOL *This, + OUT UINTN *BootHartId + ); + +typedef struct _RISCV_EFI_BOOT_PROTOCOL { + UINT64 Revision; + EFI_GET_BOOT_HARTID GetBootHartId; +} RISCV_EFI_BOOT_PROTOCOL; + +#endif --=20 2.34.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 (#99985): https://edk2.groups.io/g/devel/message/99985 Mute This Topic: https://groups.io/mt/96874984/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-