114a43e69SBenjamin Herrenschmidt/*
214a43e69SBenjamin Herrenschmidt * PowerNV OPAL API wrappers
314a43e69SBenjamin Herrenschmidt *
414a43e69SBenjamin Herrenschmidt * Copyright 2011 IBM Corp.
514a43e69SBenjamin Herrenschmidt *
614a43e69SBenjamin Herrenschmidt * This program is free software; you can redistribute it and/or
714a43e69SBenjamin Herrenschmidt * modify it under the terms of the GNU General Public License
814a43e69SBenjamin Herrenschmidt * as published by the Free Software Foundation; either version
914a43e69SBenjamin Herrenschmidt * 2 of the License, or (at your option) any later version.
1014a43e69SBenjamin Herrenschmidt */
1114a43e69SBenjamin Herrenschmidt
1258995a9aSAnton Blanchard#include <linux/jump_label.h>
1314a43e69SBenjamin Herrenschmidt#include <asm/ppc_asm.h>
1414a43e69SBenjamin Herrenschmidt#include <asm/hvcall.h>
1514a43e69SBenjamin Herrenschmidt#include <asm/asm-offsets.h>
1614a43e69SBenjamin Herrenschmidt#include <asm/opal.h>
17c49f6353SAnton Blanchard
18c49f6353SAnton Blanchard	.section	".text"
19c49f6353SAnton Blanchard
20c49f6353SAnton Blanchard#ifdef CONFIG_TRACEPOINTS
211bc9e47aSAnton Blanchard#ifdef HAVE_JUMP_LABEL
22c49f6353SAnton Blanchard#define OPAL_BRANCH(LABEL)					\
23c49f6353SAnton Blanchard	ARCH_STATIC_BRANCH(LABEL, opal_tracepoint_key)
24c49f6353SAnton Blanchard#else
25c49f6353SAnton Blanchard
26c49f6353SAnton Blanchard	.section	".toc","aw"
27c49f6353SAnton Blanchard
28c49f6353SAnton Blanchard	.globl opal_tracepoint_refcount
29c49f6353SAnton Blanchardopal_tracepoint_refcount:
30c49f6353SAnton Blanchard	.llong	0
31c49f6353SAnton Blanchard
32c49f6353SAnton Blanchard	.section	".text"
33c49f6353SAnton Blanchard
34c49f6353SAnton Blanchard/*
35c49f6353SAnton Blanchard * We branch around this in early init by using an unconditional cpu
36c49f6353SAnton Blanchard * feature.
37c49f6353SAnton Blanchard */
38c49f6353SAnton Blanchard#define OPAL_BRANCH(LABEL)					\
39c49f6353SAnton BlanchardBEGIN_FTR_SECTION;						\
40c49f6353SAnton Blanchard	b	1f;						\
41c49f6353SAnton BlanchardEND_FTR_SECTION(0, 1);						\
422a9c4f40SAlexey Kardashevskiy	ld	r11,opal_tracepoint_refcount@toc(r2);		\
432a9c4f40SAlexey Kardashevskiy	cmpdi	r11,0;						\
44c49f6353SAnton Blanchard	bne-	LABEL;						\
45c49f6353SAnton Blanchard1:
46c49f6353SAnton Blanchard
47c49f6353SAnton Blanchard#endif
48c49f6353SAnton Blanchard
49c49f6353SAnton Blanchard#else
50c49f6353SAnton Blanchard#define OPAL_BRANCH(LABEL)
51c49f6353SAnton Blanchard#endif
5214a43e69SBenjamin Herrenschmidt
53c3a08e93SOliver O'Halloran/*
54c3a08e93SOliver O'Halloran * DO_OPAL_CALL assumes:
55c3a08e93SOliver O'Halloran * r0  = opal call token
56c3a08e93SOliver O'Halloran * r12 = msr
57c3a08e93SOliver O'Halloran * LR has been saved
5814a43e69SBenjamin Herrenschmidt */
59c3a08e93SOliver O'Halloran#define DO_OPAL_CALL()			\
60ab9bad0eSBenjamin Herrenschmidt	mfcr	r11;			\
61ab9bad0eSBenjamin Herrenschmidt	stw	r11,8(r1);		\
62c49f6353SAnton Blanchard	li	r11,0;			\
63c49f6353SAnton Blanchard	ori	r11,r11,MSR_EE;		\
6414a43e69SBenjamin Herrenschmidt	std	r12,PACASAVEDMSR(r13);	\
65c49f6353SAnton Blanchard	andc	r12,r12,r11;		\
6614a43e69SBenjamin Herrenschmidt	mtmsrd	r12,1;			\
67c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal_return);	\
68c49f6353SAnton Blanchard	mtlr	r11;			\
69c49f6353SAnton Blanchard	li	r11,MSR_DR|MSR_IR|MSR_LE;\
70c49f6353SAnton Blanchard	andc	r12,r12,r11;		\
7114a43e69SBenjamin Herrenschmidt	mtspr	SPRN_HSRR1,r12;		\
7214a43e69SBenjamin Herrenschmidt	LOAD_REG_ADDR(r11,opal);	\
7314a43e69SBenjamin Herrenschmidt	ld	r12,8(r11);		\
7414a43e69SBenjamin Herrenschmidt	ld	r2,0(r11);		\
7514a43e69SBenjamin Herrenschmidt	mtspr	SPRN_HSRR0,r12;		\
7614a43e69SBenjamin Herrenschmidt	hrfid
7714a43e69SBenjamin Herrenschmidt
78c3a08e93SOliver O'Halloran#define OPAL_CALL(name, token)		\
79c3a08e93SOliver O'Halloran _GLOBAL_TOC(name);			\
80c3a08e93SOliver O'Halloran	mfmsr	r12;			\
81c3a08e93SOliver O'Halloran	mflr	r0;			\
82c3a08e93SOliver O'Halloran	andi.	r11,r12,MSR_IR|MSR_DR; 	\
83c3a08e93SOliver O'Halloran	std	r0,PPC_LR_STKOFF(r1);	\
84c3a08e93SOliver O'Halloran	li	r0,token;		\
85c3a08e93SOliver O'Halloran	beq	opal_real_call;         \
86c3a08e93SOliver O'Halloran	OPAL_BRANCH(opal_tracepoint_entry) \
87c3a08e93SOliver O'Halloran	DO_OPAL_CALL()
88c3a08e93SOliver O'Halloran
89c3a08e93SOliver O'Halloran
90ad0289e4SAnton Blanchardopal_return:
91be401b37SBenjamin Herrenschmidt	/*
92be401b37SBenjamin Herrenschmidt	 * Fixup endian on OPAL return... we should be able to simplify
93be401b37SBenjamin Herrenschmidt	 * this by instead converting the below trampoline to a set of
94be401b37SBenjamin Herrenschmidt	 * bytes (always BE) since MSR:LE will end up fixed up as a side
95be401b37SBenjamin Herrenschmidt	 * effect of the rfid.
96be401b37SBenjamin Herrenschmidt	 */
97be401b37SBenjamin Herrenschmidt	FIXUP_ENDIAN
9814a43e69SBenjamin Herrenschmidt	ld	r2,PACATOC(r13);
99bbe30b3bSAnton Blanchard	lwz	r4,8(r1);
10069c592edSBenjamin Herrenschmidt	ld	r5,PPC_LR_STKOFF(r1);
10114a43e69SBenjamin Herrenschmidt	ld	r6,PACASAVEDMSR(r13);
10214a43e69SBenjamin Herrenschmidt	mtspr	SPRN_SRR0,r5;
10314a43e69SBenjamin Herrenschmidt	mtspr	SPRN_SRR1,r6;
10414a43e69SBenjamin Herrenschmidt	mtcr	r4;
10514a43e69SBenjamin Herrenschmidt	rfid
10614a43e69SBenjamin Herrenschmidt
107ab9bad0eSBenjamin Herrenschmidtopal_real_call:
108ab9bad0eSBenjamin Herrenschmidt	mfcr	r11
109ab9bad0eSBenjamin Herrenschmidt	stw	r11,8(r1)
110ab9bad0eSBenjamin Herrenschmidt	/* Set opal return address */
111ab9bad0eSBenjamin Herrenschmidt	LOAD_REG_ADDR(r11, opal_return_realmode)
112ab9bad0eSBenjamin Herrenschmidt	mtlr	r11
113ab9bad0eSBenjamin Herrenschmidt	li	r11,MSR_LE
114ab9bad0eSBenjamin Herrenschmidt	andc	r12,r12,r11
115ab9bad0eSBenjamin Herrenschmidt	mtspr	SPRN_HSRR1,r12
116ab9bad0eSBenjamin Herrenschmidt	LOAD_REG_ADDR(r11,opal)
117ab9bad0eSBenjamin Herrenschmidt	ld	r12,8(r11)
118ab9bad0eSBenjamin Herrenschmidt	ld	r2,0(r11)
119ab9bad0eSBenjamin Herrenschmidt	mtspr	SPRN_HSRR0,r12
120ab9bad0eSBenjamin Herrenschmidt	hrfid
121ab9bad0eSBenjamin Herrenschmidt
122ab9bad0eSBenjamin Herrenschmidtopal_return_realmode:
123ab9bad0eSBenjamin Herrenschmidt	FIXUP_ENDIAN
124ab9bad0eSBenjamin Herrenschmidt	ld	r2,PACATOC(r13);
125ab9bad0eSBenjamin Herrenschmidt	lwz	r11,8(r1);
126ab9bad0eSBenjamin Herrenschmidt	ld	r12,PPC_LR_STKOFF(r1)
127ab9bad0eSBenjamin Herrenschmidt	mtcr	r11;
128ab9bad0eSBenjamin Herrenschmidt	mtlr	r12
129ab9bad0eSBenjamin Herrenschmidt	blr
130ab9bad0eSBenjamin Herrenschmidt
131c49f6353SAnton Blanchard#ifdef CONFIG_TRACEPOINTS
132c49f6353SAnton Blanchardopal_tracepoint_entry:
133c49f6353SAnton Blanchard	stdu	r1,-STACKFRAMESIZE(r1)
134c49f6353SAnton Blanchard	std	r0,STK_REG(R23)(r1)
135c49f6353SAnton Blanchard	std	r3,STK_REG(R24)(r1)
136c49f6353SAnton Blanchard	std	r4,STK_REG(R25)(r1)
137c49f6353SAnton Blanchard	std	r5,STK_REG(R26)(r1)
138c49f6353SAnton Blanchard	std	r6,STK_REG(R27)(r1)
139c49f6353SAnton Blanchard	std	r7,STK_REG(R28)(r1)
140c49f6353SAnton Blanchard	std	r8,STK_REG(R29)(r1)
141c49f6353SAnton Blanchard	std	r9,STK_REG(R30)(r1)
142c49f6353SAnton Blanchard	std	r10,STK_REG(R31)(r1)
143c49f6353SAnton Blanchard	mr	r3,r0
144c49f6353SAnton Blanchard	addi	r4,r1,STK_REG(R24)
145c49f6353SAnton Blanchard	bl	__trace_opal_entry
146c49f6353SAnton Blanchard	ld	r0,STK_REG(R23)(r1)
147c49f6353SAnton Blanchard	ld	r3,STK_REG(R24)(r1)
148c49f6353SAnton Blanchard	ld	r4,STK_REG(R25)(r1)
149c49f6353SAnton Blanchard	ld	r5,STK_REG(R26)(r1)
150c49f6353SAnton Blanchard	ld	r6,STK_REG(R27)(r1)
151c49f6353SAnton Blanchard	ld	r7,STK_REG(R28)(r1)
152c49f6353SAnton Blanchard	ld	r8,STK_REG(R29)(r1)
153c49f6353SAnton Blanchard	ld	r9,STK_REG(R30)(r1)
154c49f6353SAnton Blanchard	ld	r10,STK_REG(R31)(r1)
155c3a08e93SOliver O'Halloran
156c3a08e93SOliver O'Halloran	/* setup LR so we return via tracepoint_return */
157c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal_tracepoint_return)
158c49f6353SAnton Blanchard	std	r11,16(r1)
159c3a08e93SOliver O'Halloran
160c49f6353SAnton Blanchard	mfmsr	r12
161c3a08e93SOliver O'Halloran	DO_OPAL_CALL()
162c49f6353SAnton Blanchard
163c49f6353SAnton Blanchardopal_tracepoint_return:
164c49f6353SAnton Blanchard	std	r3,STK_REG(R31)(r1)
165c49f6353SAnton Blanchard	mr	r4,r3
166a7e0fb6cSMichael Ellerman	ld	r3,STK_REG(R23)(r1)
167c49f6353SAnton Blanchard	bl	__trace_opal_exit
168c49f6353SAnton Blanchard	ld	r3,STK_REG(R31)(r1)
169c49f6353SAnton Blanchard	addi	r1,r1,STACKFRAMESIZE
170c49f6353SAnton Blanchard	ld	r0,16(r1)
171c49f6353SAnton Blanchard	mtlr	r0
172c49f6353SAnton Blanchard	blr
173c49f6353SAnton Blanchard#endif
174c49f6353SAnton Blanchard
17569c592edSBenjamin Herrenschmidt
176e28b05e7SJoel StanleyOPAL_CALL(opal_invalid_call,			OPAL_INVALID_CALL);
17714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_write,			OPAL_CONSOLE_WRITE);
17814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_read,			OPAL_CONSOLE_READ);
17914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_write_buffer_space,	OPAL_CONSOLE_WRITE_BUFFER_SPACE);
18014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_rtc_read,			OPAL_RTC_READ);
18114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_rtc_write,			OPAL_RTC_WRITE);
18214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_cec_power_down,			OPAL_CEC_POWER_DOWN);
18314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_cec_reboot,			OPAL_CEC_REBOOT);
184e784b649SMahesh SalgaonkarOPAL_CALL(opal_cec_reboot2,			OPAL_CEC_REBOOT2);
18514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_read_nvram,			OPAL_READ_NVRAM);
18614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_write_nvram,			OPAL_WRITE_NVRAM);
18714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_handle_interrupt,		OPAL_HANDLE_INTERRUPT);
18814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_poll_events,			OPAL_POLL_EVENTS);
18914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_hub_tce_memory,		OPAL_PCI_SET_HUB_TCE_MEMORY);
19014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_tce_memory,		OPAL_PCI_SET_PHB_TCE_MEMORY);
19114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_byte,		OPAL_PCI_CONFIG_READ_BYTE);
19214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_half_word,	OPAL_PCI_CONFIG_READ_HALF_WORD);
19314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_word,		OPAL_PCI_CONFIG_READ_WORD);
19414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_byte,		OPAL_PCI_CONFIG_WRITE_BYTE);
19514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_half_word,	OPAL_PCI_CONFIG_WRITE_HALF_WORD);
19614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_word,		OPAL_PCI_CONFIG_WRITE_WORD);
19714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_set_xive,			OPAL_SET_XIVE);
19814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_xive,			OPAL_GET_XIVE);
19914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_register_exception_handler,	OPAL_REGISTER_OPAL_EXCEPTION_HANDLER);
20014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_eeh_freeze_status,		OPAL_PCI_EEH_FREEZE_STATUS);
20114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_eeh_freeze_clear,		OPAL_PCI_EEH_FREEZE_CLEAR);
2025ca27efbSGavin ShanOPAL_CALL(opal_pci_eeh_freeze_set,		OPAL_PCI_EEH_FREEZE_SET);
2035b642340SGavin ShanOPAL_CALL(opal_pci_err_inject,			OPAL_PCI_ERR_INJECT);
20414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_shpc,			OPAL_PCI_SHPC);
20514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_phb_mmio_enable,		OPAL_PCI_PHB_MMIO_ENABLE);
20614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_mem_window,		OPAL_PCI_SET_PHB_MEM_WINDOW);
20714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_mmio_window,		OPAL_PCI_MAP_PE_MMIO_WINDOW);
20814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_table_memory,	OPAL_PCI_SET_PHB_TABLE_MEMORY);
20914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_pe,			OPAL_PCI_SET_PE);
21014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_peltv,			OPAL_PCI_SET_PELTV);
21114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_mve,			OPAL_PCI_SET_MVE);
21214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_mve_enable,		OPAL_PCI_SET_MVE_ENABLE);
21314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_xive_reissue,		OPAL_PCI_GET_XIVE_REISSUE);
21414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_xive_reissue,		OPAL_PCI_SET_XIVE_REISSUE);
21514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_xive_pe,			OPAL_PCI_SET_XIVE_PE);
21614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_xive_source,			OPAL_GET_XIVE_SOURCE);
21714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_msi_32,			OPAL_GET_MSI_32);
21814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_msi_64,			OPAL_GET_MSI_64);
21914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_start_cpu,			OPAL_START_CPU);
22014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_query_cpu_status,		OPAL_QUERY_CPU_STATUS);
22114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_write_oppanel,			OPAL_WRITE_OPPANEL);
22214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_dma_window,		OPAL_PCI_MAP_PE_DMA_WINDOW);
22314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_dma_window_real,	OPAL_PCI_MAP_PE_DMA_WINDOW_REAL);
22414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_reset,			OPAL_PCI_RESET);
225f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_hub_diag_data,		OPAL_PCI_GET_HUB_DIAG_DATA);
226f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_phb_diag_data,		OPAL_PCI_GET_PHB_DIAG_DATA);
227f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_fence_phb,			OPAL_PCI_FENCE_PHB);
228f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_reinit,			OPAL_PCI_REINIT);
229f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_mask_pe_error,		OPAL_PCI_MASK_PE_ERROR);
230f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_set_slot_led_status,		OPAL_SET_SLOT_LED_STATUS);
231f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_get_epow_status,			OPAL_GET_EPOW_STATUS);
2323b476aadSVipin K ParasharOPAL_CALL(opal_get_dpo_status,			OPAL_GET_DPO_STATUS);
233f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_set_system_attention_led,	OPAL_SET_SYSTEM_ATTENTION_LED);
23423773230SGavin ShanOPAL_CALL(opal_pci_next_error,			OPAL_PCI_NEXT_ERROR);
23523773230SGavin ShanOPAL_CALL(opal_pci_poll,			OPAL_PCI_POLL);
236137436c9SGavin ShanOPAL_CALL(opal_pci_msi_eoi,			OPAL_PCI_MSI_EOI);
23723773230SGavin ShanOPAL_CALL(opal_pci_get_phb_diag_data2,		OPAL_PCI_GET_PHB_DIAG_DATA2);
238cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_xscom_read,			OPAL_XSCOM_READ);
239cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_xscom_write,			OPAL_XSCOM_WRITE);
240cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_lpc_read,			OPAL_LPC_READ);
241cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_lpc_write,			OPAL_LPC_WRITE);
24213906db6SBenjamin HerrenschmidtOPAL_CALL(opal_return_cpu,			OPAL_RETURN_CPU);
2434926616cSBenjamin HerrenschmidtOPAL_CALL(opal_reinit_cpus,			OPAL_REINIT_CPUS);
244774fea1aSStewart SmithOPAL_CALL(opal_read_elog,			OPAL_ELOG_READ);
245774fea1aSStewart SmithOPAL_CALL(opal_send_ack_elog,			OPAL_ELOG_ACK);
246774fea1aSStewart SmithOPAL_CALL(opal_get_elog_size,			OPAL_ELOG_SIZE);
247774fea1aSStewart SmithOPAL_CALL(opal_resend_pending_logs,		OPAL_ELOG_RESEND);
248774fea1aSStewart SmithOPAL_CALL(opal_write_elog,			OPAL_ELOG_WRITE);
24950bd6153SVasant HegdeOPAL_CALL(opal_validate_flash,			OPAL_FLASH_VALIDATE);
25050bd6153SVasant HegdeOPAL_CALL(opal_manage_flash,			OPAL_FLASH_MANAGE);
25150bd6153SVasant HegdeOPAL_CALL(opal_update_flash,			OPAL_FLASH_UPDATE);
25297eb001fSVaidyanathan SrinivasanOPAL_CALL(opal_resync_timebase,			OPAL_RESYNC_TIMEBASE);
253bffe6bdaSMichael NeulingOPAL_CALL(opal_check_token,			OPAL_CHECK_TOKEN);
254c7e64b9cSStewart SmithOPAL_CALL(opal_dump_init,			OPAL_DUMP_INIT);
255c7e64b9cSStewart SmithOPAL_CALL(opal_dump_info,			OPAL_DUMP_INFO);
256c7e64b9cSStewart SmithOPAL_CALL(opal_dump_info2,			OPAL_DUMP_INFO2);
257c7e64b9cSStewart SmithOPAL_CALL(opal_dump_read,			OPAL_DUMP_READ);
258c7e64b9cSStewart SmithOPAL_CALL(opal_dump_ack,			OPAL_DUMP_ACK);
25924366360SMahesh SalgaonkarOPAL_CALL(opal_get_msg,				OPAL_GET_MSG);
26043a1dd9bSSuraj Jitindar SinghOPAL_CALL(opal_write_oppanel_async,		OPAL_WRITE_OPPANEL_ASYNC);
26124366360SMahesh SalgaonkarOPAL_CALL(opal_check_completion,		OPAL_CHECK_ASYNC_COMPLETION);
262c7e64b9cSStewart SmithOPAL_CALL(opal_dump_resend_notification,	OPAL_DUMP_RESEND);
263f7d98d18SVasant HegdeOPAL_CALL(opal_sync_host_reboot,		OPAL_SYNC_HOST_REBOOT);
2647224adbbSNeelesh GuptaOPAL_CALL(opal_sensor_read,			OPAL_SENSOR_READ);
2654029cd66SNeelesh GuptaOPAL_CALL(opal_get_param,			OPAL_GET_PARAM);
2664029cd66SNeelesh GuptaOPAL_CALL(opal_set_param,			OPAL_SET_PARAM);
2670ef95b41SMahesh SalgaonkarOPAL_CALL(opal_handle_hmi,			OPAL_HANDLE_HMI);
2685703d2f4SShreyas B. PrabhuOPAL_CALL(opal_config_cpu_idle_state,		OPAL_CONFIG_CPU_IDLE_STATE);
26977b54e9fSShreyas B. PrabhuOPAL_CALL(opal_slw_set_reg,			OPAL_SLW_SET_REG);
270b09c2ec4SVasant HegdeOPAL_CALL(opal_register_dump_region,		OPAL_REGISTER_DUMP_REGION);
271b09c2ec4SVasant HegdeOPAL_CALL(opal_unregister_dump_region,		OPAL_UNREGISTER_DUMP_REGION);
272d7cf83fcSMichael EllermanOPAL_CALL(opal_pci_set_phb_cxl_mode,		OPAL_PCI_SET_PHB_CAPI_MODE);
27316b1d26eSNeelesh GuptaOPAL_CALL(opal_tpo_write,			OPAL_WRITE_TPO);
27416b1d26eSNeelesh GuptaOPAL_CALL(opal_tpo_read,			OPAL_READ_TPO);
275608b286dSJeremy KerrOPAL_CALL(opal_ipmi_send,			OPAL_IPMI_SEND);
276608b286dSJeremy KerrOPAL_CALL(opal_ipmi_recv,			OPAL_IPMI_RECV);
27747083450SNeelesh GuptaOPAL_CALL(opal_i2c_request,			OPAL_I2C_REQUEST);
278ed59190eSCyril BurOPAL_CALL(opal_flash_read,			OPAL_FLASH_READ);
279ed59190eSCyril BurOPAL_CALL(opal_flash_write,			OPAL_FLASH_WRITE);
280ed59190eSCyril BurOPAL_CALL(opal_flash_erase,			OPAL_FLASH_ERASE);
2810d7cd855SJeremy KerrOPAL_CALL(opal_prd_msg,				OPAL_PRD_MSG);
2828a8d9181SAnshuman KhandualOPAL_CALL(opal_leds_get_ind,			OPAL_LEDS_GET_INDICATOR);
2838a8d9181SAnshuman KhandualOPAL_CALL(opal_leds_set_ind,			OPAL_LEDS_SET_INDICATOR);
284affddff6SRussell CurreyOPAL_CALL(opal_console_flush,			OPAL_CONSOLE_FLUSH);
285ea0d856cSGavin ShanOPAL_CALL(opal_get_device_tree,			OPAL_GET_DEVICE_TREE);
286ea0d856cSGavin ShanOPAL_CALL(opal_pci_get_presence_state,		OPAL_PCI_GET_PRESENCE_STATE);
287ea0d856cSGavin ShanOPAL_CALL(opal_pci_get_power_state,		OPAL_PCI_GET_POWER_STATE);
288ea0d856cSGavin ShanOPAL_CALL(opal_pci_set_power_state,		OPAL_PCI_SET_POWER_STATE);
2899fedd3f8SBenjamin HerrenschmidtOPAL_CALL(opal_int_get_xirr,			OPAL_INT_GET_XIRR);
2909fedd3f8SBenjamin HerrenschmidtOPAL_CALL(opal_int_set_cppr,			OPAL_INT_SET_CPPR);
2919fedd3f8SBenjamin HerrenschmidtOPAL_CALL(opal_int_eoi,				OPAL_INT_EOI);
2929fedd3f8SBenjamin HerrenschmidtOPAL_CALL(opal_int_set_mfrr,			OPAL_INT_SET_MFRR);
29369c592edSBenjamin HerrenschmidtOPAL_CALL(opal_pci_tce_kill,			OPAL_PCI_TCE_KILL);
2941d0761d2SAlistair PoppleOPAL_CALL(opal_nmmu_set_ptcr,			OPAL_NMMU_SET_PTCR);
2951ab66d1fSAlistair PoppleOPAL_CALL(opal_npu_init_context,		OPAL_NPU_INIT_CONTEXT);
2961ab66d1fSAlistair PoppleOPAL_CALL(opal_npu_destroy_context,		OPAL_NPU_DESTROY_CONTEXT);
2971ab66d1fSAlistair PoppleOPAL_CALL(opal_npu_map_lpar,			OPAL_NPU_MAP_LPAR);
298