blob: 1bf9f85779a36b0314ae1370f17c319d43a9db1d [file] [log] [blame]
zbao7d94cf92012-07-02 14:19:14 +08001/* $NoKeywords:$ */
2/**
3 * @file
4 *
5 * Common Return routines.
6 *
7 * Routines which do nothing, returning a result (preferably some version of zero) which
8 * is consistent with "do nothing" or "default". Useful for function pointer tables.
9 *
10 * @xrefitem bom "File Content Label" "Release Content"
11 * @e project: AGESA
12 * @e sub-project: Common
13 * @e \$Revision: 63425 $ @e \$Date: 2011-12-22 11:24:10 -0600 (Thu, 22 Dec 2011) $
14 *
15 */
16/*
17*****************************************************************************
18*
Siyuan Wang641f00c2013-06-08 11:50:55 +080019 * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc.
20 * All rights reserved.
21 *
22 * Redistribution and use in source and binary forms, with or without
23 * modification, are permitted provided that the following conditions are met:
24 * * Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * * Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
30 * its contributors may be used to endorse or promote products derived
31 * from this software without specific prior written permission.
32 *
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
37 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
40 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
zbao7d94cf92012-07-02 14:19:14 +080043* ***************************************************************************
44*
45*/
46
47#ifndef _COMMON_RETURNS_H_
48#define _COMMON_RETURNS_H_
49
50
51/**
52* Return True
53*
54* @retval True Default case, no special action
55*/
56BOOLEAN
57CommonReturnTrue ( VOID );
58
59/**
60* Return False.
61*
62* @retval FALSE Default case, no special action
63*/
64BOOLEAN
65CommonReturnFalse ( VOID );
66
67/**
68 * Return (UINT8)zero.
69 *
70 *
71 * @retval zero None, or only case zero.
72 */
73UINT8
74CommonReturnZero8 ( VOID );
75
76/**
77 * Return (UINT32)zero.
78 *
79 *
80 * @retval zero None, or only case zero.
81 */
82UINT32
83CommonReturnZero32 ( VOID );
84
85/**
86 * Return (UINT64)zero.
87 *
88 *
89 * @retval zero None, or only case zero.
90 */
91UINT64
92CommonReturnZero64 ( VOID );
93
94/**
95 * Return NULL
96 *
97 * @retval NULL pointer to nothing
98 */
99VOID *
100CommonReturnNULL ( VOID );
101
102/**
103* Return AGESA_SUCCESS.
104*
105* @retval AGESA_SUCCESS Success.
106*/
107AGESA_STATUS
108CommonReturnAgesaSuccess ( VOID );
109
110/**
111 * Do Nothing.
112 *
113 */
114VOID
115CommonVoid ( VOID );
116
117/**
118 * ASSERT if this routine is called.
119 *
120 */
121VOID
122CommonAssert ( VOID );
123
124#endif // _COMMON_RETURNS_H_