From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web10.132058.1671109001549411686 for ; Thu, 15 Dec 2022 04:56:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=atGqdKXf; spf=pass (domain: ventanamicro.com, ip: 209.85.216.41, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f41.google.com with SMTP id fa4-20020a17090af0c400b002198d1328a0so6341747pjb.0 for ; Thu, 15 Dec 2022 04:56:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ajeuke/1lmjg4CDzxDGlS9G4duXD3ztmZNIedlxQNEU=; b=atGqdKXfpnFiNmDME4SUrdCVkEXcXs0rf8xQvewS8X5KGhYyTzo2XBoBtQafJjSIPO ixaX+nz6O8HJbcc5iqm7r3brEIOCLFg4GU91gums9hdqbRYJhwuhYkxadM9QJo+2VtXJ bmEhDQ4rNFd2wARKpAjwWLyVdTlemRl8Y3Cw+ZI+fMvkURK5srg6cMKhL6z2UAdTHLVj ykGj5apys6REwyNv+fKAEJ6GxUlcIb0fhroxaGZ6GkAYkkcI33Q+PwF+j5x7ywdtPoEj VkaFDxBNr/Rw3CxUCXJFi1c7dxEUiZ16IuryqbuFL2J7b2CdB94CeQCotgfl8PzM9c8+ Mk7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ajeuke/1lmjg4CDzxDGlS9G4duXD3ztmZNIedlxQNEU=; b=vqLP6tUeWPLXxunVgNQwttjNnlECW4bNUYigc4i2f9GZizaRzqPpra7RPyBSMbHrPv dugFhlo20NHUHvBRABfxMY5MzK6Jo8XeMKXMJ+O6/JrSjCJS4ec9T30ofDLicgeHmVNZ Cc68O/Cjh/W5EbD0L790nz/Mg/zPAUDvExotdv6jLhsxThqozXtj4YYcLI4ytFzAXGvz UOv/JruYuMlDXDfIiHXYbKNyItBfc4h5JTQ4rBkrxv5L7HklH07UaLv5cdta5rcazzbE XcXa2FdX/vvlkdiECvy+yMqv3eGB9i8Tn6Rtz+KBm4VSq6nSZ/ICvZeJVVgKev/BbT3a mtyg== X-Gm-Message-State: ANoB5plqNeNjh65h2i7IotoUmKpa7dBPR2VxD5Ik0U6Nwpij05vFWQ0v 313VH37bq+cAZMdkm/V5BqFsaPcBNbV0aOiP0gc= X-Google-Smtp-Source: AA0mqf674t4/pMqPIXUsaXbfVOCWyLwRdh/hJl+V7xe131W3dHmsWnrT9eXFbCmOgYP8DiomVAGxIg== X-Received: by 2002:a05:6a20:9c89:b0:9d:efbf:7876 with SMTP id mj9-20020a056a209c8900b0009defbf7876mr34122770pzb.43.1671109000750; Thu, 15 Dec 2022 04:56:40 -0800 (PST) Return-Path: Received: from localhost.localdomain ([49.206.11.246]) by smtp.gmail.com with ESMTPSA id j2-20020a625502000000b005762905c89asm1674384pfb.66.2022.12.15.04.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 04:56:40 -0800 (PST) From: "Sunil V L" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Abner Chang , Heinrich Schuchardt Subject: [edk2-staging/RiscV64QemuVirt PATCH V6 02/23] MdePkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Date: Thu, 15 Dec 2022 18:26:05 +0530 Message-Id: <20221215125626.545372-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221215125626.545372-1-sunilvl@ventanamicro.com> References: <20221215125626.545372-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4076 RISC-V UEFI based platforms need to support RISCV_EFI_BOOT_PROTOCOL. Add this protocol GUID definition and the header file required. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Abner Chang Signed-off-by: Sunil V L Acked-by: Abner Chang Reviewed-by: Heinrich Schuchardt --- MdePkg/MdePkg.dec | 5 +++ MdePkg/Include/Protocol/RiscVBootProtocol.h | 34 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index e49b2d5b5f28..4f30de588a46 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1926,6 +1926,11 @@ [Protocols] # ## Include/Protocol/ShellDynamicCommand.h gEfiShellDynamicCommandProtocolGuid = { 0x3c7200e9, 0x005f, 0x4ea4, {0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 }} + # + # Protocols defined for RISC-V systems + # + ## Include/Protocol/RiscVBootProtocol.h + gRiscVEfiBootProtocolGuid = { 0xccd15fec, 0x6f73, 0x4eec, { 0x83, 0x95, 0x3e, 0x69, 0xe4, 0xb9, 0x40, 0xbf }} # # [Error.gEfiMdePkgTokenSpaceGuid] diff --git a/MdePkg/Include/Protocol/RiscVBootProtocol.h b/MdePkg/Include/Protocol/RiscVBootProtocol.h new file mode 100644 index 000000000000..ed223b852d34 --- /dev/null +++ b/MdePkg/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 -- 2.38.0