Software APIs
Main Page
File List
Globals
All
a
b
c
d
e
g
h
i
k
l
m
o
p
r
s
t
u
w
Functions
a
b
c
d
g
h
i
l
m
o
p
r
s
t
u
w
Variables
k
t
Typedefs
a
b
c
d
h
i
l
m
o
r
s
t
u
Enumerations
b
d
h
i
l
o
s
t
Enumerator
k
Macros
a
c
d
e
h
i
l
m
o
p
s
t
u
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
k
m
o
p
r
s
t
w
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerations
Enumerator
sw
device
silicon_creator
rom
bootstrap.h
1
// Copyright lowRISC contributors (OpenTitan project).
2
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
// SPDX-License-Identifier: Apache-2.0
4
#ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_BOOTSTRAP_H_
5
#define OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_BOOTSTRAP_H_
6
7
#include "
sw/device/lib/base/hardened.h
"
8
#include "sw/device/silicon_creator/lib/error.h"
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
/**
15
* Checks whether bootstrap is requested.
16
*
17
* The return value of this function also depends on the `ROM_BOOTSTRAP_DIS` OTP
18
* item.
19
*
20
* @return Whether bootstrap is requested.
21
*/
22
OT_WARN_UNUSED_RESULT
23
hardened_bool_t
bootstrap_requested(
void
);
24
25
/**
26
* Bootstraps the data partition of the embedded flash with data received by the
27
* spi_device.
28
*
29
* OpenTitan bootstrap uses the typical SPI flash EEPROM commands. A typical
30
* bootstrap session involves:
31
* - Erasing the chip (WREN, CHIP_ERASE, busy loop ...),
32
* - Programming the chip (WREN, PAGE_PROGRAM, busy loop ...), and
33
* - Resetting the chip (RESET).
34
*
35
* This function only returns on error since a successful bootstrap ends with a
36
* chip reset.
37
*
38
* @return Result of the operation.
39
*/
40
OT_WARN_UNUSED_RESULT
41
rom_error_t bootstrap(
void
);
42
43
#ifdef __cplusplus
44
}
45
#endif
46
47
#endif
// OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_BOOTSTRAP_H_
Return to
OpenTitan Documentation