blob: 4e8beac3f568b9f8873a17f1218813386710b4bb [file] [log] [blame]
Frank Vibrans2b4c8312011-02-14 18:30:54 +00001/* $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'Callaghan1542a6f2014-07-06 19:24:06 +100018 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000019 * 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'Callaghan1542a6f2014-07-06 19:24:06 +100026 * * 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 Vibrans2b4c8312011-02-14 18:30:54 +000028 * from this software without specific prior written permission.
Edward O'Callaghan1542a6f2014-07-06 19:24:06 +100029 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000030 * 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'Callaghan1542a6f2014-07-06 19:24:06 +100040 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000041 * ***************************************************************************
42 *
43 */
44
45/*
46 *----------------------------------------------------------------------------
47 * MODULES USED
48 *
49 *----------------------------------------------------------------------------
50 */
51
52
53#include "AGESA.h"
54#include "Ids.h"
efdesign9884cbce22011-08-04 12:09:17 -060055#include "CommonReturns.h"
Frank Vibrans2b4c8312011-02-14 18:30:54 +000056#include "Filecode.h"
57CODE_GROUP (G1_PEICC)
58RDATA_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*/
73BOOLEAN
Frank Vibransccad9512011-05-05 16:49:11 +000074CommonReturnTrue (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +000075{
76 return TRUE;
77}
78
79
80/*----------------------------------------------------------------------------------------*/
81/**
82* Return False.
83*
84* @retval FALSE Default case, no special action
85*/
86BOOLEAN
Frank Vibransccad9512011-05-05 16:49:11 +000087CommonReturnFalse (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +000088{
89 return FALSE;
90}
91
92/*----------------------------------------------------------------------------------------*/
93/**
94 * Return (UINT8)zero.
95 *
96 *
97 * @retval zero None, or only case zero.
98 */
99UINT8
Frank Vibransccad9512011-05-05 16:49:11 +0000100CommonReturnZero8 (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000101{
102 return 0;
103}
104
105/*----------------------------------------------------------------------------------------*/
106/**
107 * Return (UINT32)zero.
108 *
109 *
110 * @retval zero None, or only case zero.
111 */
112UINT32
Frank Vibransccad9512011-05-05 16:49:11 +0000113CommonReturnZero32 (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000114{
115 return 0;
116}
117
118/*----------------------------------------------------------------------------------------*/
119/**
120 * Return (UINT64)zero.
121 *
122 *
123 * @retval zero None, or only case zero.
124 */
125UINT64
Frank Vibransccad9512011-05-05 16:49:11 +0000126CommonReturnZero64 (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000127{
128 return 0;
129}
130
131/*----------------------------------------------------------------------------------------*/
132/**
133 * Return NULL
134 *
135 * @retval NULL pointer to nothing
136 */
137VOID *
Frank Vibransccad9512011-05-05 16:49:11 +0000138CommonReturnNULL (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000139{
140 return NULL;
141}
142
143/*----------------------------------------------------------------------------------------*/
144/**
145* Return AGESA_SUCCESS.
146*
147* @retval AGESA_SUCCESS Success.
148*/
149AGESA_STATUS
Frank Vibransccad9512011-05-05 16:49:11 +0000150CommonReturnAgesaSuccess (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000151{
152 return AGESA_SUCCESS;
153}
154
155
156/*----------------------------------------------------------------------------------------*/
157/**
158 * Do Nothing.
159 *
160 */
161VOID
Frank Vibransccad9512011-05-05 16:49:11 +0000162CommonVoid (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000163{
164}
165
166/*----------------------------------------------------------------------------------------*/
167/**
168 * ASSERT if this routine is called.
169 *
170 */
171VOID
Frank Vibransccad9512011-05-05 16:49:11 +0000172CommonAssert (VOID)
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000173{
174 ASSERT (FALSE);
175}