summaryrefslogtreecommitdiff
path: root/Silicon/Intel/PurleySktPkg/Iio/Include/Protocol/IioSystem.h
blob: b4a2639219425467f57b2bc1e34e99723196cba3 (plain)
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
/** @file

Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
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 _IIO_SYSTEM_PROTOCOL_H_
#define _IIO_SYSTEM_PROTOCOL_H_

#include <IioPlatformData.h>
#include <IioSetupDefinitions.h>

//
// IIO System driver Protocol GUID
//
// {DDC3080A-2740-4ec2-9AA5-A0ADEFD6FF9C}
#define EFI_IIO_SYSTEM_GUID \
  { \
    0xDDC3080A, 0x2740, 0x4ec2, 0x9A, 0xA5, 0xA0, 0xAD, 0xEF, 0xD6, 0xFF, 0x9C \
  }

extern EFI_GUID         gEfiIioSystemProtocolGuid;

typedef struct _PORT_DESCRIPTOR{
  UINT8   Bus;
  UINT8   Device;
  UINT8   Function;
}PORT_DESCRIPTOR;

typedef struct _PORT_ATTRIB{
  UINT8   PortWidth;
  UINT8   PortSpeed;
}PORT_ATTRIB;

EFI_STATUS
IioGetCpuUplinkPort (
    UINT8             IioIndex,
    PORT_DESCRIPTOR   *PortDescriptor,    //Bus, Device, function
    BOOLEAN           *PortStatus,        //TRUE if enabled else disabled
    PORT_ATTRIB       *PortAttrib         //width and speed
);

typedef
EFI_STATUS
(EFIAPI *IIO_GET_CPU_UPLINK_PORT) (
  IN  UINT8             IioIndex,
  OUT PORT_DESCRIPTOR   *PortDescriptor,
  OUT BOOLEAN           *PortStatus,
  OUT PORT_ATTRIB       *PortAttrib
);

typedef struct _EFI_IIO_SYSTEM_PROTOCOL{
  IIO_GLOBALS               *IioGlobalData;
  IIO_GET_CPU_UPLINK_PORT   IioGetCpuUplinkPort;
} EFI_IIO_SYSTEM_PROTOCOL;

#endif //_IIO_SYSTEM_PROTOCOL_H_