2 # Captive project doc Architecture page Perl template.
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
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
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.
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
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; };
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',
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>
49 @{[ doc_img 'arch-W32','Microsoft Windows Subsystems Architecture' ]}
50 @{[ doc_img 'arch-captive','Captive Subsystems Architecture' ]}
52 <h2 id="existing_emulation">Existing Emulation Projects</h2>
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>
60 <table border="1" class="margin-center">
61 <caption>Emulation Projects Characteristics</caption>
63 <th>@{[ a_href '#guestosnote','Guest-OS' ]}</th>
64 <th>@{[ a_href '#hostosnote' ,'Host-OS' ]}</th>
66 <th>W32 kernel library</th>
71 <td>W32 user space</td>
72 <td><span class="fname">ntdll.dll</span></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>
80 <tr style="height: 1ex;"><td colspan="4"></td></tr>
85 <td><span class="fname">ntoskrnl.exe</span></td>
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 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>
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>
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
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>
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 – below <span class="constant">0x80000000</span>) and
135 <span class="fname">ntoskrnl.exe</span> in the kernel space (high address
136 space – 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 user
139 space interface to the kernel space implementation by
140 <span class="fname">ntoskrnl.exe</span>.</p>
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>
151 <h2 id="law">Laws and Licensing Conditions</h2>
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>
160 <h3 id="law_servicepack">Microsoft Service Pack</h3>
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>
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>
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>
177 <span class="fname">ntoskrnl.exe</span>.
179 <span class="fname">cdfs.sys</span> and
180 <span class="fname">fastfat.sys</span> for testing purposes.</p>
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>
192 <p>It would be a 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
201 @{[ doc_img 'captive-install-acquire-ask','Microsoft Windows Drivers Acquire Affirmation' ]}