hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/powerpc/include/asm/opal.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * PowerNV OPAL definitions.
34 *
45 * 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.
106 */
117
128 #ifndef _ASM_POWERPC_OPAL_H
....@@ -43,6 +39,7 @@
4339 uint64_t PE_handle);
4440 int64_t opal_npu_tl_set(uint64_t phb_id, uint32_t bdfn, long cap,
4541 uint64_t rate_phys, uint32_t size);
42
+
4643 int64_t opal_console_write(int64_t term_number, __be64 *length,
4744 const uint8_t *buffer);
4845 int64_t opal_console_read(int64_t term_number, __be64 *length,
....@@ -203,6 +200,7 @@
203200 int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data);
204201 int64_t opal_sensor_read_u64(u32 sensor_hndl, int token, __be64 *sensor_data);
205202 int64_t opal_handle_hmi(void);
203
+int64_t opal_handle_hmi2(__be64 *out_flags);
206204 int64_t opal_register_dump_region(uint32_t id, uint64_t start, uint64_t end);
207205 int64_t opal_unregister_dump_region(uint32_t id);
208206 int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val);
....@@ -279,8 +277,13 @@
279277 int64_t opal_xive_free_irq(uint32_t girq);
280278 int64_t opal_xive_sync(uint32_t type, uint32_t id);
281279 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);
284287
285288 int64_t opal_imc_counters_init(uint32_t type, uint64_t address,
286289 uint64_t cpu_pir);
....@@ -294,6 +297,17 @@
294297 int opal_sensor_group_clear(u32 group_hndl, int token);
295298 int opal_sensor_group_enable(u32 group_hndl, int token, bool enable);
296299 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);
297311
298312 s64 opal_signal_system_reset(s32 cpu);
299313 s64 opal_quiesce(u64 shutdown_type, s32 cpu);
....@@ -347,10 +361,12 @@
347361 extern int opal_sensor_init(void);
348362 extern int opal_hmi_handler_init(void);
349363 extern int opal_event_init(void);
364
+int opal_power_control_init(void);
350365
351366 extern int opal_machine_check(struct pt_regs *regs);
352367 extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
353368 extern int opal_hmi_exception_early(struct pt_regs *regs);
369
+extern int opal_hmi_exception_early2(struct pt_regs *regs);
354370 extern int opal_handle_hmi_exception(struct pt_regs *regs);
355371
356372 extern void opal_shutdown(void);