]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h
UefiCpuPkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions
[mirror_edk2.git] / UefiCpuPkg / Include / Protocol / RiscVBootProtocol.h
diff --git a/UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h b/UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h
new file mode 100644 (file)
index 0000000..ed223b8
--- /dev/null
@@ -0,0 +1,34 @@
+/** @file\r
+  RISC-V Boot Protocol mandatory for RISC-V UEFI platforms.\r
+\r
+  @par Revision Reference:\r
+  The protocol specification can be found at\r
+  https://github.com/riscv-non-isa/riscv-uefi\r
+\r
+  Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef RISCV_BOOT_PROTOCOL_H_\r
+#define RISCV_BOOT_PROTOCOL_H_\r
+\r
+typedef struct _RISCV_EFI_BOOT_PROTOCOL RISCV_EFI_BOOT_PROTOCOL;\r
+\r
+#define RISCV_EFI_BOOT_PROTOCOL_REVISION  0x00010000\r
+#define RISCV_EFI_BOOT_PROTOCOL_LATEST_VERSION \\r
+        RISCV_EFI_BOOT_PROTOCOL_REVISION\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_GET_BOOT_HARTID)(\r
+  IN RISCV_EFI_BOOT_PROTOCOL   *This,\r
+  OUT UINTN                    *BootHartId\r
+  );\r
+\r
+typedef struct _RISCV_EFI_BOOT_PROTOCOL {\r
+  UINT64                 Revision;\r
+  EFI_GET_BOOT_HARTID    GetBootHartId;\r
+} RISCV_EFI_BOOT_PROTOCOL;\r
+\r
+#endif\r