# $Id$ # Captive project doc Architecture page Perl template. # Copyright (C) 2003-2005 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; exactly version 2 of June 1991 is required # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package project::captive::doc::Architecture; require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; our $CVS_ID=q$Id$; use strict; use warnings; use My::Web; sub handler { BEGIN { Wuse 'project::captive::doc::Macros'; } project::captive::doc::Macros->init( "title"=>'Captive NTFS Developer Documentation: Architecture', "rel_prev"=>'About.pm', "rel_next"=>'Components.pm', ); print <<"HERE";

Architecture

The principle of the project lies in the glue between Microsoft Windows NT kernel space environment and $gnulinux user space process environment:

@{[ doc_img 'arch-W32','Microsoft Windows Subsystems Architecture' ]} @{[ doc_img 'arch-captive','Captive Subsystems Architecture' ]}

Existing Emulation Projects

There were two well-known $freespeech projects emulating W32 subsystems to reach the compatibility with various W32 components: $Wine and $ReactOS. Sad moment is that the goals of this project do not fit very well into any role in those two ones. Therefore this project went its own way of emulation:

Emulation Projects Characteristics
@{[ a_href '#guestosnote','Guest-OS' ]} @{[ a_href '#hostosnote' ,'Host-OS' ]} Implements W32 kernel library
$Wine $gnulinux W32 user space ntdll.dll
$ReactOS i386 hardware W32 kernel and user space ntoskrnl.exe
this project $gnulinux W32 kernel ntoskrnl.exe
Guest-OS
@{[ a_href 'http://www.vmware.com/support/reference/common/glossary/#guestos','Guest OS' ]}: An operating system that runs inside a virtual machine.
Host OS
@{[ a_href 'http://www.vmware.com/support/reference/common/glossary/#hostos' ,'Host OS' ]}: An operating system that runs on the host machine.

While $ReactOS provides the necessary W32 kernel subsystem emulation code we also need to run such @{[ a_href '#guestosnote','Guest-OS' ]} in the @{[ a_href '#hostosnote','Host-OS' ]} $gnulinux. Initially it was planned to extend $Wine with the W32 kernel space emulation functionality but fortunately Steven Edwards pointed to the $ReactOS which better suits the needs of this project by its already implemented W32 kernel space emulation.

The original reasons for developing $ReactOS still make no sense to the author of this project. Free implementation of W32 platform standalone running on the machine hardware is no longer free as most od the W32 applications are usually closed source and the user still looses its freedom on the application level anyway. Even in the case of available free applications there still remains the disadvantage of loosing the Host-OS platform availability if implemented in the $Wine style. For these ideology incompatibilities not much effort was made for acceptance the fixes and improvements of $ReactOS by this project. Moreover new functionality is not being implemented to the $ReactOS part but it is coded in Gnome style in the project specific source files place.

The most serious problem of $ReactOS is its dependence on the direct i386 hardware instead of some @{[ a_href '#hostosnote','Host-OS' ]} as required by the goals of this project. W32 is designed to be hardware-independent using its hal.dll. Unfortunately $ReactOS does not follow this design and thus there are needed various patches and replaces of its various parts and its hardware-dependent code. Despite it $ReactOS code base still made a big asset for this project.

Some API functions are provided both by ntdll.dll and ntoskrnl.exe in W32. Casper Hornstrup enlightened such functions calling conventions have to be differentiated as ntdll.dll lives in the user space (low address space – below 0x80000000) and ntoskrnl.exe in the kernel space (high address space – above 0x80000000). Although they contain slightly different set of symbols (functions) ntdll.dll still can be considered as a user space interface to the kernel space implementation by ntoskrnl.exe.

Currently there are no plans to ever extend the project's crossplatformity beyond the i386 processor (i386 used here as @{[ a_href 'http://www.intel.com/','Intel' ]} architecture covering 32-bit processors compatible with i386, i486, ...).

Laws and Licensing Conditions

If you are an authorized user of Microsoft Windows NT the laws in some countries give you the right to fully handle the product in any way you want. Therefore you can disassemble the product even in the case you had to agree with the product license forbidding such disassembly as the country laws override any such license agreement.

Microsoft Service Pack

Sometimes you may have the legal license for Microsoft Windows NT but for various technical reasons you do not have the media and/or installation ready at the place of intended use of this project.

Fortunately Microsoft provides $freebeer update packages for its Microsoft Windows products called Service Packs; the latest one is @{[ a_href 'http://www.microsoft.com/WindowsXP/pro/downloads/servicepacks/sp1/checkedbuild.asp','Microsoft Windows XP Service Pack 1a' ]}.

This downloadable file contains the full versions of the essential files needed for the current stage of this product: ntfs.sys and ntoskrnl.exe. It even contains cdfs.sys and fastfat.sys for testing purposes.

Service Pack also contains EULA (End User License Agreement) paper disallowing any use of Service Pack outside its original intentions. According to the laws of some countries you need to be authorized user of the Microsoft Windows XP product to be allowed to use the files contained in such Service Pack without the bindings of its EULA. Even the interpretation of such laws may vary.

It would be a breach of the law by the project author to provide automatic (=hidden) functionality to download and extract the Service Pack files. On the other hand it is perfectly legal to ask user for his/her confirmation whether he/she is really the authorized user of Microsoft Windows XP product and download/extract the Service Pack files accordingly.

@{[ doc_img 'captive-install-acquire-ask','Microsoft Windows Drivers Acquire Affirmation' ]} HERE exit; } 1;