Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | /* TODO: Check if this is still correct */ |
| 4 | |
| 5 | #include <acpi/acpi.h> |
| 6 | #include <amdblocks/acpimmio.h> |
| 7 | #include <amdblocks/memmap.h> |
| 8 | #include <amdblocks/pmlib.h> |
| 9 | #include <arch/cpu.h> |
| 10 | #include <console/console.h> |
| 11 | #include <fsp/api.h> |
| 12 | #include <program_loading.h> |
Arthur Heymans | bab9e2e | 2021-05-29 07:30:33 +0200 | [diff] [blame] | 13 | #include <romstage_common.h> |
Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 14 | |
Arthur Heymans | bab9e2e | 2021-05-29 07:30:33 +0200 | [diff] [blame] | 15 | void __noreturn romstage_main(void) |
Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 16 | { |
Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 17 | post_code(0x40); |
| 18 | |
Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 19 | /* Snapshot chipset state prior to any FSP call */ |
| 20 | fill_chipset_state(); |
| 21 | |
| 22 | fsp_memory_init(acpi_is_wakeup_s3()); |
| 23 | |
| 24 | /* Fixup settings FSP-M should not be changing */ |
| 25 | fch_disable_legacy_dma_io(); |
| 26 | |
| 27 | memmap_stash_early_dram_usage(); |
| 28 | |
| 29 | run_ramstage(); |
Arthur Heymans | bab9e2e | 2021-05-29 07:30:33 +0200 | [diff] [blame] | 30 | die("failed to load ramstage\n"); |
Felix Held | 3c44c62 | 2022-01-10 20:57:29 +0100 | [diff] [blame] | 31 | } |