b187fa25c04de482b925868da3ce9bf9fa478da5
[coreboot.git] / src / mainboard / amd / persimmon / BiosCallOuts.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 Advanced Micro Devices, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18  */
19  
20 #ifndef _BIOS_CALLOUT_H_
21 #define _BIOS_CALLOUT_H_
22
23 #include "Porting.h"
24 #include "AGESA.h"
25
26 #define REQUIRED_CALLOUTS     12
27 #define BIOS_HEAP_START_ADDRESS  0x00010000
28 #define BIOS_HEAP_SIZE       0x20000   /* 64MB */
29
30 typedef struct _BIOS_HEAP_MANAGER {
31   //UINT32 AvailableSize;
32   UINT32 StartOfAllocatedNodes;
33   UINT32 StartOfFreedNodes;
34 } BIOS_HEAP_MANAGER;
35
36 typedef struct _BIOS_BUFFER_NODE {
37   UINT32 BufferHandle;
38   UINT32 BufferSize;
39   UINT32 NextNodeOffset;
40 } BIOS_BUFFER_NODE;
41 /*
42  * CALLOUTS
43  */
44 AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
45
46 /* REQUIRED CALLOUTS
47  * AGESA ADVANCED CALLOUTS - CPU
48  */
49 AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
50 AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
51 AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
52 AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
53 AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
54 AGESA_STATUS BiosGetIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
55
56 /* AGESA ADVANCED CALLOUTS - MEMORY */
57 AGESA_STATUS BiosReadSpd (UINT32  Func,UINT32  Data,VOID *ConfigPtr);
58
59 /* BIOS DEFAULT RET */
60 AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
61
62 /*  Call the host environment interface to provide a user hook opportunity. */
63 AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
64 /*  Call the host environment interface to provide a user hook opportunity. */
65 AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
66 /*  Call the host environment interface to provide a user hook opportunity. */
67 AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
68 /*  Call the host environment interface to provide a user hook opportunity. */
69 AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
70 /* PCIE slot reset control */
71 AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
72 #define SB_GPIO_REG02   2
73 #define SB_GPIO_REG09   9
74 #define SB_GPIO_REG10   10
75 #define SB_GPIO_REG15   15
76 #define SB_GPIO_REG17   17
77 #define SB_GPIO_REG21   21
78 #define SB_GPIO_REG25   25
79 #define SB_GPIO_REG28   28
80 #endif //_BIOS_CALLOUT_H_