Author: tkreuzer Date: Mon Dec 21 19:36:10 2015 New Revision: 70407
URL: http://svn.reactos.org/svn/reactos?rev=70407&view=rev Log: [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.
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/a... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S [iso-8859-1] Mon Dec 21 19:36:10 2015 @@ -104,9 +104,17 @@ 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] @@ -140,9 +148,15 @@ 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]