Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 2 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 3 | #ifndef __BOOTBLOCK_COMMON_H |
| 4 | #define __BOOTBLOCK_COMMON_H |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 5 | |
Lee Leahy | 538b324 | 2016-06-05 17:20:17 -0700 | [diff] [blame] | 6 | #include <arch/cpu.h> |
Aaron Durbin | 622eea7 | 2016-02-10 23:15:07 -0600 | [diff] [blame] | 7 | #include <main_decl.h> |
Julius Werner | 12574dd | 2018-05-15 17:48:30 -0700 | [diff] [blame] | 8 | #include <timestamp.h> |
| 9 | #include <types.h> |
Aaron Durbin | 622eea7 | 2016-02-10 23:15:07 -0600 | [diff] [blame] | 10 | |
Aaron Durbin | be7cbdc | 2016-02-24 18:56:00 -0600 | [diff] [blame] | 11 | /* |
| 12 | * These are defined as weak no-ops that can be overridden by mainboard/SoC. |
| 13 | * The 'early' variants are called prior to console initialization. Also, the |
Elyes HAOUAS | f0a58df | 2018-08-07 12:21:56 +0200 | [diff] [blame] | 14 | * SoC functions are called prior to the mainboard functions. |
Aaron Durbin | be7cbdc | 2016-02-24 18:56:00 -0600 | [diff] [blame] | 15 | */ |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 16 | void decompressor_soc_init(void); |
Julius Werner | f1e3210 | 2014-11-25 13:22:20 -0800 | [diff] [blame] | 17 | void bootblock_mainboard_early_init(void); |
Gabe Black | 8b68539 | 2013-09-29 03:02:55 -0700 | [diff] [blame] | 18 | void bootblock_mainboard_init(void); |
Aaron Durbin | be7cbdc | 2016-02-24 18:56:00 -0600 | [diff] [blame] | 19 | void bootblock_soc_early_init(void); |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 20 | void bootblock_soc_init(void); |
Lee Leahy | 6c3c31e | 2016-06-05 16:46:48 -0700 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * C code entry point for the boot block. |
| 24 | */ |
Lee Leahy | 22c28e0 | 2017-03-07 15:47:44 -0800 | [diff] [blame] | 25 | asmlinkage void bootblock_c_entry(uint64_t base_timestamp); |
Kyösti Mälkki | 05a7ffa | 2018-12-28 17:05:08 +0200 | [diff] [blame] | 26 | asmlinkage void bootblock_c_entry_bist(uint64_t base_timestamp, uint32_t bist); |
Lee Leahy | 6c3c31e | 2016-06-05 16:46:48 -0700 | [diff] [blame] | 27 | |
Kyösti Mälkki | 33d0fb8 | 2019-11-29 06:38:46 +0200 | [diff] [blame] | 28 | /* To be used when APs execute through bootblock too. */ |
| 29 | asmlinkage void ap_bootblock_c_entry(void); |
| 30 | |
Kyösti Mälkki | 101ef0b | 2019-08-18 06:58:42 +0300 | [diff] [blame] | 31 | void bootblock_main_with_basetime(uint64_t base_timestamp); |
Kangheui Won | 1858223 | 2020-09-17 16:49:40 +1000 | [diff] [blame] | 32 | void bootblock_main_with_timestamp(uint64_t base_timestamp, |
| 33 | struct timestamp_entry *timestamps, size_t num_timestamps); |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 34 | |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 35 | /* This is the argument structure passed from decompressor to bootblock. */ |
| 36 | struct bootblock_arg { |
| 37 | uint64_t base_timestamp; |
| 38 | uint32_t num_timestamps; |
| 39 | struct timestamp_entry timestamps[]; |
| 40 | }; |
| 41 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 42 | #endif /* __BOOTBLOCK_COMMON_H */ |