Last change
on this file was 211, checked in by David Azarewicz, 2 years ago |
Added workaround to help with VirtualBox issues.
Improved diagnostic messages.
Changed how timeouts are reset and how ctx hooks are triggered.
Added quirk for devices with issues executing some standard commands.
Changed to make /N the default.
|
File size:
1.8 KB
|
Line | |
---|
1 | ; Thunking for ahci32 driver
|
---|
2 | ; Copyright (c) 2018-2023 David Azarewicz
|
---|
3 | ; Author: David Azarewicz <david@88watts.net>
|
---|
4 |
|
---|
5 | EXTRN Dos32FlatDS:ABS
|
---|
6 |
|
---|
7 | ;==========================================================
|
---|
8 | ; 16 bit code segment
|
---|
9 | ;
|
---|
10 | _TEXT16 SEGMENT byte PUBLIC USE16 'CODE'
|
---|
11 | assume ds:nothing, es:nothing
|
---|
12 | IoctlWakeup16 Proc far
|
---|
13 | jmp far ptr FLAT:IoctlWakeup32
|
---|
14 | IoctlWakeup16 endp
|
---|
15 |
|
---|
16 | _TEXT16 ENDS
|
---|
17 |
|
---|
18 | ;==========================================================
|
---|
19 | ; 32 bit data segment
|
---|
20 | ;
|
---|
21 | _DATA segment dword public use32 'DATA'
|
---|
22 |
|
---|
23 | Far16AdrOfIoctlWakeup16 dw offset _TEXT16:IoctlWakeup16
|
---|
24 | dw seg _TEXT16:IoctlWakeup16
|
---|
25 | public Far16AdrOfIoctlWakeup16
|
---|
26 |
|
---|
27 | _DATA ends
|
---|
28 |
|
---|
29 | ;==========================================================
|
---|
30 | ; 32 bit code segment
|
---|
31 | ;
|
---|
32 | _TEXT segment byte public use32 'CODE'
|
---|
33 | assume cs:FLAT
|
---|
34 |
|
---|
35 | EXTRN KernThunkStackTo16:near
|
---|
36 | EXTRN D32ThunkStackTo32:near
|
---|
37 | EXTRN IoctlWakeup:near
|
---|
38 |
|
---|
39 | IoctlWakeup32 Proc far
|
---|
40 | push ebp
|
---|
41 | mov ebp, esp
|
---|
42 | push ds
|
---|
43 | push es
|
---|
44 | push ebx
|
---|
45 | push esi
|
---|
46 | push edi
|
---|
47 |
|
---|
48 | ; load FLAT selector into ES and DS
|
---|
49 | mov eax, offset Dos32FlatDS
|
---|
50 | mov es, eax
|
---|
51 | mov ds, eax
|
---|
52 | ASSUME ds:FLAT,es:FLAT
|
---|
53 |
|
---|
54 | call D32ThunkStackTo32
|
---|
55 | ASSUME ss:FLAT
|
---|
56 |
|
---|
57 | mov eax, [ebp+8] ; Parameter pointer
|
---|
58 | push eax
|
---|
59 | call IoctlWakeup
|
---|
60 | add esp,4
|
---|
61 | mov ebx, eax
|
---|
62 |
|
---|
63 | call KernThunkStackTo16
|
---|
64 | mov eax, ebx
|
---|
65 |
|
---|
66 | pop edi
|
---|
67 | pop esi
|
---|
68 | pop ebx
|
---|
69 | pop es
|
---|
70 | pop ds
|
---|
71 | pop ebp
|
---|
72 |
|
---|
73 | db 66h ; force 16 bit return
|
---|
74 | retf
|
---|
75 | IoctlWakeup32 EndP
|
---|
76 |
|
---|
77 | _TEXT ends
|
---|
78 |
|
---|
79 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.