Martin Roth | 7687e77 | 2023-08-22 16:32:20 -0600 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
| 2 | |
Marc Jones | 0b11bd0 | 2015-07-19 15:20:17 -0600 | [diff] [blame] | 3 | /* $NoKeywords:$ */ |
| 4 | /** |
| 5 | * @file |
| 6 | * |
| 7 | * FCH platform definition |
| 8 | * |
| 9 | * |
| 10 | * |
| 11 | * @xrefitem bom "File Content Label" "Release Content" |
| 12 | * @e project: AGESA |
| 13 | * @e sub-project: FCH |
| 14 | * @e \$Revision: 281178 $ @e \$Date: 2013-12-18 02:14:15 -0600 (Wed, 18 Dec 2013) $ |
| 15 | * |
| 16 | */ |
| 17 | /***************************************************************************** |
| 18 | * |
| 19 | * Copyright (c) 2008 - 2014, 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 | #ifndef _FCH_PLATFORM_H_ |
| 47 | #define _FCH_PLATFORM_H_ |
| 48 | |
| 49 | #define MAX_SATA_PORTS 8 |
| 50 | |
| 51 | #include "AGESA.h" |
| 52 | |
| 53 | #ifndef FCHOEM_ACPI_RESTORE_SWSMI |
| 54 | #define FCHOEM_BEFORE_PCI_RESTORE_SWSMI 0xD3 |
| 55 | #define FCHOEM_AFTER_PCI_RESTORE_SWSMI 0xD4 |
| 56 | #define FCHOEM_ENABLE_ACPI_SWSMI 0xA0 |
| 57 | #define FCHOEM_DISABLE_ACPI_SWSMI 0xA1 |
| 58 | #define FCHOEM_START_TIMER_SMI 0xBC |
| 59 | #define FCHOEM_STOP_TIMER_SMI 0xBD |
| 60 | #endif |
| 61 | |
| 62 | #ifndef FCHOEM_SPI_UNLOCK_SWSMI |
| 63 | #define FCHOEM_SPI_UNLOCK_SWSMI 0xAA |
| 64 | #endif |
| 65 | #ifndef FCHOEM_SPI_LOCK_SWSMI |
| 66 | #define FCHOEM_SPI_LOCK_SWSMI 0xAB |
| 67 | #endif |
| 68 | |
| 69 | #ifndef FCHOEM_ACPI_TABLE_RANGE_LOW |
| 70 | #define FCHOEM_ACPI_TABLE_RANGE_LOW 0xE0000ul |
| 71 | #endif |
| 72 | |
| 73 | #ifndef FCHOEM_ACPI_TABLE_RANGE_HIGH |
| 74 | #define FCHOEM_ACPI_TABLE_RANGE_HIGH 0xFFFF0ul |
| 75 | #endif |
| 76 | |
| 77 | #ifndef FCHOEM_ACPI_BYTE_CHECHSUM |
| 78 | #define FCHOEM_ACPI_BYTE_CHECHSUM 0x100 |
| 79 | #endif |
| 80 | |
| 81 | #ifndef FCHOEM_IO_DELAY_PORT |
| 82 | #define FCHOEM_IO_DELAY_PORT 0x80 |
| 83 | #endif |
| 84 | |
| 85 | #ifndef FCHOEM_OUTPUT_DEBUG_PORT |
| 86 | #define FCHOEM_OUTPUT_DEBUG_PORT 0x80 |
| 87 | #endif |
| 88 | |
| 89 | #define FCH_PCIRST_BASE_IO 0xCF9 |
| 90 | #define FCH_PCI_RESET_COMMAND06 0x06 |
| 91 | #define FCH_PCI_RESET_COMMAND0E 0x0E |
| 92 | #define FCH_KBDRST_BASE_IO 0x64 |
| 93 | #define FCH_KBC_RESET_COMMAND 0xFE |
| 94 | #define FCH_ROMSIG_BASE_IO 0x20000l |
| 95 | #define FCH_ROMSIG_SIGNATURE 0x55AA55AAul |
| 96 | #define FCH_MAX_TIMER 0xFFFFFFFFul |
| 97 | #define FCH_GEC_INTERNAL_REG 0x6804 |
| 98 | #define FCH_HPET_REG_MASK 0xFFFFF800ul |
| 99 | #define FCH_FAKE_USB_BAR_ADDRESS 0x58830000ul |
| 100 | |
| 101 | |
| 102 | #ifndef FCHOEM_ELAPSED_TIME_UNIT |
| 103 | #define FCHOEM_ELAPSED_TIME_UNIT 28 |
| 104 | #endif |
| 105 | |
| 106 | #ifndef FCHOEM_ELAPSED_TIME_DIVIDER |
| 107 | #define FCHOEM_ELAPSED_TIME_DIVIDER 100 |
| 108 | #endif |
| 109 | |
| 110 | #include "Fch.h" |
| 111 | #include "amdlib.h" |
| 112 | #include "FchCommonCfg.h" |
| 113 | #include "AcpiLib.h" |
| 114 | #include "FchDef.h" |
| 115 | #include "FchBiosRamUsage.h" |
| 116 | #include "AmdFch.h" |
| 117 | |
| 118 | extern BUILD_OPT_CFG UserOptions; |
| 119 | |
| 120 | #endif // _FCH_PLATFORM_H_ |