From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web11.4503.1665396737206593843 for ; Mon, 10 Oct 2022 03:12:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Bd1lmjtb; spf=pass (domain: ventanamicro.com, ip: 209.85.214.176, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f176.google.com with SMTP id x6so9937707pll.11 for ; Mon, 10 Oct 2022 03:12:17 -0700 (PDT) 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=YN6i7zDMA/vbvvtUNcDBxNmngdERthd8qh5yg4L9uIQ=; b=Bd1lmjtbMsibBAXWKj95raJNvsuii+WxcVfq21qHAPXG/UxxRz16T8esDzvaHMUVmQ gcsnDvMWmO9hldoxyM5LKOeNPvQneirlDyvDtVwnA69QRt5Io00ovgTX9B0FDM48KFw9 23UE208CyFlbas47aKAPK3AgPYbYf0k4uvhheA5OWlcjMhrBWYAXjOje4AfvuRnjba0t bl61xzswgLDnCLb192GTlX5Du1vZp/UtN8drNEfxDw8NaGER0Dqnj5gj8fhqulkTWEuX DoDhyUOwf9SU+3M0KPvSpqOLT0xF6C1aLXX26grx8YtjM96wMwrBJNi8Q4jOe7bviEq4 DAvg== 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=YN6i7zDMA/vbvvtUNcDBxNmngdERthd8qh5yg4L9uIQ=; b=E2Ba6E+NxqSwnqRweT8npa4cuEIyUFbtYIQsnPU9xFIEmL7jLCpflM73VFlNmqvdSG dc5ptYu+G3MUt1TBTXgHIpYu5poZ3p1xnGsca9byChP4QJ8C5QxYGP0ddg6dN9Yy3eDu W0zoEL15t8F5rT6xuc7B22mg0gSpTD48WLL26noCQkxL513RJ51fHgpgkkMT1e43nrWC cEW1zhkBc/bZbRk30bRsnnNS88cJpWerxT1a8AiBqPOL3j7cRqFeuAlWOkigN8iWU1FI 1VASdryYoKNVs5FkA3AXuWfJWXxHeaWSaYlGtlojIEdXrBsYLOiO+THSrZhAhi/JJCQZ pGpA== X-Gm-Message-State: ACrzQf3lMTRtuPDBzZEUh5mnZyJcVHzqAI9skBfh0pxjUVbB/MgKntHM aeypP6nPpYECeve6Z1BMFYc4TxEh+iFMXw== X-Google-Smtp-Source: AMsMyM5z9EuUbkNcGl6lADJFAuLNGtfh57musOd58Y0Sk9rSVczh0/DIUk0bSBxzNtUUEyzt5KlKqg== X-Received: by 2002:a17:902:d50e:b0:178:2fe:9f60 with SMTP id b14-20020a170902d50e00b0017802fe9f60mr18478661plg.154.1665396736554; Mon, 10 Oct 2022 03:12:16 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id h17-20020a170902f55100b001788ccecbf5sm6302138plf.31.2022.10.10.03.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 03:12:16 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-staging/RiscV64QemuVirt PATCH 02/29] MdePkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Date: Mon, 10 Oct 2022 15:41:35 +0530 Message-Id: <20221010101202.1146624-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010101202.1146624-1-sunilvl@ventanamicro.com> References: <20221010101202.1146624-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 Signed-off-by: Sunil V L --- MdePkg/MdePkg.dec | 6 ++++ MdePkg/Include/Protocol/RiscVBootProtocol.h | 32 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 MdePkg/Include/Protocol/RiscVBootProtocol.h diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index f1ebf9e251c1..8f1bcfdc3e97 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1915,6 +1915,12 @@ [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] # 0x80000001 | Invalid value provided. diff --git a/MdePkg/Include/Protocol/RiscVBootProtocol.h b/MdePkg/Include/Protocol/RiscVBootProtocol.h new file mode 100644 index 000000000000..d0d40618b483 --- /dev/null +++ b/MdePkg/Include/Protocol/RiscVBootProtocol.h @@ -0,0 +1,32 @@ +/** @file + RISC-V Boot Protocol mandatory for RISC-V UEFI platforms. + + Specification available 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.25.1