From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mx.groups.io with SMTP id smtpd.web09.5753.1665655124596681512 for ; Thu, 13 Oct 2022 02:58:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=c3T8TG++; spf=pass (domain: ventanamicro.com, ip: 209.85.215.182, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f182.google.com with SMTP id 128so1151429pga.1 for ; Thu, 13 Oct 2022 02:58:44 -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=I8/zMSSKJcW7PChNcFRfXE7pkn1Kmb3wupv1aCA9IWY=; b=c3T8TG++01p2YQrSt784dsMXW9KdLUKiYadaiQcbYa/8I23/jfsKnI78+FmIT9ODnw oUPg0G61T7ma0FT2rfWRj4Llq4TSrulDM6UsGPEGDRU7e4WOqxoO7Oar9AL4+RefovOf 49KV5iUn+feSL0WboyLXjXJ51EjD4mtuvzWNIzi6siQrGLSXnrKHtz43qfmUvEQnOJMr Ka37JoiSCnu3UO2Sbz3CEXewjZdBF1Hdh3TTAPcfn9yE5VdnbtrqF22ymv0oF9djzHT5 Q9lC7XCm9KlYRU3K8y4imzqf4Q5r9OEpGr73yIZdSwnXKRK8OocXsTvxHgVALSvvIM8d fbiw== 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=I8/zMSSKJcW7PChNcFRfXE7pkn1Kmb3wupv1aCA9IWY=; b=2z6WadjQKUjZkK3IQt3WcQDbQ/dq+UOCvee18jzNznusXLzxXH5XWENYP94hBdOW0X 6WTzXUKPPmY7F0zpJgoy1ltAOY6siESlHCR2sWNzR8sQWS1i1iy400E3rzjGSp6uLUbl tah7nOdJ2NU5EkCrrOBU5RmK4l4MnTjhmrbYVm2VeSICx9pdZDykq57i2UQrUSMN4Ppb rqntxRhM59nXbzjPpptjZ6W+NKBahWGsDO5Rh7TJpSsptR6iKSFZuhe35Jn/DCai4g1l 1QK8hU0H3Ar0GeX8GlMs4xf/JwPIV1oeNBWyU0gtAqfXMgnEX+6F0f3pAZFVINJ8qWYz CPEg== X-Gm-Message-State: ACrzQf1uQxguzxVqtPGmYvEW1DzMwxEKGvMDfKfBEBEpXUzfgYYaOspL 4+ief9ReXndp/C7Y/fx8M3aODRc5btB4Eg== X-Google-Smtp-Source: AMsMyM6TceT26C/CwTdEt6VVlZVRYdZ4B0q03Ah6Xz5Zvvhs4yjjMR0XBkZ1PD/BqUb80Al5cX7yMg== X-Received: by 2002:a63:5761:0:b0:43c:5940:9176 with SMTP id h33-20020a635761000000b0043c59409176mr28890173pgm.65.1665655123884; Thu, 13 Oct 2022 02:58:43 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id w8-20020a17090abc0800b0020d43c5c9a0sm2931845pjr.18.2022.10.13.02.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 02:58:43 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-staging/RiscV64QemuVirt PATCH V3 02/34] MdePkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Date: Thu, 13 Oct 2022 15:27:57 +0530 Message-Id: <20221013095829.1454581-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221013095829.1454581-1-sunilvl@ventanamicro.com> References: <20221013095829.1454581-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..cb94f61cd46c --- /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