| 1 |
/* |
| 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 |
|
| 17 |
/******************************************************************************* |
| 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 |
|
| 29 |
#endif /* PLAT_COMMON_H */ |