Rev 9227 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9227 | Rev 9567 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | ;; ;; |
19 | ;; ;; |
20 | ;; See file COPYING for details ;; |
20 | ;; See file COPYING for details ;; |
21 | ;; ;; |
21 | ;; ;; |
22 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
22 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 23... | Line 23... | ||
23 | 23 | ||
Line 24... | Line 24... | ||
24 | $Revision: 9227 $ |
24 | $Revision: 9567 $ |
25 | 25 | ||
26 | ;*************************************************************************** |
26 | ;*************************************************************************** |
27 | ; Function |
27 | ; Function |
Line 675... | Line 675... | ||
675 | ; Export for drivers. Just returns the pointer to the pci-devices list. |
675 | ; Export for drivers. Just returns the pointer to the pci-devices list. |
676 | proc get_pcidev_list |
676 | proc get_pcidev_list |
677 | mov eax, pcidev_list |
677 | mov eax, pcidev_list |
678 | ret |
678 | ret |
679 | endp |
679 | endp |
- | 680 | ||
- | 681 | ||
- | 682 | align 4 |
|
- | 683 | proc pci_read32 stdcall, bus:dword, devfn:dword, reg:dword |
|
- | 684 | push ebx |
|
- | 685 | xor eax, eax |
|
- | 686 | xor ebx, ebx |
|
- | 687 | mov ah, byte [bus] |
|
- | 688 | mov al, 6 |
|
- | 689 | mov bh, byte [devfn] |
|
- | 690 | mov bl, byte [reg] |
|
- | 691 | call pci_read_reg |
|
- | 692 | pop ebx |
|
- | 693 | ret |
|
- | 694 | endp |
|
- | 695 | ||
- | 696 | align 4 |
|
- | 697 | proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword |
|
- | 698 | push ebx |
|
- | 699 | xor eax, eax |
|
- | 700 | xor ebx, ebx |
|
- | 701 | mov ah, byte [bus] |
|
- | 702 | mov al, 5 |
|
- | 703 | mov bh, byte [devfn] |
|
- | 704 | mov bl, byte [reg] |
|
- | 705 | call pci_read_reg |
|
- | 706 | pop ebx |
|
- | 707 | ret |
|
- | 708 | endp |
|
- | 709 | ||
- | 710 | align 4 |
|
- | 711 | proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword |
|
- | 712 | push ebx |
|
- | 713 | xor eax, eax |
|
- | 714 | xor ebx, ebx |
|
- | 715 | mov ah, byte [bus] |
|
- | 716 | mov al, 4 |
|
- | 717 | mov bh, byte [devfn] |
|
- | 718 | mov bl, byte [reg] |
|
- | 719 | call pci_read_reg |
|
- | 720 | pop ebx |
|
- | 721 | ret |
|
- | 722 | endp |
|
- | 723 | ||
- | 724 | align 4 |
|
- | 725 | proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
|
- | 726 | push ebx |
|
- | 727 | xor eax, eax |
|
- | 728 | xor ebx, ebx |
|
- | 729 | mov ah, byte [bus] |
|
- | 730 | mov al, 8 |
|
- | 731 | mov bh, byte [devfn] |
|
- | 732 | mov bl, byte [reg] |
|
- | 733 | mov ecx, [val] |
|
- | 734 | call pci_write_reg |
|
- | 735 | pop ebx |
|
- | 736 | ret |
|
- | 737 | endp |
|
- | 738 | ||
- | 739 | align 4 |
|
- | 740 | proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
|
- | 741 | push ebx |
|
- | 742 | xor eax, eax |
|
- | 743 | xor ebx, ebx |
|
- | 744 | mov ah, byte [bus] |
|
- | 745 | mov al, 9 |
|
- | 746 | mov bh, byte [devfn] |
|
- | 747 | mov bl, byte [reg] |
|
- | 748 | mov ecx, [val] |
|
- | 749 | call pci_write_reg |
|
- | 750 | pop ebx |
|
- | 751 | ret |
|
- | 752 | endp |
|
- | 753 | ||
- | 754 | align 4 |
|
- | 755 | proc pci_write32 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
|
- | 756 | push ebx |
|
- | 757 | xor eax, eax |
|
- | 758 | xor ebx, ebx |
|
- | 759 | mov ah, byte [bus] |
|
- | 760 | mov al, 10 |
|
- | 761 | mov bh, byte [devfn] |
|
- | 762 | mov bl, byte [reg] |
|
- | 763 | mov ecx, [val] |
|
- | 764 | call pci_write_reg |
|
- | 765 | pop ebx |
|
- | 766 | ret |
|
- | 767 | endp |
|
680 | 768 |