-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARC64]: More SUN4V PCI controller work.
Add assembler file for PCI hypervisor calls. Setup basic skeleton of SUN4V PCI controller driver. Add 32-bit devhandle to PBM struct, as this is needed for hypervisor calls. Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
David S. Miller
committed
Mar 20, 2006
1 parent
8f6a93a
commit bade562
Showing
5 changed files
with
367 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* pci_sun4v.h: SUN4V specific PCI controller support. | ||
* | ||
* Copyright (C) 2006 David S. Miller (davem@davemloft.net) | ||
*/ | ||
|
||
#ifndef _PCI_SUN4V_H | ||
#define _PCI_SUN4V_H | ||
|
||
extern unsigned long pci_sun4v_devino_to_sysino(unsigned long devhandle, | ||
unsigned long deino); | ||
extern unsigned long pci_sun4v_iommu_map(unsigned long devhandle, | ||
unsigned long tsbid, | ||
unsigned long num_ttes, | ||
unsigned long io_attributes, | ||
unsigned long io_page_list_pa); | ||
extern unsigned long pci_sun4v_iommu_demap(unsigned long devhandle, | ||
unsigned long tsbid, | ||
unsigned long num_ttes); | ||
|
||
#endif /* !(_PCI_SUN4V_H) */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* pci_sun4v_asm: Hypervisor calls for PCI support. | ||
* | ||
* Copyright (C) 2006 David S. Miller <davem@davemloft.net> | ||
*/ | ||
|
||
#include <asm/hypervisor.h> | ||
|
||
/* %o0: devhandle | ||
* %o1: devino | ||
* | ||
* returns %o0: sysino | ||
*/ | ||
.globl pci_sun4v_devino_to_sysino | ||
pci_sun4v_devino_to_sysino: | ||
mov %o1, %o2 | ||
mov %o0, %o1 | ||
mov HV_FAST_INTR_DEVINO2SYSINO, %o0 | ||
ta HV_FAST_TRAP | ||
retl | ||
mov %o1, %o0 | ||
|
||
/* %o0: devhandle | ||
* %o1: tsbid | ||
* %o2: num ttes | ||
* %o3: io_attributes | ||
* %o4: io_page_list phys address | ||
* | ||
* returns %o0: num ttes mapped | ||
*/ | ||
.globl pci_sun4v_iommu_map | ||
pci_sun4v_iommu_map: | ||
mov %o4, %o5 | ||
mov %o3, %o4 | ||
mov %o2, %o3 | ||
mov %o1, %o2 | ||
mov %o0, %o1 | ||
mov HV_FAST_PCI_IOMMU_MAP, %o0 | ||
ta HV_FAST_TRAP | ||
retl | ||
mov %o1, %o0 | ||
|
||
/* %o0: devhandle | ||
* %o1: tsbid | ||
* %o2: num ttes | ||
* | ||
* returns %o0: num ttes demapped | ||
*/ | ||
.globl pci_sun4v_iommu_demap | ||
pci_sun4v_iommu_demap: | ||
mov %o2, %o3 | ||
mov %o1, %o2 | ||
mov %o0, %o1 | ||
mov HV_FAST_PCI_IOMMU_DEMAP, %o0 | ||
ta HV_FAST_TRAP | ||
retl | ||
mov %o1, %o0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters