Windows research Kernel

Source: Internet
Author: User

Windows research kernel-wrk
The Windows research kernel (wrk) packages core Microsoft Windows XP x64/Server 2003 SP1 kernel source code with an environment for building and testing experimental versions of the Windows Kernel for use in teaching and research.

Issuing a license:

Http://www.microsoft.com/resources/sharedsource/licensingbasics/wrklicense.mspx

:
Http://www.microsoft.com/education/facultyconnection/software/softwaredetails.aspx? Cid = 106

In addition to drive development online also have download WRK-v1.2!

Simply paste readme.txt:

Copyright (c) Microsoft Corporation. All rights reserved.

You may only use this code if you agree to the terms
The Windows research kernel source code License Agreement
(See license.txt). If you do not agree to the terms, do not use the code.

***

Wrk v1.2

The Windows research kernel v1.2 contains the sources for the core
The windows (ntos) kernel and a Build Environment for a kernel that will run on
X86 (Windows Server 2003 Service Pack 1) and
Amd64 (Windows XP x64 professional)
A future version may also support booting wrk kernels on Windows XP x86 systems,
But the current kernels will fail to boot due to differences in some shared structures.

The ntos kernel implements the basic OS Functions
For processes, threads, virtual memory and cache managers, I/O management,
The Registry, executive functions such as the Kernel Heap and synchronization,
The object manager, the local procedure call mechanic, the security reference
Monitor, low-level CPU Management (thread scheduling, asynchronous and deferred
Procedure CILS, interrupt/trap handling, exceptions), etc.

The NT hardware action layer, file systems, network stacks, and Device
Drivers are implemented separately from ntos and loaded into Kernel Mode
As dynamic libraries. sources for these dynamic components are not supported DED
In the wrk, but some are available in various development kits published
By Microsoft, such as the installable File System (IFS) Kit and
Windows Driver Development Kit (DDK ).

Wrk v1.2 includes most of the ntos kernel sources from the latest released
Version of Windows, which supports the amd64 architecture on the desktop.
The kernel sources excluded from the kit are primarily in the areas
Plug-and-play, power management, the device verifier, kernel debugger
Interface, and virtual DOS machine. The primary modifications to wrk
From the released kernel are related to cleanup and removal of server
Support, such as Code related to the intel IA64.

***

Organization of the wrk sources

The file license.txt contains the License covering use of the wrk.

The public/directory contains a number of include files shared among System
Components. Base/ntos/contains the ntos sources.

The primary ntos source components encoded in the wrk are organized as follows:

Cache/-cache manager
config/-Registry Implementation
dbgk/-user-mode debugger support
EX/-executive functions (Kernel Heap, synchronization, time)
fsrtl/-file system run-time support
IO/-I/O manager
ke/-schedmanager, CPU management, low-level synchronization
LPC/-Local Procedure Call implementation
mm/-Virtual Memory Manager
ob/-Kernel Object Manager
PS/-process/ thread support
Se/-security functions
WMI/-Windows Management Instrumentation

INC/-ntos-only include files
RTL/-kernel run-time support
Init/-kernel startup

***

Two of the best existing sources for documentation of the ntos kernel are

Microsoft Windows internals, 4th ed 2005, Mark russinovich and David Solomon

The Windows curriculum resource kit (Crk)
Http://www.msdnaa.net/curriculum/pfv.aspx? Id = 6191

Additional information about using Windows for teaching and research
In operating systems is available

Http://www.microsoft.com/resources/sharedsource/Licensing/WindowsAcademic.mspx

Specific questions about use of the wrk, Crk, or projectoz can be directed

Compsci@microsoft.com

Questions about the kernel sources (or Crk or projectoz) can be directed
The msdn Academic Forum Groups (http://forums.microsoft.com/WindowsAcademic)

Curriculum
A Discussion Forum regarding development of operating systems curriculum
Based on the Windows Kernel, including use of the Windows curriculum
Resource Kit, the Windows research kernel, and projectoz.

Kernel
Questions & answers regarding the Windows research kernel,
Its architecture, source code and use in teaching and research.

Projectoz
Questions & answers regarding use of projectoz for teaching and
Research of operating systems topics.

***

Building/deploying a wrk kernel for x86 [or amd64]

0. Copy the wrk into a directory, say % wrk %.
1. Set arch = x86 [or amd64]
2. PATH % wrk %/tools/% arch %; % PATH %
3. cd % wrk %/base/ntos
4. nmake-nologo % arch % =
Will produce kernel files in build/EXE/% arch %
[Wrkx86. * or wrkx64. *]
5. Copy the kernel to % SystemRoot %/system32/
6. If x86, find the multi-processor version of Hal. dll [see below]
7. Add a line to C:/boot. ini of the target system
To boot this kernel and the MP Hal [see below]
8. Reboot and select the boot option for the new kernel
9. You will boot up on a kernel you built/linked yourself!
[Always keep the original boot. ini line and kernel/hal available so you
Can still boot your system if something fails with your wrk kernel modifications]
10. Set up a debugger [see below]

Multi-processor Hal (x86 only, amd64 Hals are all MP)
All Hals are renamed Hal. dll, so you have to use the link command
See what type of Hal. dll really is:
Link-dump-all Hal. dll | findstr PDB
The MP Hals have an 'M' in the native name of the Hal, e.g. halmacpi. dll
You may already have an MP Hal installed on up systems, due to hyperthreading.
If the Hal isn't MP, you need to find the MP Hal that corresponds to the current hal
The target system does have, I. e.
Halacpi. dll-> halacpim. dll; ACPI pic-based PC [used by virtualpc]
Halaacpi. dll-> halmacpi. dll; acpi apic-based PC
Halapic. dll-> halmps. dll; MPS
Look in the wrk ws03sp1hals/x86 directory for the MP Hal you need.

boot. INI
edit boot. INI (you may have to use attrib-H-S-r first)
copy the line for the first operating system listed to the end of the file and edit it.
[boot loader]
timeout = 30
default = multi (0) disk (0) RDISK (0) Partition (2) /Windows
[operating systems]
multi (0) disk (0) RDISK (0) Partition (2)/Windows = "Windows Server 2003, standard "
multi (0) disk (0) RDISK (0) Partition (2)/Windows =" test "/kernel1_wrkx86.exe/hal = halmacpi. DLL
note that the filenames must be short (8.3) names.
you can add additional options for debugging (as specified in the windbg/KD help ).

Debugging wrk
The windbg/KD debuggers will work with the wrk. The documentation is pretty thorough, and
Includes information about how to debug each ss a serial port, locally (examining Kernel
Data from user-mode), and debugging kernels running on virtualpc.

Version 6.6.3.5 of the windbg/KD debuggers is available with the curriculum resource kit
Tools ("curriculumresourcekit-Crk/crktools/debugging tools" directory on the CD ).
The latest version of the Windows debugging tools can be downloaded from
Http://www.microsoft.com/whdc/devtools/debugging.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.