hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/** @file
 
Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
 
**/
 
#ifndef  _CPU_PCI_ACCESS_COMMON_H_
#define  _CPU_PCI_ACCESS_COMMON_H_
 
#include <SysHost.h>
 
/**
 
  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_