Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 14 | */ |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 15 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 16 | #ifndef __BOOTBLOCK_COMMON_H |
| 17 | #define __BOOTBLOCK_COMMON_H |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 18 | |
Lee Leahy | 538b324 | 2016-06-05 17:20:17 -0700 | [diff] [blame] | 19 | #include <arch/cpu.h> |
Aaron Durbin | 622eea7 | 2016-02-10 23:15:07 -0600 | [diff] [blame] | 20 | #include <main_decl.h> |
Alexandru Gagniuc | ff196b6 | 2016-05-16 16:17:39 -0700 | [diff] [blame] | 21 | #include <stdint.h> |
Aaron Durbin | 622eea7 | 2016-02-10 23:15:07 -0600 | [diff] [blame] | 22 | |
Aaron Durbin | be7cbdc | 2016-02-24 18:56:00 -0600 | [diff] [blame] | 23 | /* |
| 24 | * These are defined as weak no-ops that can be overridden by mainboard/SoC. |
| 25 | * The 'early' variants are called prior to console initialization. Also, the |
| 26 | * SoC functions are called prior to the mainboard fucntions. |
| 27 | */ |
Julius Werner | f1e3210 | 2014-11-25 13:22:20 -0800 | [diff] [blame] | 28 | void bootblock_mainboard_early_init(void); |
Gabe Black | 8b68539 | 2013-09-29 03:02:55 -0700 | [diff] [blame] | 29 | void bootblock_mainboard_init(void); |
Aaron Durbin | be7cbdc | 2016-02-24 18:56:00 -0600 | [diff] [blame] | 30 | void bootblock_soc_early_init(void); |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 31 | void bootblock_soc_init(void); |
Lee Leahy | 6c3c31e | 2016-06-05 16:46:48 -0700 | [diff] [blame] | 32 | |
| 33 | /* |
| 34 | * C code entry point for the boot block. |
| 35 | */ |
Lee Leahy | 22c28e0 | 2017-03-07 15:47:44 -0800 | [diff] [blame] | 36 | asmlinkage void bootblock_c_entry(uint64_t base_timestamp); |
Lee Leahy | 6c3c31e | 2016-06-05 16:46:48 -0700 | [diff] [blame] | 37 | |
Alexandru Gagniuc | ff196b6 | 2016-05-16 16:17:39 -0700 | [diff] [blame] | 38 | /* |
| 39 | * This is a the same as the bootblock main(), with the difference that it does |
| 40 | * not collect a timestamp. Instead it accepts the first timestamp as an |
| 41 | * argument. This can be used in cases where an earlier stamp is available |
| 42 | * Note that this function is designed to be entered from C code. |
| 43 | * This function assumes that the timer has already been initialized, so it |
| 44 | * does not call init_timer(). |
| 45 | */ |
Lee Leahy | 22c28e0 | 2017-03-07 15:47:44 -0800 | [diff] [blame] | 46 | asmlinkage void bootblock_main_with_timestamp(uint64_t base_timestamp); |
Vadim Bendebury | 0b341b3 | 2014-04-23 11:09:44 -0700 | [diff] [blame] | 47 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 48 | #endif /* __BOOTBLOCK_COMMON_H */ |