Software APIs
hardened.c
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
5
#include "
sw/device/lib/base/hardened.h
"
6
7
// `extern` declarations to give the inline functions in the corresponding
8
// header a link location.
9
10
extern
uint32_t launder32(uint32_t);
11
extern
ot_word_t
launderw(
ot_word_t
);
12
extern
void
barrier32(uint32_t);
13
extern
void
barrierw(
ot_word_t
);
14
15
extern
ct_bool32_t
ct_sltz32(int32_t);
16
extern
ct_bool32_t
ct_sltu32(uint32_t, uint32_t);
17
extern
ct_bool32_t
ct_sgeu32(uint32_t, uint32_t);
18
extern
ct_bool32_t
ct_seqz32(uint32_t);
19
extern
ct_bool32_t
ct_seq32(uint32_t, uint32_t);
20
extern
uint32_t ct_cmov32(
ct_bool32_t
, uint32_t, uint32_t);
21
22
extern
ct_boolw_t
ct_sltzw(ot_sword_t);
23
extern
ct_boolw_t
ct_sltuw(
ot_word_t
,
ot_word_t
);
24
extern
ct_boolw_t
ct_sgeuw(
ot_word_t
,
ot_word_t
);
25
extern
ct_boolw_t
ct_seqzw(
ot_word_t
);
26
extern
ct_boolw_t
ct_seqw(
ot_word_t
,
ot_word_t
);
27
extern
ot_word_t
ct_cmovw(
ct_boolw_t
,
ot_word_t
,
ot_word_t
);
sw
device
lib
base
hardened.c
Return to
OpenTitan Documentation