AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Include / CommonReturns.h
1 /* $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: 54372 $   @e \$Date: 2011-06-07 22:22:22 -0600 (Tue, 07 Jun 2011) $
14  *
15  */
16 /*
17 *****************************************************************************
18 *
19 * Copyright (C) 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.
43 *
44 * ***************************************************************************
45 *
46 */
47
48 #ifndef _COMMON_RETURNS_H_
49 #define _COMMON_RETURNS_H_
50
51
52 /**
53 * Return True
54 *
55 * @retval True    Default case, no special action
56 */
57 BOOLEAN
58 CommonReturnTrue ( VOID );
59
60 /**
61 * Return False.
62 *
63 * @retval FALSE    Default case, no special action
64 */
65 BOOLEAN
66 CommonReturnFalse ( VOID );
67
68 /**
69  * Return (UINT8)zero.
70  *
71  *
72  * @retval zero    None, or only case zero.
73  */
74 UINT8
75 CommonReturnZero8 ( VOID );
76
77 /**
78  * Return (UINT32)zero.
79  *
80  *
81  * @retval zero    None, or only case zero.
82  */
83 UINT32
84 CommonReturnZero32 ( VOID );
85
86 /**
87  * Return (UINT64)zero.
88  *
89  *
90  * @retval zero    None, or only case zero.
91  */
92 UINT64
93 CommonReturnZero64 ( VOID );
94
95 /**
96  * Return NULL
97  *
98  * @retval NULL    pointer to nothing
99  */
100 VOID *
101 CommonReturnNULL ( VOID );
102
103 /**
104 * Return AGESA_SUCCESS.
105 *
106 * @retval AGESA_SUCCESS Success.
107 */
108 AGESA_STATUS
109 CommonReturnAgesaSuccess ( VOID );
110
111 /**
112  * Do Nothing.
113  *
114  */
115 VOID
116 CommonVoid ( VOID );
117
118 /**
119  * ASSERT if this routine is called.
120  *
121  */
122 VOID
123 CommonAssert ( VOID );
124
125 #endif // _COMMON_RETURNS_H_