coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bootmode.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
assert.h
>
4
#include <
bootmode.h
>
5
#include <
security/vboot/misc.h
>
6
#include <vb2_api.h>
7
8
static
int
gfx_init_done
= -1;
9
10
int
gfx_get_init_done
(
void
)
11
{
12
if
(
gfx_init_done
< 0)
13
return
0;
14
return
gfx_init_done
;
15
}
16
17
void
gfx_set_init_done
(
int
done)
18
{
19
gfx_init_done
= done;
20
}
21
22
int
display_init_required
(
void
)
23
{
24
/* For vboot, always honor VB2_CONTEXT_DISPLAY_INIT. */
25
if
(
CONFIG
(VBOOT)) {
26
/* Must always select MUST_REQUEST_DISPLAY when using this
27
function. */
28
if
(!
CONFIG
(VBOOT_MUST_REQUEST_DISPLAY))
29
dead_code
();
30
return
vboot_get_context
()->flags & VB2_CONTEXT_DISPLAY_INIT;
31
}
32
33
/* By default always initialize display. */
34
return
1;
35
}
assert.h
dead_code
#define dead_code()
Definition:
assert.h:89
bootmode.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
gfx_get_init_done
int gfx_get_init_done(void)
Definition:
bootmode.c:10
display_init_required
int display_init_required(void)
Definition:
bootmode.c:22
gfx_set_init_done
void gfx_set_init_done(int done)
Definition:
bootmode.c:17
gfx_init_done
static int gfx_init_done
Definition:
bootmode.c:8
misc.h
vboot_get_context
struct vb2_context * vboot_get_context(void)
Definition:
common.c:28
src
lib
bootmode.c
Generated by
1.9.1