&My::Web::footer call is deprecated now, use just: exit;
[www.jankratochvil.net.git] / project / captive / doc / Architecture.pm
1 # $Id$
2 # Captive project doc Architecture page Perl template.
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 package project::captive::doc::Architecture;
20 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
22 our $CVS_ID=q$Id$;
23 use strict;
24 use warnings;
25
26 use My::Web;
27
28
29 sub handler
30 {
31         BEGIN { Wuse 'project::captive::doc::Macros'; }
32 project::captive::doc::Macros->init(
33                 "title"=>'Captive NTFS Developer Documentation: Architecture',
34                 "rel_prev"=>'About.pm',
35                 "rel_next"=>'Components.pm',
36                 );
37
38
39 print <<"HERE";
40
41
42 <h1>Architecture</h1>
43
44         <p>The principle of the
45         project lies in the glue between
46         <span class="productname">Microsoft Windows NT</span> kernel space
47         environment and $gnulinux user space process environment:</p>
48
49         @{[ doc_img 'arch-W32','Microsoft Windows Subsystems Architecture' ]}
50         @{[ doc_img 'arch-captive','Captive Subsystems Architecture' ]}
51         
52         <h2 id="existing_emulation">Existing Emulation Projects</h2>
53
54                 <p>There were two well-known $freespeech projects emulating W32 subsystems
55                 to reach the compatibility with various W32 components:
56                 $Wine and $ReactOS. Sad moment is that the goals of this project do not fit
57                 very well into any role in those two ones. Therefore this project went
58                 its own way of emulation:</p>
59
60                 <table border="1" class="margin-center">
61                         <caption>Emulation Projects Characteristics</caption>
62                         <tr>
63                                 <th>@{[ a_href '#guestosnote','Guest-OS' ]}</th>
64                                 <th>@{[ a_href '#hostosnote' ,'Host-OS'  ]}</th>
65                                 <th>Implements</th>
66                                 <th>W32 kernel library</th>
67                                 </tr>
68                         <tr>
69                                 <td>$Wine</td>
70                                 <td>$gnulinux</td>
71                                 <td>W32 user space</td>
72                                 <td><span class="fname">ntdll.dll</span></td>
73                                 </tr>
74                         <tr>
75                                 <td>$ReactOS</td>
76                                 <td><span class="constant">i386</span> hardware</td>
77                                 <td>W32 kernel and user space</td>
78                                 <td><span class="fname">ntoskrnl.exe</span></td>
79                                 </tr>
80                         <tr style="height: 1ex;"><td colspan="4"></td></tr>
81                         <tr>
82                                 <td>this project</td>
83                                 <td>$gnulinux</td>
84                                 <td>W32 kernel</td>
85                                 <td><span class="fname">ntoskrnl.exe</span></td>
86                                 </tr>
87                 </table>
88
89                 <dl>
90                         <dt id="guestosnote">Guest-OS</dt>
91                         <dd>@{[ a_href 'http://www.vmware.com/support/reference/common/glossary/#guestos','Guest OS' ]}:
92                                 An operating system that runs inside a&nbsp;virtual machine.</dd>
93                         <dt id="hostosnote">Host  OS</dt>
94                         <dd>@{[ a_href 'http://www.vmware.com/support/reference/common/glossary/#hostos' ,'Host  OS' ]}:
95                                 An operating system that runs on the host machine.</dd>
96                 </dl>
97
98                 <p>While $ReactOS provides the necessary W32 kernel subsystem emulation
99                 code we also need to run such @{[ a_href '#guestosnote','Guest-OS' ]} in the
100                 @{[ a_href '#hostosnote','Host-OS' ]} $gnulinux. Initially it was planned to
101                 extend $Wine with the W32 kernel space emulation functionality but
102                 fortunately <span class="author">Steven Edwards</span> pointed to the $ReactOS
103                 which better suits the needs of this project by its already implemented W32
104                 kernel space emulation.</p>
105
106                 <p>The <span id="reactos_nocare">original reasons</span> for developing
107                 $ReactOS still make no sense to the author of this project. Free
108                 implementation of W32 platform standalone running on the machine hardware
109                 is no longer free as most od the W32 applications are usually closed source
110                 and the user still looses its freedom on the application level anyway. Even
111                 in the case of available free applications there still remains the
112                 disadvantage of loosing the Host-OS platform availability if implemented in
113                 the $Wine style. For these ideology incompatibilities not much effort was
114                 made for acceptance the fixes and improvements of $ReactOS by this project.
115                 Moreover new functionality is not being implemented to the $ReactOS part
116                 but it is coded in Gnome style in the project specific source files
117                 place.</p>
118
119                 <p>The most serious problem of $ReactOS is its dependence on the direct
120                 <span class="constant">i386</span> hardware instead of some
121                 @{[ a_href '#hostosnote','Host-OS' ]} as required by the goals of this project.
122                 W32 is designed to be hardware-independent using its
123                 <span class="fname">hal.dll</span>. Unfortunately $ReactOS does not follow
124                 this design and thus there are needed various patches and replaces of its
125                 various parts and its hardware-dependent code. Despite it $ReactOS code
126                 base still made a big asset for this project.</p>
127
128                 <p>Some API functions are provided both by
129                 <span class="fname">ntdll.dll</span> and
130                 <span class="fname">ntoskrnl.exe</span> in W32.
131                 <span class="author">Casper Hornstrup</span> enlightened such functions
132                 calling conventions have to be differentiated as
133                 <span class="fname">ntdll.dll</span> lives in the user space (low address
134                 space &ndash; below <span class="constant">0x80000000</span>) and
135                 <span class="fname">ntoskrnl.exe</span> in the kernel space (high address
136                 space &ndash; above <span class="constant">0x80000000</span>). Although they
137                 contain slightly different set of symbols (functions)
138                 <span class="fname">ntdll.dll</span> still can be considered as a&nbsp;user
139                 space interface to the kernel space implementation by
140                 <span class="fname">ntoskrnl.exe</span>.</p>
141
142                 <p>Currently there are
143                 no plans to ever extend the project's crossplatformity beyond the
144                 <span class="constant">i386</span> processor
145                         (<span class="constant">i386</span> used here as
146                         @{[ a_href 'http://www.intel.com/','Intel' ]} architecture covering 32-bit
147                         processors compatible with <span class="constant">i386</span>,
148                         <span class="constant">i486</span>, ...).</p>
149
150
151         <h2 id="law">Laws and Licensing Conditions</h2>
152
153                 <p>If you are an <span class="productname">authorized user</span> of
154                 <span class="productname">Microsoft Windows NT</span> the laws in some
155                 countries give you the right to fully handle the product in any way you
156                 want. Therefore you can disassemble the product even in the case you had
157                 to agree with the product license forbidding such disassembly as the
158                 country laws override any such license agreement.</p>
159
160                 <h3 id="law_servicepack">Microsoft Service Pack</h3>
161
162                         <p>Sometimes you may have the legal license for
163                         <span class="productname">Microsoft Windows NT</span>
164                         but for various technical reasons you do not have the media and/or
165                         installation ready at the place of intended use of this project.</p>
166
167                         <p>Fortunately <span class="productname">Microsoft</span> provides
168                         $freebeer update packages for its
169                         <span class="productname">Microsoft Windows</span> products called
170                         <span class="productname">Service Packs</span>; the latest one is
171                         <span class="productname">@{[ a_href 'http://www.microsoft.com/WindowsXP/pro/downloads/servicepacks/sp1/checkedbuild.asp','Microsoft Windows XP Service Pack 1a' ]}</span>.</p>
172
173                         <p>This downloadable file contains the full versions of the essential
174                         files needed for the current stage of this product:
175                         <span class="fname">ntfs.sys</span>
176                         and
177                         <span class="fname">ntoskrnl.exe</span>.
178                         It even contains
179                         <span class="fname">cdfs.sys</span> and
180                         <span class="fname">fastfat.sys</span> for testing purposes.</p>
181
182                         <p><span class="productname">Service Pack</span> also contains
183                         EULA (End User License Agreement) paper disallowing any use of
184                         <span class="productname">Service Pack</span> outside its original
185                         intentions. According to the laws of some countries you need to be
186                         <span class="productname">authorized user</span> of the
187                         <span class="productname">Microsoft Windows XP</span> product to be
188                         allowed to use the files contained in such
189                         <span class="productname">Service Pack</span> without the bindings of its
190                         EULA. Even the interpretation of such laws may vary.</p>
191
192                         <p>It would be a&nbsp;breach of the law by the project author to provide
193                         automatic (=hidden) functionality to download and extract the
194                         <span class="productname">Service Pack</span> files. On the other hand it
195                         is perfectly legal to ask user for his/her confirmation whether he/she is
196                         really the <span class="productname">authorized user</span> of
197                         <span class="productname">Microsoft Windows XP</span> product and
198                         download/extract the <span class="productname">Service Pack</span> files
199                         accordingly.</p>
200
201                         @{[ doc_img 'captive-install-acquire-ask','Microsoft Windows Drivers Acquire Affirmation' ]}
202
203
204 HERE
205
206
207 exit;
208 }
209 1;