Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 1 | /* $NoKeywords:$ */ |
| 2 | /** |
| 3 | * @file |
| 4 | * |
| 5 | * AMD IDS HyperTransport Definitions |
| 6 | * |
| 7 | * Contains AMD AGESA Integrated Debug HT related items. |
| 8 | * |
| 9 | * @xrefitem bom "File Content Label" "Release Content" |
| 10 | * @e project: AGESA |
| 11 | * @e sub-project: IDS |
Edward O'Callaghan | e3f47ea | 2014-11-18 18:27:29 +1100 | [diff] [blame] | 12 | * @e \$Revision: 63425 $ @e \$Date: 2011-12-22 11:24:10 -0600 (Thu, 22 Dec 2011) $ |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 13 | */ |
Edward O'Callaghan | e3f47ea | 2014-11-18 18:27:29 +1100 | [diff] [blame] | 14 | /***************************************************************************** |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 15 | * |
Edward O'Callaghan | e3f47ea | 2014-11-18 18:27:29 +1100 | [diff] [blame] | 16 | * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 17 | * All rights reserved. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 18 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 19 | * Redistribution and use in source and binary forms, with or without |
| 20 | * modification, are permitted provided that the following conditions are met: |
| 21 | * * Redistributions of source code must retain the above copyright |
| 22 | * notice, this list of conditions and the following disclaimer. |
| 23 | * * Redistributions in binary form must reproduce the above copyright |
| 24 | * notice, this list of conditions and the following disclaimer in the |
| 25 | * documentation and/or other materials provided with the distribution. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 26 | * * Neither the name of Advanced Micro Devices, Inc. nor the names of |
| 27 | * its contributors may be used to endorse or promote products derived |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 28 | * from this software without specific prior written permission. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 29 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 31 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 32 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 33 | * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY |
| 34 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 35 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 36 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 37 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 38 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 39 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 40 | * |
Edward O'Callaghan | e3f47ea | 2014-11-18 18:27:29 +1100 | [diff] [blame] | 41 | ***************************************************************************/ |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 42 | |
| 43 | #ifndef _IDS_HT_H_ |
| 44 | #define _IDS_HT_H_ |
| 45 | |
| 46 | // Frequency equates for call backs which take an actual frequency setting |
| 47 | #define HT_FREQUENCY_200M 0 |
| 48 | #define HT_FREQUENCY_400M 2 |
| 49 | #define HT_FREQUENCY_600M 4 |
| 50 | #define HT_FREQUENCY_800M 5 |
| 51 | #define HT_FREQUENCY_1000M 6 |
| 52 | #define HT_FREQUENCY_1200M 7 |
| 53 | #define HT_FREQUENCY_1400M 8 |
| 54 | #define HT_FREQUENCY_1600M 9 |
| 55 | #define HT_FREQUENCY_1800M 10 |
| 56 | #define HT_FREQUENCY_2000M 11 |
| 57 | #define HT_FREQUENCY_2200M 12 |
| 58 | #define HT_FREQUENCY_2400M 13 |
| 59 | #define HT_FREQUENCY_2600M 14 |
| 60 | #define HT_FREQUENCY_2800M 17 |
| 61 | #define HT_FREQUENCY_3000M 18 |
| 62 | #define HT_FREQUENCY_3200M 19 |
| 63 | #define HT_FREQUENCY_3600M 20 |
| 64 | |
| 65 | /** |
| 66 | * HT IDS: HT Link Port Override params. |
| 67 | * |
| 68 | * Provide an absolute override of HT Link Port settings. No checking is done that |
| 69 | * the settings obey limits or capabilities, this responsibility rests with the user. |
| 70 | * |
| 71 | * Rules for values of structure items: |
| 72 | * - Socket |
| 73 | * - HT_LIST_TERMINAL == end of port override list, rest of item is not accessed |
| 74 | * - HT_LIST_MATCH_ANY == Match Any Socket |
| 75 | * - 0 .. 7 == The matching socket |
| 76 | * - Link |
| 77 | * - HT_LIST_MATCH_ANY == Match Any package link (that is not the internal links) |
| 78 | * - HT_LIST_MATCH_INTERNAL_LINK == Match the internal links |
| 79 | * - 0 .. 7 == The matching package link. 0 .. 3 are the ganged links or sublink 0's, 4 .. 7 are the sublink1's. |
| 80 | * - Frequency |
| 81 | * - HT_LIST_TERMINAL == Do not override the frequency, AUTO setting |
| 82 | * - HT_FREQUENCY_200M .. HT_FREQUENCY_3600M = The frequency value to use |
| 83 | * - Widthin |
| 84 | * - HT_LIST_TERMINAL == Do not override the width, AUTO setting |
| 85 | * - 2, 4, 8, 16, 32 == The width value to use |
| 86 | * - Widthout |
| 87 | * - HT_LIST_TERMINAL == Do not override the width, AUTO setting |
| 88 | * - 2, 4, 8, 16, 32 == The width value to use |
| 89 | */ |
| 90 | typedef struct { |
| 91 | // Match Fields |
| 92 | UINT8 Socket; ///< The Socket which this port is on. |
| 93 | UINT8 Link; ///< The port for this package link on that socket. |
| 94 | // Override fields |
| 95 | UINT8 Frequency; ///< Absolutely override the port's frequency. |
| 96 | UINT8 WidthIn; ///< Absolutely override the port's width. |
| 97 | UINT8 WidthOut; ///< Absolutely override the port's width. |
| 98 | } HTIDS_PORT_OVERRIDE; |
| 99 | |
| 100 | /** |
| 101 | * A list of port overrides to search. |
| 102 | */ |
| 103 | typedef HTIDS_PORT_OVERRIDE *HTIDS_PORT_OVERRIDE_LIST; |
| 104 | VOID |
| 105 | HtIdsGetPortOverride ( |
| 106 | IN BOOLEAN IsSourcePort, |
| 107 | IN OUT PORT_DESCRIPTOR *Port0, |
| 108 | IN OUT PORT_DESCRIPTOR *Port1, |
| 109 | IN OUT HTIDS_PORT_OVERRIDE_LIST *PortOverrideList, |
| 110 | IN STATE_DATA *State |
| 111 | ); |
| 112 | |
| 113 | typedef |
| 114 | VOID |
| 115 | F_HtIdsGetPortOverride ( |
| 116 | IN BOOLEAN IsSourcePort, |
| 117 | IN OUT PORT_DESCRIPTOR *Port0, |
| 118 | IN OUT PORT_DESCRIPTOR *Port1, |
| 119 | IN OUT HTIDS_PORT_OVERRIDE_LIST *PortOverrideList, |
| 120 | IN STATE_DATA *State |
| 121 | ); |
| 122 | typedef F_HtIdsGetPortOverride* PF_HtIdsGetPortOverride; |
| 123 | #endif // _IDS_HT_H |