mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00

On receiving CPU power down callback, TF-A raises SGI interrupt to all active cores to power down each active cores. Add handler for this SGI IRQ. By default TF-A uses SGI 6 for CPU power down request. This can be configurable through CPU_PWRDWN_SGI build flag. e.g., If user wants to use SGI 7 instead of SGI 6 then provide build flag CPU_PWRDWN_SGI=7 Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Change-Id: Id0df32187d1de3f0af4486eb4d4930cb3ab01dbd
29 lines
881 B
C
29 lines
881 B
C
/*
|
|
* Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/* Header file to contain common macros across different platforms */
|
|
#ifndef PLAT_COMMON_H
|
|
#define PLAT_COMMON_H
|
|
|
|
#define __bf_shf(x) (__builtin_ffsll(x) - 1U)
|
|
#define FIELD_GET(_mask, _reg) \
|
|
({ \
|
|
(typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
|
|
})
|
|
|
|
/*******************************************************************************
|
|
* interrupt handling related constants
|
|
******************************************************************************/
|
|
#define ARM_IRQ_SEC_SGI_0 8U
|
|
#define ARM_IRQ_SEC_SGI_1 9U
|
|
#define ARM_IRQ_SEC_SGI_2 10U
|
|
#define ARM_IRQ_SEC_SGI_3 11U
|
|
#define ARM_IRQ_SEC_SGI_4 12U
|
|
#define ARM_IRQ_SEC_SGI_5 13U
|
|
#define ARM_IRQ_SEC_SGI_6 14U
|
|
#define ARM_IRQ_SEC_SGI_7 15U
|
|
|
|
#endif /* PLAT_COMMON_H */
|