[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:
Timo Kreuzer 2015-12-21 19:36:10 +00:00
parent 03e066f2f1
commit cf2573f733

View file

@ -104,10 +104,18 @@ pnp_not_found:
PUBLIC PnpBiosGetDeviceNodeCount
PnpBiosGetDeviceNodeCount:
/* Save param-regs */
push rcx
push rdx
/* Call the real mode function */
mov bx, FNID_PnpBiosGetDeviceNodeCount
call CallRealMode
/* Restore param-regs */
pop rdx
pop rcx
xor eax, eax
mov ax, [BSS_PnpNodeSize]
mov [rcx], eax
@ -140,10 +148,16 @@ PnpBiosGetDeviceNode:
and eax, HEX(0f)
mov word ptr [BSS_PnpBiosBufferOffset], ax
/* Save rcx */
push rcx
/* Call the real mode function */
mov bx, FNID_PnpBiosGetDeviceNode
call CallRealMode
/* Restore rcx */
pop rcx
/* update node number */
mov al, byte ptr [BSS_PnpNodeNumber]
mov [rcx], al