Martin Roth | 1a3de8e | 2022-10-06 15:57:21 -0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <amdblocks/acpimmio.h> |
| 5 | #include <amdblocks/memmap.h> |
| 6 | #include <amdblocks/pmlib.h> |
Martin Roth | 8180427 | 2022-11-20 20:30:18 -0700 | [diff] [blame] | 7 | #include <amdblocks/post_codes.h> |
Martin Roth | 1a3de8e | 2022-10-06 15:57:21 -0600 | [diff] [blame] | 8 | #include <console/console.h> |
Elyes Haouas | f743e0c | 2022-10-31 13:46:00 +0100 | [diff] [blame] | 9 | #include <cpu/cpu.h> |
Martin Roth | 1a3de8e | 2022-10-06 15:57:21 -0600 | [diff] [blame] | 10 | #include <fsp/api.h> |
| 11 | #include <program_loading.h> |
| 12 | #include <romstage_common.h> |
| 13 | |
| 14 | void __noreturn romstage_main(void) |
| 15 | { |
Martin Roth | 8180427 | 2022-11-20 20:30:18 -0700 | [diff] [blame] | 16 | post_code(POST_ROMSTAGE_MAIN); |
Martin Roth | 1a3de8e | 2022-10-06 15:57:21 -0600 | [diff] [blame] | 17 | |
| 18 | /* Snapshot chipset state prior to any FSP call */ |
| 19 | fill_chipset_state(); |
| 20 | |
| 21 | fsp_memory_init(acpi_is_wakeup_s3()); |
| 22 | |
| 23 | /* Fixup settings FSP-M should not be changing */ |
| 24 | fch_disable_legacy_dma_io(); |
| 25 | |
| 26 | memmap_stash_early_dram_usage(); |
| 27 | |
| 28 | run_ramstage(); |
| 29 | } |