From 5c164e151c4047efc32f2bd0d6cad730e635c23c Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Sat, 17 Mar 2018 07:40:51 +0800 Subject: PurleySktPkg: Initial version. Cc: Isaac W Oram Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Reviewed-by: Isaac W Oram --- .../ProcMemInit/Chip/Include/CpuPciAccessCommon.h | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Silicon/Intel/PurleySktPkg/Library/ProcMemInit/Chip/Include/CpuPciAccessCommon.h (limited to 'Silicon/Intel/PurleySktPkg/Library/ProcMemInit/Chip/Include/CpuPciAccessCommon.h') diff --git a/Silicon/Intel/PurleySktPkg/Library/ProcMemInit/Chip/Include/CpuPciAccessCommon.h b/Silicon/Intel/PurleySktPkg/Library/ProcMemInit/Chip/Include/CpuPciAccessCommon.h new file mode 100644 index 0000000000..2b8c367f5e --- /dev/null +++ b/Silicon/Intel/PurleySktPkg/Library/ProcMemInit/Chip/Include/CpuPciAccessCommon.h @@ -0,0 +1,89 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef _CPU_PCI_ACCESS_COMMON_H_ +#define _CPU_PCI_ACCESS_COMMON_H_ + +#include + +/** + + Indetifies the bus number for given SocId & BoxType + + @param host - Pointer to sysHost, the system host (root) structure + @param SocId - CPU Socket Node number (Socket ID) + @param BoxType - Box Type; values come from CpuPciAccess.h + @param BoxInst - IIO PCIE Box Instance + @param FuncBlk - Function Block within IIO + @param CpuCsrAccessVar - Pointer to CSR access data + + @retval (UINT32) PCI bus number + +**/ +UINT32 +GetBusNumber ( + PSYSHOST host, + UINT8 SocId, + UINT8 BoxType, + UINT8 BoxInst, + UINT8 FuncBlk, + CPU_CSR_ACCESS_VAR *CpuCsrAccessVar + ); + +/** + + Indetifies the device number for given SocId & BoxType + + @param host - Pointer to sysHost, the system host (root) structure + @param BoxType - Box Type; values come from CpuPciAccess.h + @param BoxInst - IIO PCIE Box Instance + @param FuncBlk - Function Block within IIO + @param CpuCsrAccessVar - Pointer to CSR access data + + @retval (UINT32) PCI device number + +**/ +UINT32 +GetDeviceNumber ( + PSYSHOST host, + UINT8 BoxType, + UINT8 BoxInst, + UINT8 FuncBlk, + CPU_CSR_ACCESS_VAR *CpuCsrAccessVar + ); + +/** + + Indetifies the function number for given SocId & BoxType + + @param host - Pointer to sysHost, the system host (root) structure + @param BoxType - Box Type; values come from CpuPciAccess.h + @param BoxInst - IIO PCIE Box Instance + @param FuncBlk - Function Block within IIO + @param CpuCsrAccessVar - Pointer to CSR access data + + @retval (UINT32) PCI function number + +**/ +UINT32 +GetFunctionNumber ( + PSYSHOST host, + UINT8 BoxType, + UINT8 BoxInst, + UINT8 FuncBlk, + CPU_CSR_ACCESS_VAR *CpuCsrAccessVar + ); + +#endif // _CPU_PCI_ACCESS_COMMON_H_ + + -- cgit v1.2.3