diff --git a/kernel/trunk/bus/pci/pci32.inc b/kernel/trunk/bus/pci/pci32.inc index 44cc4595c3..0ee7f0b1b6 100644 --- a/kernel/trunk/bus/pci/pci32.inc +++ b/kernel/trunk/bus/pci/pci32.inc @@ -57,23 +57,25 @@ endg align 4 pci_api: - cmp [pci_access_enabled],1 - jne pci_service_not_supported ;cross - push eax - mov eax,ebx + mov eax,ebx mov ebx,ecx mov ecx,edx - pop edx - movzx edx, dl -;;;;;;;;;;;;;;;;;;; + +align 4 +pci_api_drv: + + cmp [pci_access_enabled],1 + jne pci_service_not_supported + + movzx edx, al if defined mmio_pci_addr - cmp dl, 13 + cmp al, 13 ja pci_service_not_supported else - cmp dl, 10 + cmp al, 10 ja pci_service_not_supported end if diff --git a/kernel/trunk/core/exports.inc b/kernel/trunk/core/exports.inc index cc8c716e6f..b2c6a06de2 100644 --- a/kernel/trunk/core/exports.inc +++ b/kernel/trunk/core/exports.inc @@ -99,7 +99,7 @@ kernel_export: dd szMutexLock , mutex_lock ;gcc fastcall dd szMutexUnlock , mutex_unlock ;gcc fastcall - dd szPciApi , pci_api + dd szPciApi , pci_api_drv dd szPciRead32 , pci_read32 dd szPciRead16 , pci_read16 dd szPciRead8 , pci_read8 diff --git a/kernel/trunk/core/peload.inc b/kernel/trunk/core/peload.inc index 4b399a9e2f..d0c844cd57 100644 --- a/kernel/trunk/core/peload.inc +++ b/kernel/trunk/core/peload.inc @@ -306,7 +306,7 @@ __exports: \ get_display, 'GetDisplay', \ set_screen, 'SetScreen', \ - pci_api, 'PciApi', \ + pci_api_drv, 'PciApi', \ pci_read8, 'PciRead8', \ ; stdcall pci_read16, 'PciRead16', \ ; stdcall pci_read32, 'PciRead32', \ ; stdcall