AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / HT / htInterfaceNonCoherent.h
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * Internal access to HT Interface, for non-coherent features.
6  *
7  * This file provides definitions used by HT internal modules.  The
8  * external HT interface (in agesa.h) is accessed using these methods.
9  * This keeps the HT Feature implementations abstracted from the HT
10  * interface.
11  *
12  * @xrefitem bom "File Content Label" "Release Content"
13  * @e project:      AGESA
14  * @e sub-project:  HyperTransport
15  * @e \$Revision: 44324 $        @e  \$Date: 2010-12-22 02:16:51 -0700 (Wed, 22 Dec 2010) $
16  *
17  */
18 /*
19 *****************************************************************************
20 *
21 * Copyright (C) 2012 Advanced Micro Devices, Inc.
22 * All rights reserved.
23 *
24 * Redistribution and use in source and binary forms, with or without
25 * modification, are permitted provided that the following conditions are met:
26 *     * Redistributions of source code must retain the above copyright
27 *       notice, this list of conditions and the following disclaimer.
28 *     * Redistributions in binary form must reproduce the above copyright
29 *       notice, this list of conditions and the following disclaimer in the
30 *       documentation and/or other materials provided with the distribution.
31 *     * Neither the name of Advanced Micro Devices, Inc. nor the names of
32 *       its contributors may be used to endorse or promote products derived
33 *       from this software without specific prior written permission.
34 *
35 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
36 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
37 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
39 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
41 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
42 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
44 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 *
46 * ***************************************************************************
47 *
48 */
49
50 #ifndef _HT_INTERFACE_NONCOHERENT_H_
51 #define _HT_INTERFACE_NONCOHERENT_H_
52
53 /*----------------------------------------------------------------------------
54  *   Mixed (DEFINITIONS AND MACROS / TYPEDEFS, STRUCTURES, ENUMS)
55  *
56  *----------------------------------------------------------------------------
57  */
58
59 /*-----------------------------------------------------------------------------
60  *                         DEFINITIONS AND MACROS
61  *
62  *-----------------------------------------------------------------------------
63  */
64
65 /*----------------------------------------------------------------------------
66  *                         TYPEDEFS, STRUCTURES, ENUMS
67  *
68  *----------------------------------------------------------------------------
69  */
70
71 /*----------------------------------------------------------------------------
72  *                         Prototypes to Interface from Feature Code
73  *
74  *----------------------------------------------------------------------------
75  */
76
77 /**
78  * Manually control bus number assignment.
79  *
80  */
81 BOOLEAN
82 GetOverrideBusNumbers (
83   IN       UINT8        Node,
84   IN       UINT8        Link,
85      OUT   UINT8        *SecBus,
86      OUT   UINT8        *SubBus,
87   IN       STATE_DATA   *State
88   );
89
90 /**
91  * Get Manual BUID assignment list.
92  *
93  */
94 BOOLEAN
95 GetManualBuidSwapList (
96   IN       UINT8            Node,
97   IN       UINT8            Link,
98      OUT   BUID_SWAP_LIST   **List,
99   IN       STATE_DATA       *State
100   );
101
102 /**
103  * Override capabilities of a device.
104  *
105  */
106
107 VOID
108 GetDeviceCapOverride (
109   IN       UINT8       HostNode,
110   IN       UINT8       HostLink,
111   IN       UINT8       Depth,
112   IN       PCI_ADDR    PciAddress,
113   IN       UINT32      DevVenId,
114   IN       UINT8       Revision,
115   IN       UINT8       Link,
116   IN OUT   UINT8       *LinkWidthIn,
117   IN OUT   UINT8       *LinkWidthOut,
118   IN OUT   UINT32      *FreqCap,
119   IN OUT   UINT32      *Clumping,
120   IN       STATE_DATA  *State
121   );
122
123 /**
124  * Get limits for non-coherent Links.
125  *
126  */
127 VOID
128 GetIoPcbLimits (
129   IN       UINT8        HostNode,
130   IN       UINT8        HostLink,
131   IN       UINT8        Depth,
132   IN OUT   UINT8        *DownstreamLinkWidthLimit,
133   IN OUT   UINT8        *UpstreamLinkWidthLimit,
134   IN OUT   UINT32       *PcbFreqCap,
135   IN       STATE_DATA   *State
136   );
137
138 #endif  /* _HT_INTERFACE_NONCOHERENT_H_ */