30,9 → 30,7 |
; Description |
; entry point for system PCI calls |
;*************************************************************************** |
;mmio_pci_addr equ 0x400 ; set actual PCI address here to activate user-MMIO |
|
|
align 4 |
|
pci_api: |
77,7 → 75,7 |
jz pci_write_reg ;dword |
|
if defined mmio_pci_addr |
cmp al,11 ; user-level MMIO functions |
cmp al,11 ; <<< user-level MMIO functions <<< NEW! |
jz pci_mmio_init |
cmp al,12 |
jz pci_mmio_map |
377,10 → 375,10 |
dec eax |
ret |
|
if defined mmio_pci_addr ; must be set above |
if defined mmio_pci_addr |
;*************************************************************************** |
; Function |
; pci_mmio_init |
; pci_mmio_init ; NEW! |
; |
; Description |
; IN: bx = device's PCI bus address (bbbbbbbbdddddfff) |
391,7 → 389,7 |
; eax = -3 : user heap initialization failure |
;*************************************************************************** |
pci_mmio_init: |
cmp bx, mmio_pci_addr |
cmp bx, mmio_pci_addr ; must be set in kernel/data32.inc |
jz @f |
mov eax,-2 |
ret |
407,7 → 405,7 |
|
;*************************************************************************** |
; Function |
; pci_mmio_map |
; pci_mmio_map ; NEW! |
; |
; Description |
; maps a block of PCI memory to user-accessible linear address |
493,7 → 491,7 |
|
;*************************************************************************** |
; Function |
; pci_mmio_unmap_page |
; pci_mmio_unmap_page ; NEW! |
; |
; Description |
; unmaps the linear space previously tied to a PCI memory block |