https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d55276aad9496fe820b017...
commit d55276aad9496fe820b017f272c73b6bf53220a3 Author: Jérôme Gardou jerome.gardou@reactos.org AuthorDate: Mon Apr 12 14:16:49 2021 +0200 Commit: Jérôme Gardou zefklop@users.noreply.github.com CommitDate: Wed Apr 28 13:10:23 2021 +0200
[FREELDR] Save used register when calling PNPBIOS --- boot/freeldr/freeldr/arch/amd64/pnpbios.S | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/boot/freeldr/freeldr/arch/amd64/pnpbios.S b/boot/freeldr/freeldr/arch/amd64/pnpbios.S index f97a9d8fb05..8dd44e933ca 100644 --- a/boot/freeldr/freeldr/arch/amd64/pnpbios.S +++ b/boot/freeldr/freeldr/arch/amd64/pnpbios.S @@ -104,7 +104,8 @@ pnp_not_found: PUBLIC PnpBiosGetDeviceNodeCount PnpBiosGetDeviceNodeCount:
- /* Save param-regs */ + /* Save registers */ + push rbx push rcx push rdx
@@ -115,6 +116,7 @@ PnpBiosGetDeviceNodeCount: /* Restore param-regs */ pop rdx pop rcx + pop rbx
xor eax, eax mov ax, [BSS_PnpNodeSize] @@ -148,14 +150,16 @@ PnpBiosGetDeviceNode: and eax, HEX(0f) mov word ptr [BSS_PnpBiosBufferOffset], ax
- /* Save rcx */ + /* Save registers */ push rcx + push rbx
/* Call the real mode function */ mov bx, FNID_PnpBiosGetDeviceNode call CallRealMode
- /* Restore rcx */ + /* Restore registers */ + pop rbx pop rcx
/* update node number */