- Timestamp:
- Sep 4, 2000, 4:03:35 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/win32k.txt
r2898 r4180 1 2.3 .0 Win32k.sys - native OS/2 PE-"loader"2 -------------------------------------- --1 2.3 Win32k.sys - native OS/2 PE-loader 2 -------------------------------------- 3 3 4 4 The win32k.sys driver makes PE (Win32) executables equal to native OS/2 5 executables by implementing a Ring 0 on-the-fly converter. The converter is 6 Pe2Lx.exe. So, everything that works with Pe2Lx will probably work with 7 win32k.sys. And vice versa, when Pe2lx can't handle it, win32k.sys won't either. 5 executables by implementing a Ring 0 on-the-fly loader / converter. 8 6 9 7 You may wonder how you may run a Win32 program using a device driver. You … … 13 11 14 12 For example, if you fancy playing windows solitaire. 15 1) Make sure the necessary DLLs are in you (BEGIN/END)LIBPATH,16 and that SOL.EXE is in the current directory or the directory you17 specify.13 1) Make sure the necessary DLLs (MSVCRT.DLL and CARDS.DLL) are in you 14 PATH, current dir, SOL.EXE dir, Odin32 System32 dir, Odin32 System dir, 15 Odin32 dir, or LIBPATHs; and that you have SOL.EXE somewhere. 18 16 19 17 2) Then start SOL.EXE by simply typing SOL.EXE (with path if necessary). … … 31 29 We are not responsible for ANYTHING AT ALL! See Odin32 disclaimer... 32 30 33 Before you install win32k.sys make sure that you have a backdoor to your system31 Before you install Win32k.sys make sure that you have a backdoor to your system 34 32 which works. For example try to boot your system using the Alt+F1 during bootup 35 33 and choose Commandline boot (F2). Make sure you have an textmode editor which … … 40 38 ------------------ 41 39 42 Win32k should work on any Warp 4 or Warp Server for e-business installations 43 which Odin32 works on. It no longer requires a kernel file for non-debug 44 kernels. Win32k does now contain a "database" for the most recent retail 45 kernels. Currently this is: 46 Warp 4 fp#5 -> fp#12 47 Aurora GA 40 Win32k should at least work on OS/2 Warp 3 and above, but I don't get too 41 surprised if it worked on 2.11 too. DBCS are not supported yet AFAIK. 42 43 It no longer requires a kernel file for retail kernels (if you don't know what 44 kernel you have, you have a retail kernel). Win32k does now contain a 45 "database" for the most recent retail kernels. Currently this is: 46 Warp 4 fp#1 -> fp#14 47 Aurora GA, FP1, preFP2 48 48 Warp 3 fp#32-> fp#42 49 49 50 50 If the running kernel is not found in the "database" or is a debug kernel 51 wink32.sys will look for symbolfiles as it allways has.51 wink32.sys will look for symbolfiles as it allways did. 52 52 If you use the -s:<symfile> argument the given symbol file will be 53 53 investigated before the database is searched. … … 57 57 appreciated. 58 58 59 For those playing with debug-kernels, make sure that OS2KRNL.SYM is matching 60 the running kernel. 61 59 NOTE! A piece of advice for those playing with debug-kernels: Make sure that 60 c:\OS2KRNL.SYM is matching the running kernel. 62 61 63 62 2.3.2.1 Warp 3 … … 68 67 (Fixpack 32 + y2kclock.exe is required for Y2K readyness anyway so...) 69 68 69 2.3.2.1 OS/2 2.11 70 ----------------- 71 72 For the curiose user, Win32k.sys will probably work with OS/2 2.11 too. 73 I've not test this. But I have run successful Ring-3 tests against the 74 lates 2.11 fixpack kernels. 75 70 76 71 77 2.3.3 Installation … … 73 79 74 80 To use Win32k.sys you have to add the following line into your config.sys: 75 device=<d:\path\ >win32k.sys76 77 Where <d:\path\ > is the path to the win32k.sys, i.e. the odin32 executables78 directory.81 device=<d:\path\system32>win32k.sys 82 83 Where <d:\path\system32> is the path to the win32k.sys, i.e. usually the odin32 84 system32 directory. 79 85 80 86 After doing this, you'll have to reboot your machine to load the driver. During 81 87 the boot process you will on a successful installation see some lines of 82 88 technical info and finally a line saying: 83 'Win32k.sys succesfully initiated!' 84 85 If you don't see the line above something is wrong. 89 Win32k - Odin32 support driver. 90 Build: 14046 - v20.45 91 Found symbolfile: Win32k Symbol Database 92 Win32k.sys succesfully initiated! 93 94 If you don't see the last line something is wrong, and some error info will be 95 shown. In the case of error the 'rc=<value>' is important to remember. 86 96 87 97 … … 103 113 Default: symbol "database" and default locations are searched. 104 114 115 116 Loader parameters: 117 -SCript:<Y|N> Enable / disable UNIX script support. 118 Default: Enabled. 119 120 -REXX:<Y|N> Enable / disable pure REXX script support. 121 Default: Enabled. 122 123 -Java:<Y|N> Enable / disable JAVA loading. 124 125 -PE:<MIXED|PE2LX|PE|NOT> 126 Enabled / disable and set mode of the PE loading. 127 MIXED: Mix of Pe2Lx and Pe.exe. It uses Pe2Lx when 128 possible and backs out to pe.exe if the executables 129 aren't supported by the converter. 130 PE2LX: Pe2Lx loader only. 131 PE: Pe.exe only. The program is started using Pe.exe, 132 and the process name will be pe.exe. 133 NOT: Disable PE loading. 134 135 105 136 Logging parameters: 106 137 -L<:E|:D> Enables/Disables logging. 107 138 Default: disabled. 108 139 109 -C<1|2> Which com-port to log to. 140 -Com:<1|2|3|4> 141 or 142 -C<1|2|3|4> Which com-port to log to. 110 143 Default: -C2 111 144 145 -Warning:<1|2|3|4> 146 or 112 147 -W<1|2|3|4> Warning/info level for PE loader. (This is warnings and info 113 148 which is published thru the com-port as logging information.) 114 149 Default: -W0 115 150 151 116 152 Heap parameters: 117 153 -HEAPMax: Maximum swappable heap size in bytes. … … 127 163 Default: 16MB 128 164 129 -SCript<:Y|:N> Enable / disable UNIX script support.130 Default: Enabled.131 165 132 166 Obsolete: … … 134 168 135 169 136 2.3.5 Rings - Ring 0 / Ring 3 170 2.3.5 PE Loading 171 ---------------- 172 173 Win32k.sys are able to do PE loading in two different ways. 174 175 2.3.5.1 PE2LX 176 ------------- 177 The first one is called PE2LX and hence uses the original Win32k.sys method 178 which is similar to Pe2Lx. This only requires that KERNEL32.DLL (ie. Odin32 179 System32 directory) is present somewhere in the PATH or LIBPATHs. The DLL 180 search order of PE2LX is now conforming with the Win32 order: 181 1. The directory of the executable (.EXE). 182 2. The current directory. 183 3. The Odin32 System32 directory. (Kernel32.dll directory) 184 4. The Odin32 System directory. (sibling of system32) 185 5. The Odin32 directory. (parent of system32) 186 6. The PATH environment variable. (TODO: quotes are not currently supported) 187 7. The BEGINLIBPATH. 188 8. The LIBPATH. 189 9. The ENDLIBPATH. 190 (Note that the OS/2 DLLs in the _Odin32_ process are also found using this 191 search order. This shouldn't matter much as nearly all of the OS/2 DLL are 192 allready loaded. But if this proves a problem it could be changed.) 193 194 2.3.5.2 PE 195 ---------- 196 The second one is called PE and invokes the Pe.EXE to execute the PE (Win32) 197 programs. This of course requies that PE.EXE is found in the PATH. 198 199 2.3.5.3 Modes 200 -------------- 201 Win32k.sys have three (or four) different ways of combining these two methods, 202 called modes: 203 PE2LX only 204 PE only 205 PE2LX with fallback on PE. 206 (fourth: NOT load any PE executables at all) 207 208 The last one is the default one and is probably the best one currently. 209 210 211 2.3.6 UNIX Shell Script Loader 212 ------------------------------ 213 214 The UNIX Shell Script Loader makes OS/2 able to run UNIX shell scripts as 215 native executables, just as UNIX does. A unix shell script is a text file 216 which has a starting line which specifies the interpreter for the script. 217 218 For example a perl script: 219 #!/bin/perl5 -Sx 220 221 Or the most common one: 222 #! /bin/sh 223 224 Since Most OS/2 systems don't have a /bin directory or a /usr/bin directory 225 the executable specified are looked for in these ways: 226 1. The exact filename specified. 227 2. The filename specified with .EXE extention. 228 3. Search the PATH for the filename (with out path of course). 229 4. Search the PATH for the filename with .EXE extention (and with out path of course). 230 231 So, you could now execute UNIX shell script in OS/2 without even modify the 232 path of the interpreter! 233 234 The UNIX Shell Script Loader is enabled by default. 235 236 237 2.3.6 Pure REXX Loader 238 ---------------------- 239 240 The Pure REXX Loader is a win32k.sys feature which enables REXX script with 241 the extentions .RX and .REX to run as native OS/2 executables. These REXX 242 scripts are executed using kRX.EXE which is found in the Odin32 System32 243 directory. 244 245 When we say "Pure REXX" scripts, that means no use of command line should 246 occure in the script. 247 248 The Pure REXX Loader is enabled by default. 249 250 251 2.3.7 Java Loader/Invoker 252 ------------------------- 253 254 Just for fun, I've added some code which detects JAVA class binaries and 255 executes the class using JAVA.EXE. I first thougth this should be easy, but 256 it turned out to have several problems. 257 So please note the following: 258 - The classname is case sensitive, you have to write the exact class 259 name (with .class extention or what ever extention the file have) 260 when trying to execute a class. This could cause some throuble making 261 WPS program objects for the classes.... 262 - To support executing of .class-files which are not in the current 263 directory win32k.sys send the directory of the .class-file in to 264 java.exe as a '-classpath' option. This option I soon found out had the 265 sideeffect of making JAVA.exe ignore the other CLASSPATH and not use 266 it's default class path. So now the contents of the CLASSPATH env. var. 267 or a generated default classpath is also sent in with the '-classpath' 268 option. 269 - The CLASSPATH environment variable should not be longer than 639 chars. 270 271 When you have successfully installed Win32k.sys try type this at the 272 commandline: 273 c:\java11\demo\hello\hello.class 274 275 This is then printed at my screen: 276 Hello, Warped world! 277 278 The JAVA Loader/Invoker is enabled by default. 279 280 281 2.3.8 Rings - Ring 0 / Ring 3 137 282 ----------------------------- 138 283 … … 141 286 Ring 3, the least priveleged executing level. 142 287 288 289 2.3.9 Win32k Control Center 290 --------------------------- 291 292 In your Odin32 System32 directory there is a program called Win32kCC.exe, 293 this is the Win32k Control Center (Win32kCC). Win32kCC is as the name says 294 a program controlling Win32k.sys. 295 296 Win32kCC allows you to enable, disable and change behaviour of different 297 parts in Win32k.sys. 298 299 For example: You could disable PE loading, or change it from MIXED mode (see 300 2.3.4, -PE) to PE2LX mode. Or change it from PE2LX mode to PE mode to see 301 if PE.EXE does a better job loading an executable. 302 303 Note that the changes would not effect allready loaded executables. 304 305 306 Win32kCC also displays status info on the running Win32k.sys and OS/2 kernel: 307 -Win32k.sys version number 308 -Win32k build time/date 309 -Path of the symbol file which was used (or Win32k Symbol Database). 310 -OS/2 kernel build number fixpack (guess) 311 -OS/2 kernel type as win32k has detected it 312 -Number of Pe2Lx currently loaded modules 313 -Win32k resident and swappable heap stats. 314 315 PS. Beside the "PE Loader" area there is an "Elf Loader" area this is for a 316 future Elf2Lx loader. 317 318 319 320 2.4 The Ring3 conversion utility (PE2LX.EXE) 321 -------------------------------------------- 322 323 PE2LX.EXE was the first method of running Win32 programs under 324 OS/2. It is still provided and also functional but it has been 325 deprecated. Using it is only sensible for debugging certain 326 problems as it requires all DLLs and EXEs to be converted into 327 another file format thus changing the original Win32 files. 328 (It's only future use will be to convert Win32 executable with 329 debuginfo to LX with HLL (IPMD/ICSDEBUG) debuginfo for 330 sourcelevel debugging of Win32 executables under Odin32. This 331 is not yet implemented but are being worked on.)
Note:
See TracChangeset
for help on using the changeset viewer.