Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 4 | * Copyright (C) 2011 Advanced Micro Devices, Inc. |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 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 |
Zheng Bao | 7797ffa | 2013-11-20 15:09:23 +0800 | [diff] [blame] | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 18 | */ |
| 19 | |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 20 | #ifndef _AGESAWRAPPER_H_ |
| 21 | #define _AGESAWRAPPER_H_ |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | #include "Porting.h" |
| 25 | #include "AGESA.h" |
| 26 | |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 27 | /* Define AMD Ontario APPU SSID/SVID */ |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 28 | #define AMD_APU_SVID 0x1022 |
| 29 | #define AMD_APU_SSID 0x1234 |
| 30 | #define PCIE_BASE_ADDRESS CONFIG_MMCONF_BASE_ADDRESS |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 31 | |
| 32 | enum { |
| 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'Callaghan | 06ff726 | 2014-07-05 15:24:50 +1000 | [diff] [blame] | 43 | AGESA_STATUS agesawrapper_amdinitreset(void); |
| 44 | AGESA_STATUS agesawrapper_amdinitearly(void); |
| 45 | AGESA_STATUS agesawrapper_amdinitenv(void); |
| 46 | AGESA_STATUS agesawrapper_amdinitlate(void); |
| 47 | AGESA_STATUS agesawrapper_amdinitpost(void); |
| 48 | AGESA_STATUS agesawrapper_amdinitmid(void); |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 49 | |
Kyösti Mälkki | 1aa35c6 | 2014-10-21 14:19:04 +0300 | [diff] [blame^] | 50 | void 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älkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 53 | |
Edward O'Callaghan | 06ff726 | 2014-07-05 15:24:50 +1000 | [diff] [blame] | 54 | AGESA_STATUS agesawrapper_amdinitcpuio(void); |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 55 | AGESA_STATUS agesawrapper_amdinitmmio(void); |
Edward O'Callaghan | 06ff726 | 2014-07-05 15:24:50 +1000 | [diff] [blame] | 56 | AGESA_STATUS agesawrapper_amdinitresume(void); |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 57 | AGESA_STATUS agesawrapper_amdS3Save(void); |
Edward O'Callaghan | 06ff726 | 2014-07-05 15:24:50 +1000 | [diff] [blame] | 58 | AGESA_STATUS agesawrapper_amds3laterestore(void); |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 59 | AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr); |
| 60 | void *agesawrapper_getlateinitptr (int pick); |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 61 | |
Edward O'Callaghan | 06ff726 | 2014-07-05 15:24:50 +1000 | [diff] [blame] | 62 | AGESA_STATUS agesawrapper_fchs3earlyrestore(void); |
| 63 | AGESA_STATUS agesawrapper_fchs3laterestore(void); |
Siyuan Wang | 80cf7d5 | 2013-07-09 17:42:43 +0800 | [diff] [blame] | 64 | |
Kyösti Mälkki | 34ad72c | 2014-10-21 13:43:46 +0300 | [diff] [blame] | 65 | void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly); |
| 66 | void OemCustomizeInitPost(AMD_POST_PARAMS *InitPost); |
| 67 | |
Edward O'Callaghan | cd30951 | 2014-06-12 14:29:27 +1000 | [diff] [blame] | 68 | #endif /* _AGESAWRAPPER_H_ */ |