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);						\
42c49f6353SAnton Blanchard	ld	r12,opal_tracepoint_refcount@toc(r2);		\
43c49f6353SAnton Blanchard	cmpdi	r12,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
5314a43e69SBenjamin Herrenschmidt/* TODO:
5414a43e69SBenjamin Herrenschmidt *
5514a43e69SBenjamin Herrenschmidt * - Trace irqs in/off (needs saving/restoring all args, argh...)
5614a43e69SBenjamin Herrenschmidt * - Get r11 feed up by Dave so I can have better register usage
5714a43e69SBenjamin Herrenschmidt */
58c49f6353SAnton Blanchard
5914a43e69SBenjamin Herrenschmidt#define OPAL_CALL(name, token)		\
6019d36c21SJeremy Kerr _GLOBAL_TOC(name);			\
6114a43e69SBenjamin Herrenschmidt	mflr	r0;			\
6214a43e69SBenjamin Herrenschmidt	std	r0,16(r1);		\
63c49f6353SAnton Blanchard	li	r0,token;		\
64c49f6353SAnton Blanchard	OPAL_BRANCH(opal_tracepoint_entry) \
65c49f6353SAnton Blanchard	mfcr	r12;			\
66bbe30b3bSAnton Blanchard	stw	r12,8(r1);		\
6714a43e69SBenjamin Herrenschmidt	std	r1,PACAR1(r13);		\
68c49f6353SAnton Blanchard	li	r11,0;			\
6914a43e69SBenjamin Herrenschmidt	mfmsr	r12;			\
70c49f6353SAnton Blanchard	ori	r11,r11,MSR_EE;		\
7114a43e69SBenjamin Herrenschmidt	std	r12,PACASAVEDMSR(r13);	\
72c49f6353SAnton Blanchard	andc	r12,r12,r11;		\
7314a43e69SBenjamin Herrenschmidt	mtmsrd	r12,1;			\
74c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal_return);	\
75c49f6353SAnton Blanchard	mtlr	r11;			\
76c49f6353SAnton Blanchard	li	r11,MSR_DR|MSR_IR|MSR_LE;\
77c49f6353SAnton Blanchard	andc	r12,r12,r11;		\
7814a43e69SBenjamin Herrenschmidt	mtspr	SPRN_HSRR1,r12;		\
7914a43e69SBenjamin Herrenschmidt	LOAD_REG_ADDR(r11,opal);	\
8014a43e69SBenjamin Herrenschmidt	ld	r12,8(r11);		\
8114a43e69SBenjamin Herrenschmidt	ld	r2,0(r11);		\
8214a43e69SBenjamin Herrenschmidt	mtspr	SPRN_HSRR0,r12;		\
8314a43e69SBenjamin Herrenschmidt	hrfid
8414a43e69SBenjamin Herrenschmidt
85ad0289e4SAnton Blanchardopal_return:
86be401b37SBenjamin Herrenschmidt	/*
87be401b37SBenjamin Herrenschmidt	 * Fixup endian on OPAL return... we should be able to simplify
88be401b37SBenjamin Herrenschmidt	 * this by instead converting the below trampoline to a set of
89be401b37SBenjamin Herrenschmidt	 * bytes (always BE) since MSR:LE will end up fixed up as a side
90be401b37SBenjamin Herrenschmidt	 * effect of the rfid.
91be401b37SBenjamin Herrenschmidt	 */
92be401b37SBenjamin Herrenschmidt	FIXUP_ENDIAN
9314a43e69SBenjamin Herrenschmidt	ld	r2,PACATOC(r13);
94bbe30b3bSAnton Blanchard	lwz	r4,8(r1);
9514a43e69SBenjamin Herrenschmidt	ld	r5,16(r1);
9614a43e69SBenjamin Herrenschmidt	ld	r6,PACASAVEDMSR(r13);
9714a43e69SBenjamin Herrenschmidt	mtspr	SPRN_SRR0,r5;
9814a43e69SBenjamin Herrenschmidt	mtspr	SPRN_SRR1,r6;
9914a43e69SBenjamin Herrenschmidt	mtcr	r4;
10014a43e69SBenjamin Herrenschmidt	rfid
10114a43e69SBenjamin Herrenschmidt
102c49f6353SAnton Blanchard#ifdef CONFIG_TRACEPOINTS
103c49f6353SAnton Blanchardopal_tracepoint_entry:
104c49f6353SAnton Blanchard	stdu	r1,-STACKFRAMESIZE(r1)
105c49f6353SAnton Blanchard	std	r0,STK_REG(R23)(r1)
106c49f6353SAnton Blanchard	std	r3,STK_REG(R24)(r1)
107c49f6353SAnton Blanchard	std	r4,STK_REG(R25)(r1)
108c49f6353SAnton Blanchard	std	r5,STK_REG(R26)(r1)
109c49f6353SAnton Blanchard	std	r6,STK_REG(R27)(r1)
110c49f6353SAnton Blanchard	std	r7,STK_REG(R28)(r1)
111c49f6353SAnton Blanchard	std	r8,STK_REG(R29)(r1)
112c49f6353SAnton Blanchard	std	r9,STK_REG(R30)(r1)
113c49f6353SAnton Blanchard	std	r10,STK_REG(R31)(r1)
114c49f6353SAnton Blanchard	mr	r3,r0
115c49f6353SAnton Blanchard	addi	r4,r1,STK_REG(R24)
116c49f6353SAnton Blanchard	bl	__trace_opal_entry
117c49f6353SAnton Blanchard	ld	r0,STK_REG(R23)(r1)
118c49f6353SAnton Blanchard	ld	r3,STK_REG(R24)(r1)
119c49f6353SAnton Blanchard	ld	r4,STK_REG(R25)(r1)
120c49f6353SAnton Blanchard	ld	r5,STK_REG(R26)(r1)
121c49f6353SAnton Blanchard	ld	r6,STK_REG(R27)(r1)
122c49f6353SAnton Blanchard	ld	r7,STK_REG(R28)(r1)
123c49f6353SAnton Blanchard	ld	r8,STK_REG(R29)(r1)
124c49f6353SAnton Blanchard	ld	r9,STK_REG(R30)(r1)
125c49f6353SAnton Blanchard	ld	r10,STK_REG(R31)(r1)
126c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal_tracepoint_return)
127c49f6353SAnton Blanchard	mfcr	r12
128c49f6353SAnton Blanchard	std	r11,16(r1)
129c49f6353SAnton Blanchard	stw	r12,8(r1)
130c49f6353SAnton Blanchard	std	r1,PACAR1(r13)
131c49f6353SAnton Blanchard	li	r11,0
132c49f6353SAnton Blanchard	mfmsr	r12
133c49f6353SAnton Blanchard	ori	r11,r11,MSR_EE
134c49f6353SAnton Blanchard	std	r12,PACASAVEDMSR(r13)
135c49f6353SAnton Blanchard	andc	r12,r12,r11
136c49f6353SAnton Blanchard	mtmsrd	r12,1
137c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal_return)
138c49f6353SAnton Blanchard	mtlr	r11
139c49f6353SAnton Blanchard	li	r11,MSR_DR|MSR_IR|MSR_LE
140c49f6353SAnton Blanchard	andc	r12,r12,r11
141c49f6353SAnton Blanchard	mtspr	SPRN_HSRR1,r12
142c49f6353SAnton Blanchard	LOAD_REG_ADDR(r11,opal)
143c49f6353SAnton Blanchard	ld	r12,8(r11)
144c49f6353SAnton Blanchard	ld	r2,0(r11)
145c49f6353SAnton Blanchard	mtspr	SPRN_HSRR0,r12
146c49f6353SAnton Blanchard	hrfid
147c49f6353SAnton Blanchard
148c49f6353SAnton Blanchardopal_tracepoint_return:
149c49f6353SAnton Blanchard	std	r3,STK_REG(R31)(r1)
150c49f6353SAnton Blanchard	mr	r4,r3
151c49f6353SAnton Blanchard	ld	r0,STK_REG(R23)(r1)
152c49f6353SAnton Blanchard	bl	__trace_opal_exit
153c49f6353SAnton Blanchard	ld	r3,STK_REG(R31)(r1)
154c49f6353SAnton Blanchard	addi	r1,r1,STACKFRAMESIZE
155c49f6353SAnton Blanchard	ld	r0,16(r1)
156c49f6353SAnton Blanchard	mtlr	r0
157c49f6353SAnton Blanchard	blr
158c49f6353SAnton Blanchard#endif
159c49f6353SAnton Blanchard
1607cba160aSShreyas B. Prabhu/*
1617cba160aSShreyas B. Prabhu * Make opal call in realmode. This is a generic function to be called
1627cba160aSShreyas B. Prabhu * from realmode. It handles endianness.
1637cba160aSShreyas B. Prabhu *
1647cba160aSShreyas B. Prabhu * r13 - paca pointer
1657cba160aSShreyas B. Prabhu * r1  - stack pointer
1667cba160aSShreyas B. Prabhu * r0  - opal token
1677cba160aSShreyas B. Prabhu */
1687cba160aSShreyas B. Prabhu_GLOBAL(opal_call_realmode)
1697cba160aSShreyas B. Prabhu	mflr	r12
1707cba160aSShreyas B. Prabhu	std	r12,PPC_LR_STKOFF(r1)
1717cba160aSShreyas B. Prabhu	ld	r2,PACATOC(r13)
1727cba160aSShreyas B. Prabhu	/* Set opal return address */
1737cba160aSShreyas B. Prabhu	LOAD_REG_ADDR(r12,return_from_opal_call)
1747cba160aSShreyas B. Prabhu	mtlr	r12
1757cba160aSShreyas B. Prabhu
1767cba160aSShreyas B. Prabhu	mfmsr	r12
1777cba160aSShreyas B. Prabhu#ifdef __LITTLE_ENDIAN__
1787cba160aSShreyas B. Prabhu	/* Handle endian-ness */
1797cba160aSShreyas B. Prabhu	li	r11,MSR_LE
1807cba160aSShreyas B. Prabhu	andc	r12,r12,r11
1817cba160aSShreyas B. Prabhu#endif
1827cba160aSShreyas B. Prabhu	mtspr	SPRN_HSRR1,r12
1837cba160aSShreyas B. Prabhu	LOAD_REG_ADDR(r11,opal)
1847cba160aSShreyas B. Prabhu	ld	r12,8(r11)
1857cba160aSShreyas B. Prabhu	ld	r2,0(r11)
1867cba160aSShreyas B. Prabhu	mtspr	SPRN_HSRR0,r12
1877cba160aSShreyas B. Prabhu	hrfid
1887cba160aSShreyas B. Prabhu
1897cba160aSShreyas B. Prabhureturn_from_opal_call:
1907cba160aSShreyas B. Prabhu#ifdef __LITTLE_ENDIAN__
1917cba160aSShreyas B. Prabhu	FIXUP_ENDIAN
1927cba160aSShreyas B. Prabhu#endif
1937cba160aSShreyas B. Prabhu	ld	r12,PPC_LR_STKOFF(r1)
1947cba160aSShreyas B. Prabhu	mtlr	r12
1957cba160aSShreyas B. Prabhu	blr
1967cba160aSShreyas B. Prabhu
197e28b05e7SJoel StanleyOPAL_CALL(opal_invalid_call,			OPAL_INVALID_CALL);
19814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_write,			OPAL_CONSOLE_WRITE);
19914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_read,			OPAL_CONSOLE_READ);
20014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_console_write_buffer_space,	OPAL_CONSOLE_WRITE_BUFFER_SPACE);
20114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_rtc_read,			OPAL_RTC_READ);
20214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_rtc_write,			OPAL_RTC_WRITE);
20314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_cec_power_down,			OPAL_CEC_POWER_DOWN);
20414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_cec_reboot,			OPAL_CEC_REBOOT);
20514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_read_nvram,			OPAL_READ_NVRAM);
20614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_write_nvram,			OPAL_WRITE_NVRAM);
20714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_handle_interrupt,		OPAL_HANDLE_INTERRUPT);
20814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_poll_events,			OPAL_POLL_EVENTS);
20914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_hub_tce_memory,		OPAL_PCI_SET_HUB_TCE_MEMORY);
21014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_tce_memory,		OPAL_PCI_SET_PHB_TCE_MEMORY);
21114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_byte,		OPAL_PCI_CONFIG_READ_BYTE);
21214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_half_word,	OPAL_PCI_CONFIG_READ_HALF_WORD);
21314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_read_word,		OPAL_PCI_CONFIG_READ_WORD);
21414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_byte,		OPAL_PCI_CONFIG_WRITE_BYTE);
21514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_half_word,	OPAL_PCI_CONFIG_WRITE_HALF_WORD);
21614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_config_write_word,		OPAL_PCI_CONFIG_WRITE_WORD);
21714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_set_xive,			OPAL_SET_XIVE);
21814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_xive,			OPAL_GET_XIVE);
21914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_register_exception_handler,	OPAL_REGISTER_OPAL_EXCEPTION_HANDLER);
22014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_eeh_freeze_status,		OPAL_PCI_EEH_FREEZE_STATUS);
22114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_eeh_freeze_clear,		OPAL_PCI_EEH_FREEZE_CLEAR);
2225ca27efbSGavin ShanOPAL_CALL(opal_pci_eeh_freeze_set,		OPAL_PCI_EEH_FREEZE_SET);
2235b642340SGavin ShanOPAL_CALL(opal_pci_err_inject,			OPAL_PCI_ERR_INJECT);
22414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_shpc,			OPAL_PCI_SHPC);
22514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_phb_mmio_enable,		OPAL_PCI_PHB_MMIO_ENABLE);
22614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_mem_window,		OPAL_PCI_SET_PHB_MEM_WINDOW);
22714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_mmio_window,		OPAL_PCI_MAP_PE_MMIO_WINDOW);
22814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_phb_table_memory,	OPAL_PCI_SET_PHB_TABLE_MEMORY);
22914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_pe,			OPAL_PCI_SET_PE);
23014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_peltv,			OPAL_PCI_SET_PELTV);
23114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_mve,			OPAL_PCI_SET_MVE);
23214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_mve_enable,		OPAL_PCI_SET_MVE_ENABLE);
23314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_xive_reissue,		OPAL_PCI_GET_XIVE_REISSUE);
23414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_xive_reissue,		OPAL_PCI_SET_XIVE_REISSUE);
23514a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_set_xive_pe,			OPAL_PCI_SET_XIVE_PE);
23614a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_xive_source,			OPAL_GET_XIVE_SOURCE);
23714a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_msi_32,			OPAL_GET_MSI_32);
23814a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_get_msi_64,			OPAL_GET_MSI_64);
23914a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_start_cpu,			OPAL_START_CPU);
24014a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_query_cpu_status,		OPAL_QUERY_CPU_STATUS);
24114a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_write_oppanel,			OPAL_WRITE_OPPANEL);
24214a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_dma_window,		OPAL_PCI_MAP_PE_DMA_WINDOW);
24314a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_map_pe_dma_window_real,	OPAL_PCI_MAP_PE_DMA_WINDOW_REAL);
24414a43e69SBenjamin HerrenschmidtOPAL_CALL(opal_pci_reset,			OPAL_PCI_RESET);
245f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_hub_diag_data,		OPAL_PCI_GET_HUB_DIAG_DATA);
246f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_get_phb_diag_data,		OPAL_PCI_GET_PHB_DIAG_DATA);
247f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_fence_phb,			OPAL_PCI_FENCE_PHB);
248f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_reinit,			OPAL_PCI_REINIT);
249f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_pci_mask_pe_error,		OPAL_PCI_MASK_PE_ERROR);
250f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_set_slot_led_status,		OPAL_SET_SLOT_LED_STATUS);
251f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_get_epow_status,			OPAL_GET_EPOW_STATUS);
252f11fe552SBenjamin HerrenschmidtOPAL_CALL(opal_set_system_attention_led,	OPAL_SET_SYSTEM_ATTENTION_LED);
25323773230SGavin ShanOPAL_CALL(opal_pci_next_error,			OPAL_PCI_NEXT_ERROR);
25423773230SGavin ShanOPAL_CALL(opal_pci_poll,			OPAL_PCI_POLL);
255137436c9SGavin ShanOPAL_CALL(opal_pci_msi_eoi,			OPAL_PCI_MSI_EOI);
25623773230SGavin ShanOPAL_CALL(opal_pci_get_phb_diag_data2,		OPAL_PCI_GET_PHB_DIAG_DATA2);
257cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_xscom_read,			OPAL_XSCOM_READ);
258cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_xscom_write,			OPAL_XSCOM_WRITE);
259cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_lpc_read,			OPAL_LPC_READ);
260cc0efb57SBenjamin HerrenschmidtOPAL_CALL(opal_lpc_write,			OPAL_LPC_WRITE);
26113906db6SBenjamin HerrenschmidtOPAL_CALL(opal_return_cpu,			OPAL_RETURN_CPU);
2624926616cSBenjamin HerrenschmidtOPAL_CALL(opal_reinit_cpus,			OPAL_REINIT_CPUS);
263774fea1aSStewart SmithOPAL_CALL(opal_read_elog,			OPAL_ELOG_READ);
264774fea1aSStewart SmithOPAL_CALL(opal_send_ack_elog,			OPAL_ELOG_ACK);
265774fea1aSStewart SmithOPAL_CALL(opal_get_elog_size,			OPAL_ELOG_SIZE);
266774fea1aSStewart SmithOPAL_CALL(opal_resend_pending_logs,		OPAL_ELOG_RESEND);
267774fea1aSStewart SmithOPAL_CALL(opal_write_elog,			OPAL_ELOG_WRITE);
26850bd6153SVasant HegdeOPAL_CALL(opal_validate_flash,			OPAL_FLASH_VALIDATE);
26950bd6153SVasant HegdeOPAL_CALL(opal_manage_flash,			OPAL_FLASH_MANAGE);
27050bd6153SVasant HegdeOPAL_CALL(opal_update_flash,			OPAL_FLASH_UPDATE);
27197eb001fSVaidyanathan SrinivasanOPAL_CALL(opal_resync_timebase,			OPAL_RESYNC_TIMEBASE);
272bffe6bdaSMichael NeulingOPAL_CALL(opal_check_token,			OPAL_CHECK_TOKEN);
273c7e64b9cSStewart SmithOPAL_CALL(opal_dump_init,			OPAL_DUMP_INIT);
274c7e64b9cSStewart SmithOPAL_CALL(opal_dump_info,			OPAL_DUMP_INFO);
275c7e64b9cSStewart SmithOPAL_CALL(opal_dump_info2,			OPAL_DUMP_INFO2);
276c7e64b9cSStewart SmithOPAL_CALL(opal_dump_read,			OPAL_DUMP_READ);
277c7e64b9cSStewart SmithOPAL_CALL(opal_dump_ack,			OPAL_DUMP_ACK);
27824366360SMahesh SalgaonkarOPAL_CALL(opal_get_msg,				OPAL_GET_MSG);
27924366360SMahesh SalgaonkarOPAL_CALL(opal_check_completion,		OPAL_CHECK_ASYNC_COMPLETION);
280c7e64b9cSStewart SmithOPAL_CALL(opal_dump_resend_notification,	OPAL_DUMP_RESEND);
281f7d98d18SVasant HegdeOPAL_CALL(opal_sync_host_reboot,		OPAL_SYNC_HOST_REBOOT);
2827224adbbSNeelesh GuptaOPAL_CALL(opal_sensor_read,			OPAL_SENSOR_READ);
2834029cd66SNeelesh GuptaOPAL_CALL(opal_get_param,			OPAL_GET_PARAM);
2844029cd66SNeelesh GuptaOPAL_CALL(opal_set_param,			OPAL_SET_PARAM);
2850ef95b41SMahesh SalgaonkarOPAL_CALL(opal_handle_hmi,			OPAL_HANDLE_HMI);
28677b54e9fSShreyas B. PrabhuOPAL_CALL(opal_slw_set_reg,			OPAL_SLW_SET_REG);
287b09c2ec4SVasant HegdeOPAL_CALL(opal_register_dump_region,		OPAL_REGISTER_DUMP_REGION);
288b09c2ec4SVasant HegdeOPAL_CALL(opal_unregister_dump_region,		OPAL_UNREGISTER_DUMP_REGION);
28909521736SIan MunsieOPAL_CALL(opal_pci_set_phb_cxl_mode,		OPAL_PCI_SET_PHB_CXL_MODE);
29016b1d26eSNeelesh GuptaOPAL_CALL(opal_tpo_write,			OPAL_WRITE_TPO);
29116b1d26eSNeelesh GuptaOPAL_CALL(opal_tpo_read,			OPAL_READ_TPO);
292608b286dSJeremy KerrOPAL_CALL(opal_ipmi_send,			OPAL_IPMI_SEND);
293608b286dSJeremy KerrOPAL_CALL(opal_ipmi_recv,			OPAL_IPMI_RECV);
29447083450SNeelesh GuptaOPAL_CALL(opal_i2c_request,			OPAL_I2C_REQUEST);
295