blob: 04fc0cbfd5f063f7d9fce7d3d632bc1629eaeae3 [file] [log] [blame]
Vadim Bendebury0b341b32014-04-23 11:09:44 -07001/*
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 Bendebury0b341b32014-04-23 11:09:44 -070014 */
Stefan Reinauer52db0b92012-12-07 17:15:04 -080015
Julius Werner86fc11d2015-10-09 13:37:58 -070016#ifndef __BOOTBLOCK_COMMON_H
17#define __BOOTBLOCK_COMMON_H
Vadim Bendebury0b341b32014-04-23 11:09:44 -070018
Lee Leahy538b3242016-06-05 17:20:17 -070019#include <arch/cpu.h>
Aaron Durbin622eea72016-02-10 23:15:07 -060020#include <main_decl.h>
Alexandru Gagniucff196b62016-05-16 16:17:39 -070021#include <stdint.h>
Aaron Durbin622eea72016-02-10 23:15:07 -060022
Aaron Durbinbe7cbdc2016-02-24 18:56:00 -060023/*
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 Wernerf1e32102014-11-25 13:22:20 -080028void bootblock_mainboard_early_init(void);
Gabe Black8b685392013-09-29 03:02:55 -070029void bootblock_mainboard_init(void);
Aaron Durbinbe7cbdc2016-02-24 18:56:00 -060030void bootblock_soc_early_init(void);
Vadim Bendebury0b341b32014-04-23 11:09:44 -070031void bootblock_soc_init(void);
Lee Leahy6c3c31e2016-06-05 16:46:48 -070032
33/*
34 * C code entry point for the boot block.
35 */
36void asmlinkage bootblock_c_entry(uint64_t base_timestamp);
37
Alexandru Gagniucff196b62016-05-16 16:17:39 -070038/*
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 Leahy538b3242016-06-05 17:20:17 -070046void asmlinkage bootblock_main_with_timestamp(uint64_t base_timestamp);
Vadim Bendebury0b341b32014-04-23 11:09:44 -070047
Julius Werner86fc11d2015-10-09 13:37:58 -070048#endif /* __BOOTBLOCK_COMMON_H */