5 * AMD AGESA CPU Preserve Registers used for AP Mailbox.
7 * Save and Restore the normal feature content of the registers being used for
10 * @xrefitem bom "File Content Label" "Release Content"
12 * @e sub-project: CPU/Feature
13 * @e \$Revision: 50096 $ @e \$Date: 2011-04-01 16:17:10 -0600 (Fri, 01 Apr 2011) $
17 ******************************************************************************
19 * Copyright (C) 2012 Advanced Micro Devices, Inc.
20 * All rights reserved.
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.
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.
44 ******************************************************************************
47 #ifndef _PRESERVE_MAILBOX_H_
48 #define _PRESERVE_MAILBOX_H_
50 /*----------------------------------------------------------------------------------------
51 * M I X E D (Definitions And Macros / Typedefs, Structures, Enums)
52 *----------------------------------------------------------------------------------------
54 #define MAX_PRESERVE_REGISTER_ENTRIES 2 ///< There is room on the heap for up to this per node.
56 /// Reference to a save buffer.
57 typedef UINT32 (*MAILBOX_REGISTER_SAVE_ENTRY) [MAX_PRESERVE_REGISTER_ENTRIES];
59 /*----------------------------------------------------------------------------------------
60 * D E F I N I T I O N S A N D M A C R O S
61 *----------------------------------------------------------------------------------------
64 /*----------------------------------------------------------------------------------------
65 * T Y P E D E F S A N D S T R U C T U R E S
66 *----------------------------------------------------------------------------------------
70 * Family specific mailbox register descriptor.
72 * Describes a register and bits within the register used as the mailbox.
75 PCI_ADDR Register; ///< The PCI address of a mailbox register.
76 UINT32 Mask; ///< The mask of bits used in Register as the mailbox.
77 } PRESERVE_MAILBOX_FAMILY_REGISTER;
80 * Descriptor for family specific save-restore.
82 * Provide a list of the register offsets to save-restore on each node. Optionally, zero the
83 * register instead of restoring it.
86 UINT16 Revision; ///< Interface version
88 BOOLEAN IsZeroOnCold; ///< On a cold boot, zero the register instead of restore.
89 PRESERVE_MAILBOX_FAMILY_REGISTER *RegisterList; ///< The list of registers, terminated by ILLEGAL_SBDFO.
90 } PRESERVE_MAILBOX_FAMILY_SERVICES;
93 /*----------------------------------------------------------------------------------------
94 * F U N C T I O N S P R O T O T Y P E
95 *----------------------------------------------------------------------------------------
98 #endif // _PRESERVE_MAILBOX_H_