From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx.groups.io with SMTP id smtpd.web09.9630.1665766126796875170 for ; Fri, 14 Oct 2022 09:48:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=GNC423m8; spf=pass (domain: ventanamicro.com, ip: 209.85.214.173, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f173.google.com with SMTP id 10so5315124pli.0 for ; Fri, 14 Oct 2022 09:48:46 -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=/GaSlrzJ6r4hZmTiYREwnTHDeila6JSG2Q39u7SI6R4=; b=GNC423m8Nl852K4xUJIQZK5QjkBAKqmzFE2RLr6GV6i51Pxgn5nCLQ2SwaysMlaA9g vZIiOhRY8CKYySlg09y5pEGh0BEToJlO1Gn3PnFt8bRcuL6DRhe9pJZbSVuWY2Reqj0O sC+YWrn7NWr3H2rjGnLXfUQUoL1AWAhXKdYLLEUKeGdmgoHHDMMtUnNF8OcTz7kYku4e N3KDcfOadi5k90FQ+YHNBT4M3tjC6ElDLdW3z3fKOueVKup5zEev9yZOm6orSeZ1naFc ZnRzM0x2OGNCAVx/J3tt5NuGVkG22wTAn4gV0HP2+NarZkuIqXWfBiibT1IokU4Mqy0j ++ag== 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=/GaSlrzJ6r4hZmTiYREwnTHDeila6JSG2Q39u7SI6R4=; b=E/FZFRmi1nSwRMZklNKtoFtdSpxihoWooB9yJ2cLGh6v37Ti+HeWGnrLSa0bLTjrcI rykEeL2eJfB8O38tJ0QAC6Sv859Rnom7IJzMbJc6vbiv0nZAP854oShfOacztj4f4L8B mvGKixaUJyy76BaevKK2GCTAVo3aGMS+aMsxnqQjLQ1pwFZldtWCcFg/hHYtKKtxeRvN 6W0BiRiky8ZQo8yiAjubhaZqaSrIWL8WOEoJz/2pqlYhMqz9Qt7P1oKFwh70IVRc9/+p znPoX7Ue6Gl6CpX92Olf9+zDCb+bj9KQeFje7d+5PC64pDK2ct5oMXsaNQspwjyzLO0l tLYA== X-Gm-Message-State: ACrzQf24tMD6mUHduTnigy7db0eMZ6FfhFKuozQcYNKODmOsQSOL4ulF QD/pLHh1qDwgOil+KVV3Hpu54FJgMsULDA== X-Google-Smtp-Source: AMsMyM56LS8AeVuoSuzHW5OxG5KvT2LPMcGJlaewrQ3Jq0blI5RuBf0NTI2lt5Khxi57e5/mOthaQQ== X-Received: by 2002:a17:902:dad2:b0:17f:7439:20f2 with SMTP id q18-20020a170902dad200b0017f743920f2mr6055091plx.29.1665766125998; Fri, 14 Oct 2022 09:48:45 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id f3-20020a62db03000000b0056265011136sm1963368pfg.112.2022.10.14.09.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 09:48:45 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-staging/RiscV64QemuVirt PATCH V4 02/34] MdePkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Date: Fri, 14 Oct 2022 22:18:04 +0530 Message-Id: <20221014164836.1513036-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221014164836.1513036-1-sunilvl@ventanamicro.com> References: <20221014164836.1513036-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 | 5 +++ MdePkg/Include/Protocol/RiscVBootProtocol.h | 34 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 4c81cbd75ab2..dda1d5e15b9f 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1918,6 +1918,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