.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * PowerNV OPAL definitions. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2011 IBM Corp. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License |
---|
8 | | - * as published by the Free Software Foundation; either version |
---|
9 | | - * 2 of the License, or (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #ifndef _ASM_POWERPC_OPAL_H |
---|
.. | .. |
---|
43 | 39 | uint64_t PE_handle); |
---|
44 | 40 | int64_t opal_npu_tl_set(uint64_t phb_id, uint32_t bdfn, long cap, |
---|
45 | 41 | uint64_t rate_phys, uint32_t size); |
---|
| 42 | + |
---|
46 | 43 | int64_t opal_console_write(int64_t term_number, __be64 *length, |
---|
47 | 44 | const uint8_t *buffer); |
---|
48 | 45 | int64_t opal_console_read(int64_t term_number, __be64 *length, |
---|
.. | .. |
---|
203 | 200 | int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data); |
---|
204 | 201 | int64_t opal_sensor_read_u64(u32 sensor_hndl, int token, __be64 *sensor_data); |
---|
205 | 202 | int64_t opal_handle_hmi(void); |
---|
| 203 | +int64_t opal_handle_hmi2(__be64 *out_flags); |
---|
206 | 204 | int64_t opal_register_dump_region(uint32_t id, uint64_t start, uint64_t end); |
---|
207 | 205 | int64_t opal_unregister_dump_region(uint32_t id); |
---|
208 | 206 | int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val); |
---|
.. | .. |
---|
279 | 277 | int64_t opal_xive_free_irq(uint32_t girq); |
---|
280 | 278 | int64_t opal_xive_sync(uint32_t type, uint32_t id); |
---|
281 | 279 | int64_t opal_xive_dump(uint32_t type, uint32_t id); |
---|
282 | | -int64_t opal_pci_set_p2p(uint64_t phb_init, uint64_t phb_target, |
---|
283 | | - uint64_t desc, uint16_t pe_number); |
---|
| 280 | +int64_t opal_xive_get_queue_state(uint64_t vp, uint32_t prio, |
---|
| 281 | + __be32 *out_qtoggle, |
---|
| 282 | + __be32 *out_qindex); |
---|
| 283 | +int64_t opal_xive_set_queue_state(uint64_t vp, uint32_t prio, |
---|
| 284 | + uint32_t qtoggle, |
---|
| 285 | + uint32_t qindex); |
---|
| 286 | +int64_t opal_xive_get_vp_state(uint64_t vp, __be64 *out_w01); |
---|
284 | 287 | |
---|
285 | 288 | int64_t opal_imc_counters_init(uint32_t type, uint64_t address, |
---|
286 | 289 | uint64_t cpu_pir); |
---|
.. | .. |
---|
294 | 297 | int opal_sensor_group_clear(u32 group_hndl, int token); |
---|
295 | 298 | int opal_sensor_group_enable(u32 group_hndl, int token, bool enable); |
---|
296 | 299 | int opal_nx_coproc_init(uint32_t chip_id, uint32_t ct); |
---|
| 300 | + |
---|
| 301 | +int opal_secvar_get(const char *key, uint64_t key_len, u8 *data, |
---|
| 302 | + uint64_t *data_size); |
---|
| 303 | +int opal_secvar_get_next(const char *key, uint64_t *key_len, |
---|
| 304 | + uint64_t key_buf_size); |
---|
| 305 | +int opal_secvar_enqueue_update(const char *key, uint64_t key_len, u8 *data, |
---|
| 306 | + uint64_t data_size); |
---|
| 307 | + |
---|
| 308 | +s64 opal_mpipl_update(enum opal_mpipl_ops op, u64 src, u64 dest, u64 size); |
---|
| 309 | +s64 opal_mpipl_register_tag(enum opal_mpipl_tags tag, u64 addr); |
---|
| 310 | +s64 opal_mpipl_query_tag(enum opal_mpipl_tags tag, u64 *addr); |
---|
297 | 311 | |
---|
298 | 312 | s64 opal_signal_system_reset(s32 cpu); |
---|
299 | 313 | s64 opal_quiesce(u64 shutdown_type, s32 cpu); |
---|
.. | .. |
---|
347 | 361 | extern int opal_sensor_init(void); |
---|
348 | 362 | extern int opal_hmi_handler_init(void); |
---|
349 | 363 | extern int opal_event_init(void); |
---|
| 364 | +int opal_power_control_init(void); |
---|
350 | 365 | |
---|
351 | 366 | extern int opal_machine_check(struct pt_regs *regs); |
---|
352 | 367 | extern bool opal_mce_check_early_recovery(struct pt_regs *regs); |
---|
353 | 368 | extern int opal_hmi_exception_early(struct pt_regs *regs); |
---|
| 369 | +extern int opal_hmi_exception_early2(struct pt_regs *regs); |
---|
354 | 370 | extern int opal_handle_hmi_exception(struct pt_regs *regs); |
---|
355 | 371 | |
---|
356 | 372 | extern void opal_shutdown(void); |
---|