mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[FREELDR/AMD64]
Save parameter registers (rcx, rdx) before calling CallRealMode. Patch by andy-123, applied to a secondary location by me. CORE-10511 #resolve #comment Thanks. I added the same fix to PnpBiosGet below. svn path=/trunk/; revision=70407
This commit is contained in:
parent
03e066f2f1
commit
cf2573f733
1 changed files with 14 additions and 0 deletions
|
@ -104,10 +104,18 @@ pnp_not_found:
|
||||||
PUBLIC PnpBiosGetDeviceNodeCount
|
PUBLIC PnpBiosGetDeviceNodeCount
|
||||||
PnpBiosGetDeviceNodeCount:
|
PnpBiosGetDeviceNodeCount:
|
||||||
|
|
||||||
|
/* Save param-regs */
|
||||||
|
push rcx
|
||||||
|
push rdx
|
||||||
|
|
||||||
/* Call the real mode function */
|
/* Call the real mode function */
|
||||||
mov bx, FNID_PnpBiosGetDeviceNodeCount
|
mov bx, FNID_PnpBiosGetDeviceNodeCount
|
||||||
call CallRealMode
|
call CallRealMode
|
||||||
|
|
||||||
|
/* Restore param-regs */
|
||||||
|
pop rdx
|
||||||
|
pop rcx
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ax, [BSS_PnpNodeSize]
|
mov ax, [BSS_PnpNodeSize]
|
||||||
mov [rcx], eax
|
mov [rcx], eax
|
||||||
|
@ -140,10 +148,16 @@ PnpBiosGetDeviceNode:
|
||||||
and eax, HEX(0f)
|
and eax, HEX(0f)
|
||||||
mov word ptr [BSS_PnpBiosBufferOffset], ax
|
mov word ptr [BSS_PnpBiosBufferOffset], ax
|
||||||
|
|
||||||
|
/* Save rcx */
|
||||||
|
push rcx
|
||||||
|
|
||||||
/* Call the real mode function */
|
/* Call the real mode function */
|
||||||
mov bx, FNID_PnpBiosGetDeviceNode
|
mov bx, FNID_PnpBiosGetDeviceNode
|
||||||
call CallRealMode
|
call CallRealMode
|
||||||
|
|
||||||
|
/* Restore rcx */
|
||||||
|
pop rcx
|
||||||
|
|
||||||
/* update node number */
|
/* update node number */
|
||||||
mov al, byte ptr [BSS_PnpNodeNumber]
|
mov al, byte ptr [BSS_PnpNodeNumber]
|
||||||
mov [rcx], al
|
mov [rcx], al
|
||||||
|
|
Loading…
Reference in a new issue