From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=016589022d=gilbert.chen@hpe.com) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by groups.io with SMTP; Wed, 18 Sep 2019 20:51:40 -0700 Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8J3pdLs030784 for ; Thu, 19 Sep 2019 03:51:39 GMT Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0a-002e3701.pphosted.com with ESMTP id 2v3vapnb6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Sep 2019 03:51:39 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 1066F4E for ; Thu, 19 Sep 2019 03:51:39 +0000 (UTC) Received: from ARBDN0VRAE.asiapacific.hpqcorp.net (arbdn0vrae.asiapacific.hpqcorp.net [10.43.41.0]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 41EB145 for ; Thu, 19 Sep 2019 03:51:38 +0000 (UTC) From: "Gilbert Chen" To: devel@edk2.groups.io Subject: [plaforms/devel-riscv-v2 PATCHv2 04/14] RiscV/Include: Initial version of header files in RISC-V platform package Date: Thu, 19 Sep 2019 11:51:21 +0800 Message-Id: <20190919035131.4700-5-gilbert.chen@hpe.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20190919035131.4700-1-gilbert.chen@hpe.com> References: <20190919035131.4700-1-gilbert.chen@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-19_01:2019-09-18,2019-09-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=13 adultscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1909190033 FirmwareContextProcessorSpecificLib.h - The difinitions of Firmware Context EDK2 implementaion based on RISC-V OpenSBI. Signed-off-by: Gilbert Chen --- .../Library/FirmwareContextProcessorSpecificLib.h | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Platform/RiscV/Include/Library/FirmwareContextProcessorSpecificLib.h diff --git a/Platform/RiscV/Include/Library/FirmwareContextProcessorSpecificLib.h b/Platform/RiscV/Include/Library/FirmwareContextProcessorSpecificLib.h new file mode 100644 index 00000000..772a0783 --- /dev/null +++ b/Platform/RiscV/Include/Library/FirmwareContextProcessorSpecificLib.h @@ -0,0 +1,40 @@ +/** @file + Firmware Context Processor-specific common library + + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef _FIRMWARE_CONTEXT_PROCESSOR_SPECIFIC_LIB_H_ +#define _FIRMWARE_CONTEXT_PROCESSOR_SPECIFIC_LIB_H_ + +#include + +/** + Build up common firmware context processor-specific information + + @param FirmwareContextHartSpecific Pointer to EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC + @param ParentProcessorGuid Pointer to GUID of Processor which contains this core + @param ParentProcessorUid Unique ID of pysical processor which owns this core. + @param CoreGuid Pointer to GUID of core + @param HartId Hart ID of this core. + @param IsBootHart This is boot hart or not + @param ProcessorSpecDataHob Pointer to RISC_V_PROCESSOR_SPECIFIC_DATA_HOB + + @return EFI_STATUS + +**/ +EFI_STATUS +EFIAPI +CommonFirmwareContextHartSpecificInfo ( + EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC *FirmwareContextHartSpecific, + EFI_GUID *ParentProcessorGuid, + UINTN ParentProcessorUid, + EFI_GUID *CoreGuid, + UINTN HartId, + BOOLEAN IsBootHart, + RISC_V_PROCESSOR_SPECIFIC_DATA_HOB *ProcessorSpecDataHob + ); + +#endif -- 2.12.0.windows.1