blob: 7b61b4cb495284b39e15e4027c63a86319dfa86e [file] [log] [blame]
Siyuan Wang80cf7d52013-07-09 17:42:43 +08001/*
2 * This file is part of the coreboot project.
3 *
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +03004 * Copyright (C) 2011 Advanced Micro Devices, Inc.
Siyuan Wang80cf7d52013-07-09 17:42:43 +08005 *
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
Zheng Bao7797ffa2013-11-20 15:09:23 +080017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Siyuan Wang80cf7d52013-07-09 17:42:43 +080018 */
19
Siyuan Wang80cf7d52013-07-09 17:42:43 +080020#ifndef _AGESAWRAPPER_H_
21#define _AGESAWRAPPER_H_
22
23#include <stdint.h>
24#include "Porting.h"
25#include "AGESA.h"
26
Siyuan Wang80cf7d52013-07-09 17:42:43 +080027/* Define AMD Ontario APPU SSID/SVID */
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030028#define AMD_APU_SVID 0x1022
29#define AMD_APU_SSID 0x1234
30#define PCIE_BASE_ADDRESS CONFIG_MMCONF_BASE_ADDRESS
Siyuan Wang80cf7d52013-07-09 17:42:43 +080031
32enum {
33 PICK_DMI, /* DMI Interface */
34 PICK_PSTATE, /* Acpi Pstate SSDT Table */
35 PICK_SRAT, /* SRAT Table */
36 PICK_SLIT, /* SLIT Table */
37 PICK_WHEA_MCE, /* WHEA MCE table */
38 PICK_WHEA_CMC, /* WHEA CMV table */
39 PICK_ALIB, /* SACPI SSDT table with ALIB implementation */
40 PICK_IVRS, /* IOMMU ACPI IVRS(I/O Virtualization Reporting Structure) table */
41};
42
Edward O'Callaghan06ff7262014-07-05 15:24:50 +100043AGESA_STATUS agesawrapper_amdinitreset(void);
44AGESA_STATUS agesawrapper_amdinitearly(void);
45AGESA_STATUS agesawrapper_amdinitenv(void);
46AGESA_STATUS agesawrapper_amdinitlate(void);
47AGESA_STATUS agesawrapper_amdinitpost(void);
48AGESA_STATUS agesawrapper_amdinitmid(void);
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030049
Kyösti Mälkki1aa35c62014-10-21 14:19:04 +030050void agesawrapper_trace(AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func);
51#define AGESA_EVENTLOG(status, stdheader) \
52 agesawrapper_trace(status, stdheader, __func__)
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030053
Edward O'Callaghan06ff7262014-07-05 15:24:50 +100054AGESA_STATUS agesawrapper_amdinitcpuio(void);
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030055AGESA_STATUS agesawrapper_amdinitmmio(void);
Edward O'Callaghan06ff7262014-07-05 15:24:50 +100056AGESA_STATUS agesawrapper_amdinitresume(void);
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030057AGESA_STATUS agesawrapper_amdS3Save(void);
Edward O'Callaghan06ff7262014-07-05 15:24:50 +100058AGESA_STATUS agesawrapper_amds3laterestore(void);
Kyösti Mälkkif21c2ac2014-10-19 09:35:18 +030059AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
60void *agesawrapper_getlateinitptr (int pick);
Siyuan Wang80cf7d52013-07-09 17:42:43 +080061
Edward O'Callaghan06ff7262014-07-05 15:24:50 +100062AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
63AGESA_STATUS agesawrapper_fchs3laterestore(void);
Siyuan Wang80cf7d52013-07-09 17:42:43 +080064
Kyösti Mälkki34ad72c2014-10-21 13:43:46 +030065void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly);
66void OemCustomizeInitPost(AMD_POST_PARAMS *InitPost);
67
Edward O'Callaghancd309512014-06-12 14:29:27 +100068#endif /* _AGESAWRAPPER_H_ */