blob: 1da96766ca289c0a44c1c324563125e6d825c8e3 [file] [log] [blame]
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <stddef.h>
21#include <string.h>
22#include "chromeos.h"
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -070023#include <boot/coreboot_tables.h>
24#include <cbfs.h>
25#include <cbmem.h>
26#include <console/console.h>
Daisuke Nojiri24d4dae2015-02-03 14:44:55 -080027#include "vboot_handoff.h"
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -070028
Daisuke Nojiri742fc8d2014-10-10 10:51:06 -070029int vboot_skip_display_init(void)
30{
31 struct vboot_handoff *vbho;
32
33 vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
34
35 if (vbho == NULL)
36 return 0;
37
38 return !(vbho->init_params.out_flags & VB_INIT_OUT_ENABLE_DISPLAY);
39}
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -070040
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -070041int __attribute__((weak)) clear_recovery_mode_switch(void)
42{
43 // Can be implemented by a mainboard
44 return 0;
45}
46
Julius Werner015f0ae2014-09-15 22:10:33 -070047#ifdef __ROMSTAGE__
Daisuke Nojiriefddcfb2014-09-04 09:55:34 -070048void __attribute__((weak)) save_chromeos_gpios(void)
49{
50 // Can be implemented by a mainboard
51}
52
53int __attribute((weak)) vboot_get_sw_write_protect(void)
54{
55 // Can be implemented by a platform / mainboard
56 return 0;
57}
58#endif