Software APIs
sw
device
silicon_creator
rom
rom_isrs.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
5
#ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_ROM_ISRS_H_
6
#define OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_ROM_ISRS_H_
7
8
#include <
stdnoreturn.h
>
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
// __cplusplus
13
14
/**
15
* Denotes functions that have to use the interrupt handler ABI.
16
*
17
* These must be 4-byte aligned. Note that they don't use the `interrupt`
18
* attribute since ROM handlers shut down the chip instead of returning like
19
* regular handlers.
20
*/
21
#define ROM_INTERRUPT_HANDLER_ABI __attribute__((aligned(4)))
22
23
/**
24
* Denotes functions that have to be near the interrupt vector, because they
25
* are jumped to from it.
26
*/
27
#define ROM_VECTOR_FUNCTION __attribute__((section(".rom_isrs"
)))
28
29
/**
30
* ROM hardware exception handler.
31
*/
32
ROM_VECTOR_FUNCTION
33
ROM_INTERRUPT_HANDLER_ABI
34
noreturn
void
rom_interrupt_handler(
void
);
35
36
#ifdef __cplusplus
37
}
// extern "C"
38
#endif
// __cplusplus
39
40
#endif
// OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_ROM_ISRS_H_
Return to
OpenTitan Documentation