summaryrefslogtreecommitdiff
path: root/ReferenceCode/Chipset/LynxPoint/PchSmiDispatcher/Smm/PchSmmGpi.c
blob: e9b16f981cc224aa2f8c4a8112b4358512d51221 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/** @file
  File to contain all the hardware specific stuff for the Smm Gpi dispatch protocol.

@copyright
  Copyright (c) 1999 - 2012 Intel Corporation. All rights reserved
  This software and associated documentation (if any) is furnished
  under a license and may only be used or copied in accordance
  with the terms of the license. Except as permitted by such
  license, no part of this software or documentation may be
  reproduced, stored in a retrieval system, or transmitted in any
  form or by any means without the express written consent of
  Intel Corporation.

  This file contains an 'Intel Peripheral Driver' and uniquely
  identified as "Intel Reference Module" and is
  licensed for Intel CPUs and chipsets under the terms of your
  license agreement with Intel or your vendor.  This file may
  be modified by the user, subject to additional terms of the
  license agreement
**/
#include "PchSmmHelpers.h"

#define LPTH_GPI_INIT_ELEMENT(num) { \
    PCH_SMM_NO_FLAGS, \
    { \
      { \
        { \
          ACPI_ADDR_TYPE, R_PCH_LPTH_ALT_GP_SMI_EN \
        }, \
        S_PCH_LPTH_ALT_GP_SMI_EN, num, \
      }, \
      NULL_BIT_DESC_INITIALIZER \
    }, \
    { \
      { \
        { \
          ACPI_ADDR_TYPE, R_PCH_LPTH_ALT_GP_SMI_STS \
        }, \
        S_PCH_LPTH_ALT_GP_SMI_STS, (num), \
      }, \
    } \
  }

#define LPTLP_GPI_INIT_ELEMENT(num) { \
    PCH_SMM_NO_FLAGS, \
    { \
      { \
        { \
          GPIO_ADDR_TYPE, R_PCH_LPTLP_ALT_GP_SMI_EN \
        }, \
        S_PCH_LPTLP_ALT_GP_SMI_EN, num, \
      }, \
      NULL_BIT_DESC_INITIALIZER \
    }, \
    { \
      { \
        { \
          GPIO_ADDR_TYPE, R_PCH_LPTLP_ALT_GP_SMI_STS \
        }, \
        S_PCH_LPTLP_ALT_GP_SMI_STS, (num), \
      }, \
    } \
  }

const PCH_SMM_SOURCE_DESC LPTH_GPI_SOURCE_DESC[NUM_SUPPORTED_GPIS] = {
  LPTH_GPI_INIT_ELEMENT(0),
  LPTH_GPI_INIT_ELEMENT(1),
  LPTH_GPI_INIT_ELEMENT(2),
  LPTH_GPI_INIT_ELEMENT(3),
  LPTH_GPI_INIT_ELEMENT(4),
  LPTH_GPI_INIT_ELEMENT(5),
  LPTH_GPI_INIT_ELEMENT(6),
  LPTH_GPI_INIT_ELEMENT(7),
  LPTH_GPI_INIT_ELEMENT(8),
  LPTH_GPI_INIT_ELEMENT(9),
  LPTH_GPI_INIT_ELEMENT(10),
  LPTH_GPI_INIT_ELEMENT(11),
  LPTH_GPI_INIT_ELEMENT(12),
  LPTH_GPI_INIT_ELEMENT(13),
  LPTH_GPI_INIT_ELEMENT(14),
  LPTH_GPI_INIT_ELEMENT(15),
};

const PCH_SMM_SOURCE_DESC LPTLP_GPI_SOURCE_DESC[NUM_SUPPORTED_GPIS] = {
  LPTLP_GPI_INIT_ELEMENT(0),
  LPTLP_GPI_INIT_ELEMENT(1),
  LPTLP_GPI_INIT_ELEMENT(2),
  LPTLP_GPI_INIT_ELEMENT(3),
  LPTLP_GPI_INIT_ELEMENT(4),
  LPTLP_GPI_INIT_ELEMENT(5),
  LPTLP_GPI_INIT_ELEMENT(6),
  LPTLP_GPI_INIT_ELEMENT(7),
  LPTLP_GPI_INIT_ELEMENT(8),
  LPTLP_GPI_INIT_ELEMENT(9),
  LPTLP_GPI_INIT_ELEMENT(10),
  LPTLP_GPI_INIT_ELEMENT(11),
  LPTLP_GPI_INIT_ELEMENT(12),
  LPTLP_GPI_INIT_ELEMENT(13),
  LPTLP_GPI_INIT_ELEMENT(14),
  LPTLP_GPI_INIT_ELEMENT(15),
};