1 /* pci_sun4v_asm: Hypervisor calls for PCI support.
3 * Copyright (C) 2006, 2008 David S. Miller <davem@davemloft.net>
6 #include <linux/linkage.h>
7 #include <asm/hypervisor.h>
13 * %o4: io_page_list phys address
15 * returns %o0: -status if status was non-zero, else
16 * %o0: num pages mapped
18 ENTRY(pci_sun4v_iommu_map)
20 mov HV_FAST_PCI_IOMMU_MAP, %o5
27 ENDPROC(pci_sun4v_iommu_map)
33 * returns %o0: num ttes demapped
35 ENTRY(pci_sun4v_iommu_demap)
36 mov HV_FAST_PCI_IOMMU_DEMAP, %o5
40 ENDPROC(pci_sun4v_iommu_demap)
49 ENTRY(pci_sun4v_iommu_getmap)
51 mov HV_FAST_PCI_IOMMU_GETMAP, %o5
57 ENDPROC(pci_sun4v_iommu_getmap)
61 * %o2: pci_config_offset
66 * If there is an error, the data will be returned
69 ENTRY(pci_sun4v_config_get)
70 mov HV_FAST_PCI_CONFIG_GET, %o5
76 ENDPROC(pci_sun4v_config_get)
80 * %o2: pci_config_offset
86 * status will be zero if the operation completed
87 * successfully, else -1 if not
89 ENTRY(pci_sun4v_config_put)
90 mov HV_FAST_PCI_CONFIG_PUT, %o5
96 ENDPROC(pci_sun4v_config_put)
100 * %o2: msiq phys address
103 * returns %o0: status
105 * status will be zero if the operation completed
106 * successfully, else -1 if not
108 ENTRY(pci_sun4v_msiq_conf)
109 mov HV_FAST_PCI_MSIQ_CONF, %o5
113 ENDPROC(pci_sun4v_msiq_conf)
117 * %o2: &msiq_phys_addr
118 * %o3: &msiq_num_entries
120 * returns %o0: status
122 ENTRY(pci_sun4v_msiq_info)
124 mov HV_FAST_PCI_MSIQ_INFO, %o5
130 ENDPROC(pci_sun4v_msiq_info)
136 * returns %o0: status
138 ENTRY(pci_sun4v_msiq_getvalid)
139 mov HV_FAST_PCI_MSIQ_GETVALID, %o5
144 ENDPROC(pci_sun4v_msiq_getvalid)
150 * returns %o0: status
152 ENTRY(pci_sun4v_msiq_setvalid)
153 mov HV_FAST_PCI_MSIQ_SETVALID, %o5
157 ENDPROC(pci_sun4v_msiq_setvalid)
163 * returns %o0: status
165 ENTRY(pci_sun4v_msiq_getstate)
166 mov HV_FAST_PCI_MSIQ_GETSTATE, %o5
171 ENDPROC(pci_sun4v_msiq_getstate)
177 * returns %o0: status
179 ENTRY(pci_sun4v_msiq_setstate)
180 mov HV_FAST_PCI_MSIQ_SETSTATE, %o5
184 ENDPROC(pci_sun4v_msiq_setstate)
190 * returns %o0: status
192 ENTRY(pci_sun4v_msiq_gethead)
193 mov HV_FAST_PCI_MSIQ_GETHEAD, %o5
198 ENDPROC(pci_sun4v_msiq_gethead)
204 * returns %o0: status
206 ENTRY(pci_sun4v_msiq_sethead)
207 mov HV_FAST_PCI_MSIQ_SETHEAD, %o5
211 ENDPROC(pci_sun4v_msiq_sethead)
217 * returns %o0: status
219 ENTRY(pci_sun4v_msiq_gettail)
220 mov HV_FAST_PCI_MSIQ_GETTAIL, %o5
225 ENDPROC(pci_sun4v_msiq_gettail)
231 * returns %o0: status
233 ENTRY(pci_sun4v_msi_getvalid)
234 mov HV_FAST_PCI_MSI_GETVALID, %o5
239 ENDPROC(pci_sun4v_msi_getvalid)
245 * returns %o0: status
247 ENTRY(pci_sun4v_msi_setvalid)
248 mov HV_FAST_PCI_MSI_SETVALID, %o5
252 ENDPROC(pci_sun4v_msi_setvalid)
258 * returns %o0: status
260 ENTRY(pci_sun4v_msi_getmsiq)
261 mov HV_FAST_PCI_MSI_GETMSIQ, %o5
266 ENDPROC(pci_sun4v_msi_getmsiq)
273 * returns %o0: status
275 ENTRY(pci_sun4v_msi_setmsiq)
276 mov HV_FAST_PCI_MSI_SETMSIQ, %o5
280 ENDPROC(pci_sun4v_msi_setmsiq)
286 * returns %o0: status
288 ENTRY(pci_sun4v_msi_getstate)
289 mov HV_FAST_PCI_MSI_GETSTATE, %o5
294 ENDPROC(pci_sun4v_msi_getstate)
300 * returns %o0: status
302 ENTRY(pci_sun4v_msi_setstate)
303 mov HV_FAST_PCI_MSI_SETSTATE, %o5
307 ENDPROC(pci_sun4v_msi_setstate)
313 * returns %o0: status
315 ENTRY(pci_sun4v_msg_getmsiq)
316 mov HV_FAST_PCI_MSG_GETMSIQ, %o5
321 ENDPROC(pci_sun4v_msg_getmsiq)
327 * returns %o0: status
329 ENTRY(pci_sun4v_msg_setmsiq)
330 mov HV_FAST_PCI_MSG_SETMSIQ, %o5
334 ENDPROC(pci_sun4v_msg_setmsiq)
340 * returns %o0: status
342 ENTRY(pci_sun4v_msg_getvalid)
343 mov HV_FAST_PCI_MSG_GETVALID, %o5
348 ENDPROC(pci_sun4v_msg_getvalid)
354 * returns %o0: status
356 ENTRY(pci_sun4v_msg_setvalid)
357 mov HV_FAST_PCI_MSG_SETVALID, %o5
361 ENDPROC(pci_sun4v_msg_setvalid)
369 * %o5: &iotsb_num/&iotsb_handle
371 * returns %o0: status
372 * %o1: iotsb_num/iotsb_handle
374 ENTRY(pci_sun4v_iotsb_conf)
376 mov HV_FAST_PCI_IOTSB_CONF, %o5
380 ENDPROC(pci_sun4v_iotsb_conf)
384 * %o1: iotsb_num/iotsb_handle
387 * returns %o0: status
389 ENTRY(pci_sun4v_iotsb_bind)
390 mov HV_FAST_PCI_IOTSB_BIND, %o5
394 ENDPROC(pci_sun4v_iotsb_bind)
398 * %o1: iotsb_num/iotsb_handle
400 * %o3: iotte_attributes
401 * %o4: io_page_list_p
404 * returns %o0: status
407 ENTRY(pci_sun4v_iotsb_map)
409 mov HV_FAST_PCI_IOTSB_MAP, %o5
413 ENDPROC(pci_sun4v_iotsb_map)
417 * %o1: iotsb_num/iotsb_handle
422 * returns %o0: status
425 ENTRY(pci_sun4v_iotsb_demap)
426 mov HV_FAST_PCI_IOTSB_DEMAP, %o5
430 ENDPROC(pci_sun4v_iotsb_demap)