Rev 3598 | Rev 4453 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3598 | Rev 3732 | ||
---|---|---|---|
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: 3598 $ |
24 | $Revision: 3732 $ |
25 | 25 | ||
26 | ;*************************************************************************** |
26 | ;*************************************************************************** |
27 | ; Function |
27 | ; Function |
Line 99... | Line 99... | ||
99 | 99 | ||
Line 100... | Line 100... | ||
100 | ;; ============================================ |
100 | ;; ============================================ |
101 | 101 | ||
102 | pci_fn_0: |
102 | pci_fn_0: |
103 | ; PCI function 0: get pci version (AH.AL) |
103 | ; PCI function 0: get pci version (AH.AL) |
Line 104... | Line 104... | ||
104 | movzx eax, word [BOOT_VAR+0x9022] |
104 | movzx eax, word [BOOT_VARS+0x9022] |
105 | ret |
105 | ret |
106 | 106 | ||
107 | pci_fn_1: |
107 | pci_fn_1: |
Line 108... | Line 108... | ||
108 | ; PCI function 1: get last bus in AL |
108 | ; PCI function 1: get last bus in AL |
109 | mov al, [BOOT_VAR+0x9021] |
109 | mov al, [BOOT_VARS+0x9021] |
110 | ret |
110 | ret |
111 | 111 | ||
Line 112... | Line 112... | ||
112 | pci_fn_2: |
112 | pci_fn_2: |
113 | ; PCI function 2: get pci access mechanism |
113 | ; PCI function 2: get pci access mechanism |
114 | mov al, [BOOT_VAR+0x9020] |
114 | mov al, [BOOT_VARS+0x9020] |
Line 154... | Line 154... | ||
154 | 154 | ||
Line 155... | Line 155... | ||
155 | align 4 |
155 | align 4 |
156 | 156 | ||
157 | pci_read_reg: |
157 | pci_read_reg: |
158 | push ebx esi |
158 | push ebx esi |
Line 159... | Line 159... | ||
159 | cmp byte [BOOT_VAR+0x9020], 2;what mechanism will we use? |
159 | cmp byte [BOOT_VARS+0x9020], 2;what mechanism will we use? |
160 | je pci_read_reg_2 |
160 | je pci_read_reg_2 |
161 | 161 | ||
Line 285... | Line 285... | ||
285 | 285 | ||
Line 286... | Line 286... | ||
286 | align 4 |
286 | align 4 |
287 | 287 | ||
288 | pci_write_reg: |
288 | pci_write_reg: |
289 | push esi ebx |
289 | push esi ebx |
Line 290... | Line 290... | ||
290 | cmp byte [BOOT_VAR+0x9020], 2;what mechanism will we use? |
290 | cmp byte [BOOT_VARS+0x9020], 2;what mechanism will we use? |
291 | je pci_write_reg_2 |
291 | je pci_write_reg_2 |
292 | 292 | ||
Line 568... | Line 568... | ||
568 | ;-=-=-=-=-=-=-=-= |
568 | ;-=-=-=-=-=-=-=-= |
569 | .emulate_bios: |
569 | .emulate_bios: |
570 | cmp ebp, 1 ; PCI_FUNCTION_ID |
570 | cmp ebp, 1 ; PCI_FUNCTION_ID |
571 | jnz .not_PCI_BIOS_PRESENT |
571 | jnz .not_PCI_BIOS_PRESENT |
572 | mov edx, 'PCI ' |
572 | mov edx, 'PCI ' |
573 | mov al, [BOOT_VAR + 0x9020] |
573 | mov al, [BOOT_VARS + 0x9020] |
574 | mov bx, [BOOT_VAR + 0x9022] |
574 | mov bx, [BOOT_VARS + 0x9022] |
575 | mov cl, [BOOT_VAR + 0x9021] |
575 | mov cl, [BOOT_VARS + 0x9021] |
576 | xor ah, ah |
576 | xor ah, ah |
577 | jmp .return_abcd |
577 | jmp .return_abcd |
Line 578... | Line 578... | ||
578 | 578 | ||
579 | .not_PCI_BIOS_PRESENT: |
579 | .not_PCI_BIOS_PRESENT: |
Line 713... | Line 713... | ||
713 | .no_device: |
713 | .no_device: |
714 | or byte [.devfn], 7 |
714 | or byte [.devfn], 7 |
715 | .next_func: |
715 | .next_func: |
716 | inc dword [.devfn] |
716 | inc dword [.devfn] |
717 | mov ah, [.bus] |
717 | mov ah, [.bus] |
718 | cmp ah, [BOOT_VAR+0x9021] |
718 | cmp ah, [BOOT_VARS+0x9021] |
719 | jbe .loop |
719 | jbe .loop |
720 | .nomemory: |
720 | .nomemory: |
721 | leave |
721 | leave |
722 | ret |
722 | ret |
723 | endp |
723 | endp |