#480 closed defect (unknown)
bug in invoking SaveResume device driver command on device driver chain
| Reported by: | Lars Erdmann | Owned by: | eco |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | APM Compatibility Driver | Version: | 3.14 |
| Keywords: | Cc: |
Description
There a a couple of errors in an attempt to send a SaveResume request packet to all device drivers in the device driver chain: For once, the request packet is wrong, additionally the function code 20h (SaveResume) is overwritten with 0 (DEVICE init). See corrections below
file "thunk.asm":
the request packet should look like this:
SRPacket db 14 ; Size
db 0 ; Unit
db 20h ; Cmd
dw 0 ; Status
db 0 ; Flag
db 0,0,0 ; Reserved
dd 0 ; Link
db 0 ; Save/Restore
likewise at label "To16DDNotify"
delete this line:
mov Word Ptr es:[bx+3],0
Change History (4)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Version: | 3.17 → 3.14 |
|---|
1.) correction: move Word Ptr es:[bx+3],0 has to stay in. I confused this with the offset for the command code. Nevertheless this call should be moved INSIDE the loop that invokes all device drivers entry points because it might be potentially set by each device driver
2.) maybe this code as a whole is obsolete with newer versions of APM.ADD. Will check
comment:3 by , 14 years ago
| Resolution: | → unknown |
|---|---|
| Status: | new → closed |

routine "SendDDNotify" : maybe it's also a very good idea to call KernSerialize16BitDD/KernUnserialize16BitDD before/after traversing the device driver chain and invoking SaveRestore on each driver. I think that could be necessary for SMP system to properly serialize access to all the device drivers.