smccc.c (0594061ee6fbd63d428e70cab4c82171f87f7604) smccc.c (100a6d1905b1bb510020e6fe3a535ebf5fc395e8)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2018 Andrew Turner
5 *
6 * This software was developed by SRI International and the University of
7 * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
8 * ("CTSRD"), as part of the DARPA CRASH research programme.

--- 79 unchanged lines hidden (view full) ---

88{
89
90 KASSERT(smccc_version != SMCCC_VERSION_1_0,
91 ("SMCCC arch workaround 1 called with an invalid SMCCC interface"));
92 return (psci_call(SMCCC_ARCH_WORKAROUND_1, 0, 0, 0));
93}
94
95int
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2018 Andrew Turner
5 *
6 * This software was developed by SRI International and the University of
7 * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
8 * ("CTSRD"), as part of the DARPA CRASH research programme.

--- 79 unchanged lines hidden (view full) ---

88{
89
90 KASSERT(smccc_version != SMCCC_VERSION_1_0,
91 ("SMCCC arch workaround 1 called with an invalid SMCCC interface"));
92 return (psci_call(SMCCC_ARCH_WORKAROUND_1, 0, 0, 0));
93}
94
95int
96smccc_arch_workaround_2(bool enable)
96smccc_arch_workaround_2(int enable)
97{
98
99 KASSERT(smccc_version != SMCCC_VERSION_1_0,
100 ("SMCCC arch workaround 2 called with an invalid SMCCC interface"));
97{
98
99 KASSERT(smccc_version != SMCCC_VERSION_1_0,
100 ("SMCCC arch workaround 2 called with an invalid SMCCC interface"));
101 return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable ? 1 : 0, 0, 0));
101 return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable, 0, 0));
102}
102}