Fix bug in PCI driver with not saved registers
In the PCI driver's device enumeration function, there was a mistake where a register that is being used in that function wasn't preserved as it should've been. It didn't cause any errors (at least yet), but it's better to fix such stuff once found.
This commit is contained in:
parent
459936de7a
commit
c249510163
|
@ -34,7 +34,7 @@ initialize_pci_driver:
|
||||||
|
|
||||||
push ebp
|
push ebp
|
||||||
mov ebp, esp
|
mov ebp, esp
|
||||||
push ebx
|
push dword PCI_DEVICE_COUNT_OFFSET
|
||||||
push dword 2
|
push dword 2
|
||||||
push dword 0
|
push dword 0
|
||||||
push dword 0
|
push dword 0
|
||||||
|
|
|
@ -190,11 +190,12 @@ pci_enumerate_bus:
|
||||||
|
|
||||||
mov [esi + (64 - 8)], ebx
|
mov [esi + (64 - 8)], ebx
|
||||||
mov [esi + (64 - 12)], ecx
|
mov [esi + (64 - 12)], ecx
|
||||||
|
mov [esi + (64 - 16)], edx
|
||||||
mov [esi + (64 - 20)], edi
|
mov [esi + (64 - 20)], edi
|
||||||
; [esi]: Device-in-bus Index
|
; [esi]: Device-in-bus Index
|
||||||
; [esi + 4]: Number of existing devices
|
; [esi + 4]: Number of existing devices
|
||||||
; [esi + 8]: Bus number
|
; [esi + 8]: Bus number
|
||||||
; [esi + 12]:
|
; [esi + 12]: PCI driver area pointer
|
||||||
mov [esi], dword 0
|
mov [esi], dword 0
|
||||||
mov [esi + 4], dword 0
|
mov [esi + 4], dword 0
|
||||||
mov eax, [ebp - 8]
|
mov eax, [ebp - 8]
|
||||||
|
@ -259,6 +260,7 @@ pci_enumerate_bus:
|
||||||
.epilog:
|
.epilog:
|
||||||
mov ebx, [esi + (64 - 8)]
|
mov ebx, [esi + (64 - 8)]
|
||||||
mov ecx, [esi + (64 - 12)]
|
mov ecx, [esi + (64 - 12)]
|
||||||
|
mov edx, [esi + (64 - 16)]
|
||||||
mov edi, [esi + (64 - 20)]
|
mov edi, [esi + (64 - 20)]
|
||||||
|
|
||||||
mov eax, [esi + 4]
|
mov eax, [esi + 4]
|
||||||
|
@ -313,7 +315,6 @@ pci_enumerate:
|
||||||
cmp edx, [ebp - 8]
|
cmp edx, [ebp - 8]
|
||||||
jae .epilog
|
jae .epilog
|
||||||
|
|
||||||
|
|
||||||
.call_bus_enumerator:
|
.call_bus_enumerator:
|
||||||
push ebp
|
push ebp
|
||||||
mov ebp, esp
|
mov ebp, esp
|
||||||
|
|
Loading…
Reference in New Issue