blob: 2958868fc2220963cbfcae716ad48918f5c84aaa [file] [log] [blame]
Akshay Belsare5303e3f2023-05-12 14:28:05 +05301/*
2 * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/* Header file to contain common macros across different platforms */
8#ifndef PLAT_COMMON_H
9#define PLAT_COMMON_H
10
11#define __bf_shf(x) (__builtin_ffsll(x) - 1U)
12#define FIELD_GET(_mask, _reg) \
13 ({ \
14 (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
15 })
16
Jay Buddhabhatti1dfe4972023-04-25 04:34:51 -070017/*******************************************************************************
18 * interrupt handling related constants
19 ******************************************************************************/
20#define ARM_IRQ_SEC_SGI_0 8U
21#define ARM_IRQ_SEC_SGI_1 9U
22#define ARM_IRQ_SEC_SGI_2 10U
23#define ARM_IRQ_SEC_SGI_3 11U
24#define ARM_IRQ_SEC_SGI_4 12U
25#define ARM_IRQ_SEC_SGI_5 13U
26#define ARM_IRQ_SEC_SGI_6 14U
27#define ARM_IRQ_SEC_SGI_7 15U
28
Akshay Belsare5303e3f2023-05-12 14:28:05 +053029#endif /* PLAT_COMMON_H */