Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 1 | /* $NoKeywords:$ */ |
| 2 | /** |
| 3 | * @file |
| 4 | * |
| 5 | * Common Return routines. |
| 6 | * |
| 7 | * @xrefitem bom "File Content Label" "Release Content" |
| 8 | * @e project: AGESA |
| 9 | * @e sub-project: Common |
| 10 | * @e \$Revision: 35136 $ @e \$Date: 2010-07-16 11:29:48 +0800 (Fri, 16 Jul 2010) $ |
| 11 | * |
| 12 | */ |
| 13 | /* |
| 14 | ***************************************************************************** |
| 15 | * |
| 16 | * Copyright (c) 2011, Advanced Micro Devices, Inc. |
| 17 | * All rights reserved. |
Edward O'Callaghan | 1542a6f | 2014-07-06 19:24:06 +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 | 1542a6f | 2014-07-06 19:24:06 +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 | 1542a6f | 2014-07-06 19:24:06 +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 | 1542a6f | 2014-07-06 19:24:06 +1000 | [diff] [blame] | 40 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 41 | * *************************************************************************** |
| 42 | * |
| 43 | */ |
| 44 | |
| 45 | /* |
| 46 | *---------------------------------------------------------------------------- |
| 47 | * MODULES USED |
| 48 | * |
| 49 | *---------------------------------------------------------------------------- |
| 50 | */ |
| 51 | |
| 52 | |
| 53 | #include "AGESA.h" |
| 54 | #include "Ids.h" |
efdesign98 | 84cbce2 | 2011-08-04 12:09:17 -0600 | [diff] [blame] | 55 | #include "CommonReturns.h" |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 56 | #include "Filecode.h" |
| 57 | CODE_GROUP (G1_PEICC) |
| 58 | RDATA_GROUP (G1_PEICC) |
| 59 | |
| 60 | #define FILECODE PROC_COMMON_COMMONRETURNS_FILECODE |
| 61 | /*---------------------------------------------------------------------------- |
| 62 | * DEFINITIONS AND MACROS |
| 63 | * |
| 64 | *---------------------------------------------------------------------------- |
| 65 | */ |
| 66 | |
| 67 | /*----------------------------------------------------------------------------------------*/ |
| 68 | /** |
| 69 | * Return TRUE. |
| 70 | * |
| 71 | * @retval TRUE Default case, no special action |
| 72 | */ |
| 73 | BOOLEAN |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 74 | CommonReturnTrue (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 75 | { |
| 76 | return TRUE; |
| 77 | } |
| 78 | |
| 79 | |
| 80 | /*----------------------------------------------------------------------------------------*/ |
| 81 | /** |
| 82 | * Return False. |
| 83 | * |
| 84 | * @retval FALSE Default case, no special action |
| 85 | */ |
| 86 | BOOLEAN |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 87 | CommonReturnFalse (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 88 | { |
| 89 | return FALSE; |
| 90 | } |
| 91 | |
| 92 | /*----------------------------------------------------------------------------------------*/ |
| 93 | /** |
| 94 | * Return (UINT8)zero. |
| 95 | * |
| 96 | * |
| 97 | * @retval zero None, or only case zero. |
| 98 | */ |
| 99 | UINT8 |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 100 | CommonReturnZero8 (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 101 | { |
| 102 | return 0; |
| 103 | } |
| 104 | |
| 105 | /*----------------------------------------------------------------------------------------*/ |
| 106 | /** |
| 107 | * Return (UINT32)zero. |
| 108 | * |
| 109 | * |
| 110 | * @retval zero None, or only case zero. |
| 111 | */ |
| 112 | UINT32 |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 113 | CommonReturnZero32 (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 114 | { |
| 115 | return 0; |
| 116 | } |
| 117 | |
| 118 | /*----------------------------------------------------------------------------------------*/ |
| 119 | /** |
| 120 | * Return (UINT64)zero. |
| 121 | * |
| 122 | * |
| 123 | * @retval zero None, or only case zero. |
| 124 | */ |
| 125 | UINT64 |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 126 | CommonReturnZero64 (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 127 | { |
| 128 | return 0; |
| 129 | } |
| 130 | |
| 131 | /*----------------------------------------------------------------------------------------*/ |
| 132 | /** |
| 133 | * Return NULL |
| 134 | * |
| 135 | * @retval NULL pointer to nothing |
| 136 | */ |
| 137 | VOID * |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 138 | CommonReturnNULL (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 139 | { |
| 140 | return NULL; |
| 141 | } |
| 142 | |
| 143 | /*----------------------------------------------------------------------------------------*/ |
| 144 | /** |
| 145 | * Return AGESA_SUCCESS. |
| 146 | * |
| 147 | * @retval AGESA_SUCCESS Success. |
| 148 | */ |
| 149 | AGESA_STATUS |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 150 | CommonReturnAgesaSuccess (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 151 | { |
| 152 | return AGESA_SUCCESS; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | /*----------------------------------------------------------------------------------------*/ |
| 157 | /** |
| 158 | * Do Nothing. |
| 159 | * |
| 160 | */ |
| 161 | VOID |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 162 | CommonVoid (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 163 | { |
| 164 | } |
| 165 | |
| 166 | /*----------------------------------------------------------------------------------------*/ |
| 167 | /** |
| 168 | * ASSERT if this routine is called. |
| 169 | * |
| 170 | */ |
| 171 | VOID |
Frank Vibrans | ccad951 | 2011-05-05 16:49:11 +0000 | [diff] [blame] | 172 | CommonAssert (VOID) |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 173 | { |
| 174 | ASSERT (FALSE); |
| 175 | } |