Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 2 | |
| 3 | #include <arch/romstage.h> |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 4 | #include <intelblocks/rtc.h> |
| 5 | #include <console/console.h> |
| 6 | #include <cpu/x86/mtrr.h> |
Andrey Petrov | 662da6c | 2020-03-16 22:46:57 -0700 | [diff] [blame] | 7 | #include <fsp/util.h> |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 8 | #include <soc/romstage.h> |
Andrey Petrov | 662da6c | 2020-03-16 22:46:57 -0700 | [diff] [blame] | 9 | #include <soc/util.h> |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 10 | |
Arthur Heymans | 1410224 | 2020-10-22 14:13:14 +0200 | [diff] [blame] | 11 | void mainboard_romstage_entry(void) |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 12 | { |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 13 | rtc_init(); |
Jingle Hsu | e07ea4c | 2020-07-01 18:26:49 +0800 | [diff] [blame] | 14 | if (soc_get_rtc_failed()) |
| 15 | mainboard_rtc_failed(); |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 16 | |
| 17 | fsp_memory_init(false); |
| 18 | printk(BIOS_DEBUG, "coreboot fsp_memory_init finished...\n"); |
| 19 | |
| 20 | unlock_pam_regions(); |
| 21 | |
Johnny Lin | 7581352 | 2020-09-28 22:38:31 +0800 | [diff] [blame] | 22 | save_dimm_info(); |
Jonathan Zhang | 8f89549 | 2020-01-16 11:16:45 -0800 | [diff] [blame] | 23 | } |
Andrey Petrov | 6d9dc24 | 2020-04-20 17:16:53 -0700 | [diff] [blame] | 24 | |
| 25 | __weak void mainboard_memory_init_params(FSPM_UPD *mupd) |
| 26 | { |
| 27 | printk(BIOS_SPEW, "WARNING: using default FSP-M parameters!\n"); |
| 28 | } |
Jingle Hsu | e07ea4c | 2020-07-01 18:26:49 +0800 | [diff] [blame] | 29 | |
| 30 | __weak void mainboard_rtc_failed(void) |
| 31 | { |
| 32 | |
| 33 | } |
Johnny Lin | 7581352 | 2020-09-28 22:38:31 +0800 | [diff] [blame] | 34 | __weak void save_dimm_info(void) { } |