Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: psci.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* ARM Power State and Coordination Interface (PSCI) header
[2] Fix | Delete
*
[3] Fix | Delete
* This header holds common PSCI defines and macros shared
[4] Fix | Delete
* by: ARM kernel, ARM64 kernel, KVM ARM/ARM64 and user space.
[5] Fix | Delete
*
[6] Fix | Delete
* Copyright (C) 2014 Linaro Ltd.
[7] Fix | Delete
* Author: Anup Patel <anup.patel@linaro.org>
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef _LINUX_PSCI_H
[11] Fix | Delete
#define _LINUX_PSCI_H
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* PSCI v0.1 interface
[15] Fix | Delete
*
[16] Fix | Delete
* The PSCI v0.1 function numbers are implementation defined.
[17] Fix | Delete
*
[18] Fix | Delete
* Only PSCI return values such as: SUCCESS, NOT_SUPPORTED,
[19] Fix | Delete
* INVALID_PARAMS, and DENIED defined below are applicable
[20] Fix | Delete
* to PSCI v0.1.
[21] Fix | Delete
*/
[22] Fix | Delete
[23] Fix | Delete
/* PSCI v0.2 interface */
[24] Fix | Delete
#define PSCI_0_2_FN_BASE 0x84000000
[25] Fix | Delete
#define PSCI_0_2_FN(n) (PSCI_0_2_FN_BASE + (n))
[26] Fix | Delete
#define PSCI_0_2_64BIT 0x40000000
[27] Fix | Delete
#define PSCI_0_2_FN64_BASE \
[28] Fix | Delete
(PSCI_0_2_FN_BASE + PSCI_0_2_64BIT)
[29] Fix | Delete
#define PSCI_0_2_FN64(n) (PSCI_0_2_FN64_BASE + (n))
[30] Fix | Delete
[31] Fix | Delete
#define PSCI_0_2_FN_PSCI_VERSION PSCI_0_2_FN(0)
[32] Fix | Delete
#define PSCI_0_2_FN_CPU_SUSPEND PSCI_0_2_FN(1)
[33] Fix | Delete
#define PSCI_0_2_FN_CPU_OFF PSCI_0_2_FN(2)
[34] Fix | Delete
#define PSCI_0_2_FN_CPU_ON PSCI_0_2_FN(3)
[35] Fix | Delete
#define PSCI_0_2_FN_AFFINITY_INFO PSCI_0_2_FN(4)
[36] Fix | Delete
#define PSCI_0_2_FN_MIGRATE PSCI_0_2_FN(5)
[37] Fix | Delete
#define PSCI_0_2_FN_MIGRATE_INFO_TYPE PSCI_0_2_FN(6)
[38] Fix | Delete
#define PSCI_0_2_FN_MIGRATE_INFO_UP_CPU PSCI_0_2_FN(7)
[39] Fix | Delete
#define PSCI_0_2_FN_SYSTEM_OFF PSCI_0_2_FN(8)
[40] Fix | Delete
#define PSCI_0_2_FN_SYSTEM_RESET PSCI_0_2_FN(9)
[41] Fix | Delete
[42] Fix | Delete
#define PSCI_0_2_FN64_CPU_SUSPEND PSCI_0_2_FN64(1)
[43] Fix | Delete
#define PSCI_0_2_FN64_CPU_ON PSCI_0_2_FN64(3)
[44] Fix | Delete
#define PSCI_0_2_FN64_AFFINITY_INFO PSCI_0_2_FN64(4)
[45] Fix | Delete
#define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5)
[46] Fix | Delete
#define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7)
[47] Fix | Delete
[48] Fix | Delete
#define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10)
[49] Fix | Delete
#define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14)
[50] Fix | Delete
#define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15)
[51] Fix | Delete
#define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18)
[52] Fix | Delete
[53] Fix | Delete
#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14)
[54] Fix | Delete
#define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18)
[55] Fix | Delete
[56] Fix | Delete
/* PSCI v0.2 power state encoding for CPU_SUSPEND function */
[57] Fix | Delete
#define PSCI_0_2_POWER_STATE_ID_MASK 0xffff
[58] Fix | Delete
#define PSCI_0_2_POWER_STATE_ID_SHIFT 0
[59] Fix | Delete
#define PSCI_0_2_POWER_STATE_TYPE_SHIFT 16
[60] Fix | Delete
#define PSCI_0_2_POWER_STATE_TYPE_MASK \
[61] Fix | Delete
(0x1 << PSCI_0_2_POWER_STATE_TYPE_SHIFT)
[62] Fix | Delete
#define PSCI_0_2_POWER_STATE_AFFL_SHIFT 24
[63] Fix | Delete
#define PSCI_0_2_POWER_STATE_AFFL_MASK \
[64] Fix | Delete
(0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT)
[65] Fix | Delete
[66] Fix | Delete
/* PSCI extended power state encoding for CPU_SUSPEND function */
[67] Fix | Delete
#define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff
[68] Fix | Delete
#define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0
[69] Fix | Delete
#define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30
[70] Fix | Delete
#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \
[71] Fix | Delete
(0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT)
[72] Fix | Delete
[73] Fix | Delete
/* PSCI v0.2 affinity level state returned by AFFINITY_INFO */
[74] Fix | Delete
#define PSCI_0_2_AFFINITY_LEVEL_ON 0
[75] Fix | Delete
#define PSCI_0_2_AFFINITY_LEVEL_OFF 1
[76] Fix | Delete
#define PSCI_0_2_AFFINITY_LEVEL_ON_PENDING 2
[77] Fix | Delete
[78] Fix | Delete
/* PSCI v0.2 multicore support in Trusted OS returned by MIGRATE_INFO_TYPE */
[79] Fix | Delete
#define PSCI_0_2_TOS_UP_MIGRATE 0
[80] Fix | Delete
#define PSCI_0_2_TOS_UP_NO_MIGRATE 1
[81] Fix | Delete
#define PSCI_0_2_TOS_MP 2
[82] Fix | Delete
[83] Fix | Delete
/* PSCI version decoding (independent of PSCI version) */
[84] Fix | Delete
#define PSCI_VERSION_MAJOR_SHIFT 16
[85] Fix | Delete
#define PSCI_VERSION_MINOR_MASK \
[86] Fix | Delete
((1U << PSCI_VERSION_MAJOR_SHIFT) - 1)
[87] Fix | Delete
#define PSCI_VERSION_MAJOR_MASK ~PSCI_VERSION_MINOR_MASK
[88] Fix | Delete
#define PSCI_VERSION_MAJOR(ver) \
[89] Fix | Delete
(((ver) & PSCI_VERSION_MAJOR_MASK) >> PSCI_VERSION_MAJOR_SHIFT)
[90] Fix | Delete
#define PSCI_VERSION_MINOR(ver) \
[91] Fix | Delete
((ver) & PSCI_VERSION_MINOR_MASK)
[92] Fix | Delete
#define PSCI_VERSION(maj, min) \
[93] Fix | Delete
((((maj) << PSCI_VERSION_MAJOR_SHIFT) & PSCI_VERSION_MAJOR_MASK) | \
[94] Fix | Delete
((min) & PSCI_VERSION_MINOR_MASK))
[95] Fix | Delete
[96] Fix | Delete
/* PSCI features decoding (>=1.0) */
[97] Fix | Delete
#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1
[98] Fix | Delete
#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \
[99] Fix | Delete
(0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
[100] Fix | Delete
[101] Fix | Delete
#define PSCI_1_0_OS_INITIATED BIT(0)
[102] Fix | Delete
#define PSCI_1_0_SUSPEND_MODE_PC 0
[103] Fix | Delete
#define PSCI_1_0_SUSPEND_MODE_OSI 1
[104] Fix | Delete
[105] Fix | Delete
/* PSCI return values (inclusive of all PSCI versions) */
[106] Fix | Delete
#define PSCI_RET_SUCCESS 0
[107] Fix | Delete
#define PSCI_RET_NOT_SUPPORTED -1
[108] Fix | Delete
#define PSCI_RET_INVALID_PARAMS -2
[109] Fix | Delete
#define PSCI_RET_DENIED -3
[110] Fix | Delete
#define PSCI_RET_ALREADY_ON -4
[111] Fix | Delete
#define PSCI_RET_ON_PENDING -5
[112] Fix | Delete
#define PSCI_RET_INTERNAL_FAILURE -6
[113] Fix | Delete
#define PSCI_RET_NOT_PRESENT -7
[114] Fix | Delete
#define PSCI_RET_DISABLED -8
[115] Fix | Delete
#define PSCI_RET_INVALID_ADDRESS -9
[116] Fix | Delete
[117] Fix | Delete
#endif /* _LINUX_PSCI_H */
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function