--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
+<project name="ReactOS" makefile="makefile-amd64.auto" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="config-amd64.rbuild">
+ <xi:fallback>
+ <xi:include href="config-amd64.template.rbuild" />
+ </xi:fallback>
+ </xi:include>
+
+ <define name="_M_AMD64" />
+ <define name="_AMD64_" />
+ <define name="_M_AXP64" />
+ <define name="__x86_64__" />
+ <define name="_X86AMD64_" />
+ <define name="_WIN64" />
+
+ <property name="PLATFORM" value="PC"/>
+ <property name="usewrc" value="false"/>
+ <property name="WINEBUILD_FLAGS" value="--kill-at"/>
+ <property name="NTOSKRNL_SHARED" value="-nostartfiles -shared"/>
+ <linkerflag>-enable-stdcall-fixup</linkerflag>
+
+ <if property="OPTIMIZE" value="1">
+ <compilerflag>-Os</compilerflag>
+ <compilerflag>-ftracer</compilerflag>
+ <compilerflag>-momit-leaf-frame-pointer</compilerflag>
+ </if>
+ <if property="OPTIMIZE" value="2">
+ <compilerflag>-Os</compilerflag>
+ </if>
+ <if property="OPTIMIZE" value="3">
+ <compilerflag>-O1</compilerflag>
+ </if>
+ <if property="OPTIMIZE" value="4">
+ <compilerflag>-O2</compilerflag>
+ </if>
+ <if property="OPTIMIZE" value="5">
+ <compilerflag>-O3</compilerflag>
+ </if>
+
+ <compilerflag>-mpreferred-stack-boundary=4</compilerflag>
+ <compilerflag>-fno-strict-aliasing</compilerflag>
+ <compilerflag>-Wno-strict-aliasing</compilerflag>
+ <compilerflag>-Wpointer-arith</compilerflag>
+ <compilerflag>-Wno-uninitialized</compilerflag>
+ <linkerflag>-enable-stdcall-fixup</linkerflag>
+ <linkerflag>-s</linkerflag>
+ <linkerflag>-static</linkerflag>
+
+<!-- Here starts <xi:include href="ReactOS-generic.rbuild" /> -->
+
+ <xi:include href="baseaddress.rbuild" />
+
+ <define name="__REACTOS__" />
+ <if property="DBG" value="1">
+ <define name="DBG">1</define>
+ <define name="_SEH_ENABLE_TRACE" />
+ <property name="DBG_OR_KDBG" value="true" />
+ </if>
+ <if property="KDBG" value="1">
+ <define name="KDBG">1</define>
+ <property name="DBG_OR_KDBG" value="true" />
+ </if>
+
+ <include>.</include>
+ <include>include</include>
+ <include root="intermediate">include</include>
+ <include>include/psdk</include>
+ <include root="intermediate">include/psdk</include>
+ <include>include/dxsdk</include>
+ <include root="intermediate">include/dxsdk</include>
+ <include>include/crt</include>
+ <include>include/crt/mingw32</include>
+ <include>include/ddk</include>
+ <include>include/GL</include>
+ <include>include/ndk</include>
+ <include>include/reactos</include>
+ <include root="intermediate">include/reactos</include>
+ <include root="intermediate">include/reactos/mc</include>
+ <include>include/reactos/libs</include>
+
+ <!-- directory name="base">
+ <xi:include href="base/base.rbuild" />
+ </directory -->
+
+ <directory name="boot">
+ <xi:include href="boot/boot.rbuild" />
+ </directory>
+
+ <!-- directory name="dll">
+ <xi:include href="dll/dll.rbuild" />
+ </directory -->
+
+ <directory name="drivers">
+ <directory name="base">
+ <xi:include href="drivers/base/directory.rbuild" />
+ </directory>
+ <directory name="filesystems">
+ <directory name="cdfs">
+ <xi:include href="drivers/filesystems/cdfs/cdfs.rbuild" />
+ </directory>
+ <directory name="fastfat">
+ <xi:include href="drivers/filesystems/fastfat/vfatfs.rbuild" />
+ </directory>
+ <directory name="ext2">
+ <!-- xi:include href="drivers/filesystems/ext2/ext2.rbuild" / -->
+ </directory>
+ </directory>
+ <directory name="input">
+ <xi:include href="drivers/input/directory.rbuild" />
+ </directory>
+ <directory name="network">
+ <directory name="ndis">
+ <xi:include href="drivers/network/ndis/ndis.rbuild" />
+ </directory>
+ <directory name="tcpip">
+ <xi:include href="drivers/network/tcpip/tcpip.rbuild" />
+ </directory>
+ </directory>
+ <directory name="setup">
+ <xi:include href="drivers/setup/directory.rbuild" />
+ </directory>
+ <directory name="storage">
+ <directory name="class">
+ <directory name="cdrom">
+ <xi:include href="drivers/storage/class/cdrom/cdrom.rbuild" />
+ </directory>
+ <directory name="class2">
+ <xi:include href="drivers/storage/class/class2/class2.rbuild" />
+ </directory>
+ <directory name="disk">
+ <xi:include href="drivers/storage/class/disk/disk.rbuild" />
+ </directory>
+ </directory>
+ <directory name="floppy">
+ <xi:include href="drivers/storage/floppy/floppy.rbuild" />
+ </directory>
+ <directory name="ide">
+ <directory name="atapi">
+ <xi:include href="drivers/storage/ide/atapi/atapi.rbuild" />
+ </directory>
+ </directory>
+ <directory name="port">
+ <xi:include href="drivers/storage/port/directory.rbuild" />
+ </directory>
+ <directory name="scsiport">
+ <xi:include href="drivers/storage/scsiport/scsiport.rbuild" />
+ </directory>
+ </directory>
+ </directory>
+
+ <directory name="hal">
+ <xi:include href="hal/hal.rbuild" />
+ </directory>
+
+ <directory name="include">
+ <xi:include href="include/directory.rbuild" />
+ </directory>
+ <directory name="lib">
+ <xi:include href="lib/lib.rbuild" />
+ </directory>
+
+ <directory name="media">
+ <xi:include href="media/media.rbuild" />
+ </directory>
+
+ <directory name="ntoskrnl">
+ <xi:include href="ntoskrnl/ntoskrnl-amd64hack.rbuild" />
+ </directory>
+
+ <!-- directory name="subsystems">
+ <xi:include href="subsystems/subsystems.rbuild" />
+ </directory -->
+
+ <directory name="tools">
+ <xi:include href="tools/tools.rbuild" />
+ </directory>
+
+<!-- Here ends <xi:include href="ReactOS-generic.rbuild" /> -->
+
+</project>
<define name="__i386__" />
<property name="NTOSKRNL_SHARED" value="-file-alignment=0x1000 -section-alignment=0x1000 -shared"/>
+ <property name="PLATFORM" value="PC"/>
<if property="OPTIMIZE" value="1">
<compilerflag>-Os</compilerflag>
return str;
}
-static LRESULT CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
+static INT_PTR CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
TCHAR buffer[SIZEOF(calc.buffer)];
DWORD n;
return 1L;
}
-static LRESULT CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
+static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
unsigned int x;
RECT rc;
if (IsWindow(calc.hStatWnd))
break;
calc.hStatWnd = CreateDialog(calc.hInstance,
- MAKEINTRESOURCE(IDD_DIALOG_STAT), hWnd, (DLGPROC)DlgStatProc);
+ MAKEINTRESOURCE(IDD_DIALOG_STAT), hWnd, DlgStatProc);
if (calc.hStatWnd != NULL) {
enable_allowed_controls(hWnd, calc.base);
SendMessage(calc.hStatWnd, WM_SETFOCUS, 0, 0);
else
dwLayout = IDD_DIALOG_STANDARD;
- CreateDialog(hInstance, MAKEINTRESOURCE(dwLayout), NULL, (DLGPROC)DlgMainProc);
+ CreateDialog(hInstance, MAKEINTRESOURCE(dwLayout), NULL, DlgMainProc);
while (GetMessage(&msg, NULL, 0, 0)) {
#ifndef USE_KEYBOARD_HOOK
}\r
\r
\r
-static BOOL CALLBACK\r
+static INT_PTR CALLBACK\r
DlgProc(HWND hDlg,\r
UINT Message,\r
WPARAM wParam,\r
Ret = DialogBoxW(hInstance,\r
MAKEINTRESOURCEW(IDD_CHARMAP),\r
NULL,\r
- (DLGPROC)DlgProc) >= 0;\r
+ DlgProc) >= 0;\r
\r
UnregisterMapClasses(hInstance);\r
}\r
_tcscpy(szParameters, _T("/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"));
_tcscat(szParameters, lpFolderCLSID);
- return (int)ShellExecute(NULL, _T("open"), _T("explorer.exe"), szParameters, NULL, SW_SHOWDEFAULT) > 32;
+ return (INT)(INT_PTR)ShellExecute(NULL, _T("open"), _T("explorer.exe"), szParameters, NULL, SW_SHOWDEFAULT) > 32;
}
static INT
/* Macro for calling "rundll32.exe"
According to MSDN, ShellExecute returns a value greater than 32 if the operation was successful. */
-#define RUNDLL(param) ((int)ShellExecute(NULL, _T("open"), _T("rundll32.exe"), (param), NULL, SW_SHOWDEFAULT) > 32)
+#define RUNDLL(param) ((int)(INT_PTR)ShellExecute(NULL, _T("open"), _T("rundll32.exe"), (param), NULL, SW_SHOWDEFAULT) > 32)
hInst = hInstance;
- DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DIALOG), NULL, (DLGPROC) DxDiagWndProc);
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DIALOG), NULL, DxDiagWndProc);
return 0;
}
else
{
HWND hwnd = (HWND)parentWnd;
- SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(id, BN_CLICKED), (LONG)hwnd);
+ SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(id, BN_CLICKED), (LONG_PTR)hwnd);
}
}
}
else
fDrawTips = TRUE;
- if(yoffset != 0 && abs(xoffset) == 1 || xoffset != 0 && abs(yoffset) == 1)
+ if((yoffset != 0 && abs(xoffset) == 1) || (xoffset != 0 && abs(yoffset) == 1))
fDrawTips = TRUE;
//draw horizontal strips
MoveDragCardTo(hdc, ix, iy);
- if(attarget || ix == idestx && iy == idesty)
+ if(attarget || (ix == idestx && iy == idesty))
break;
oldx = (int)x;
//
// associate this class with the window
//
- SetWindowLong(hwnd, 0, (LONG)cs->lpCreateParams);
+ SetWindowLong(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
return 1;
}
//can only drop if card is different colour
- if( mystack[0].IsBlack() && !dragcard.IsRed() ||
- !mystack[0].IsBlack() && dragcard.IsRed() )
+ if( (mystack[0].IsBlack() && !dragcard.IsRed()) ||
+ (!mystack[0].IsBlack() && dragcard.IsRed()) )
{
TRACE("EXIT RowStackDropProc(false)\n");
return false;
}
-BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
}
-BOOL CALLBACK CardBackDlgProc(HWND hDlg,
+INT_PTR CALLBACK CardBackDlgProc(HWND hDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
*/
-BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
-BOOL CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
-BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
-BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+INT_PTR CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+INT_PTR CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
TCITEM item;
hTabWnd = GetDlgItem(hWnd, IDC_TAB);
- hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, (DLGPROC) GeneralPageWndProc);
- hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, (DLGPROC) SystemPageWndProc);
- hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, (DLGPROC) FreeLdrPageWndProc);
- hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, (DLGPROC) ServicesPageWndProc);
- hStartupPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STARTUP_PAGE), hWnd, (DLGPROC) StartupPageWndProc);
- hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, (DLGPROC) ToolsPageWndProc);
+ hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, GeneralPageWndProc);
+ hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, SystemPageWndProc);
+ hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, FreeLdrPageWndProc);
+ hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, ServicesPageWndProc);
+ hStartupPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STARTUP_PAGE), hWnd, StartupPageWndProc);
+ hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc);
LoadString(hInst, IDS_MSCONFIG, szTemp, 256);
SetWindowText(hWnd, szTemp);
break;
case WM_NOTIFY:
- idctrl = (int)wParam;
+ idctrl = wParam;
pnmh = (LPNMHDR)lParam;
if ((pnmh->hwndFrom == hTabWnd) &&
(pnmh->idFrom == IDC_TAB) &&
hInst = hInstance;
- DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, (DLGPROC) MsConfigWndProc);
+ DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, MsConfigWndProc);
return 0;
}
switch (PtrToLong(hRootKey))
{
- case PtrToLong(HKEY_LOCAL_MACHINE):
+ case (((LONG_PTR)HKEY_LOCAL_MACHINE) & 0xff):
_tcscpy(Path, _T("HKLM\\\0"));
break;
- case PtrToLong(HKEY_CURRENT_USER):
+ case (((LONG_PTR)HKEY_CURRENT_USER) & 0xff):
_tcscpy(Path, _T("HKCU\\\0"));
break;
default:
#include "precomp.h"
-BOOL CALLBACK
+INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hLicenseEditWnd;
DialogBox(hInstance,
MAKEINTRESOURCE(IDD_ABOUTBOX),
Info->hMainWnd,
- (DLGPROC)AboutDialogProc);
+ AboutDialogProc);
SetFocus(Info->hTreeView);
}
} MAIN_WND_INFO, *PMAIN_WND_INFO;
-BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* devmgmt.c */
#include "precomp.h"
-BOOL CALLBACK
+INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
}
-BOOL CALLBACK
+INT_PTR CALLBACK
CreateHelpDialogProc(HWND hDlg,
UINT message,
WPARAM wParam,
}
-BOOL CALLBACK
+INT_PTR CALLBACK
CreateDialogProc(HWND hDlg,
UINT message,
WPARAM wParam,
hHelp = CreateDialog(hInstance,
MAKEINTRESOURCE(IDD_DLG_HELP_OPTIONS),
hDlg,
- (DLGPROC)CreateHelpDialogProc);
+ CreateHelpDialogProc);
if(hHelp != NULL)
{
bHelpOpen = TRUE;
}
-BOOL CALLBACK
+INT_PTR CALLBACK
DeleteDialogProc(HWND hDlg,
UINT message,
WPARAM wParam,
ret = DialogBoxParam(hInstance,
MAKEINTRESOURCE(IDD_DLG_CREATE),
Info->hMainWnd,
- (DLGPROC)CreateDialogProc,
+ CreateDialogProc,
(LPARAM)Info);
if (ret == IDOK)
RefreshServiceList(Info);
DialogBoxParam(hInstance,
MAKEINTRESOURCE(IDD_DLG_DELETE),
Info->hMainWnd,
- (DLGPROC)DeleteDialogProc,
+ DeleteDialogProc,
(LPARAM)Info);
}
else
DialogBox(hInstance,
MAKEINTRESOURCE(IDD_ABOUTBOX),
Info->hMainWnd,
- (DLGPROC)AboutDialogProc);
+ AboutDialogProc);
SetFocus(Info->hListView);
break;
} MAIN_WND_INFO, *PMAIN_WND_INFO;
-BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK ProgressDialogProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK ProgressDialogProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam);
/* servman.c */
}
}
-BOOL CALLBACK
+INT_PTR CALLBACK
ProgressDialogProc(HWND hDlg,
UINT Message,
WPARAM wParam,
hProgDlg = CreateDialog(hInstance,
MAKEINTRESOURCE(IDD_DLG_PROGRESS),
hParent,
- (DLGPROC)ProgressDialogProc);
+ ProgressDialogProc);
if (hProgDlg != NULL)
{
/* write the info to the progress dialog */
if (CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_GENERAL),
pInfo->hTab,
- (DLGPROC)GeneralDlgProc,
+ GeneralDlgProc,
(LPARAM)pInfo))
{
WCHAR str[256];
if (CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_DISPLAY),
pInfo->hTab,
- (DLGPROC)DisplayDlgProc,
+ DisplayDlgProc,
(LPARAM)pInfo))
{
WCHAR str[256];
}
-static BOOL CALLBACK
+static INT_PTR CALLBACK
DlgProc(HWND hDlg,
UINT Message,
WPARAM wParam,
return (DialogBoxParamW(hInst,
MAKEINTRESOURCEW(IDD_CONNECTDIALOG),
NULL,
- (DLGPROC)DlgProc,
+ DlgProc,
(LPARAM)pRdpSettings) == IDOK);
}
if (!*tp) {
tp = cp;
tp2 = tmpbuf;
- while ((*tp2 = *tp) != (int) NULL) {
+ while ((*tp2 = *tp)) {
if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A';
}
if (!*tp) {
tp = argv[2];
tp2 = tmpbuf;
- while ((*tp2 = *tp) != (int) NULL) {
+ while ((*tp2 = *tp)) {
if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A';
}
if (!*tp) {
tp = cp;
tp2 = tmpbuf;
- while ((*tp2 = *tp) != (int) NULL) {
+ while ((*tp2 = *tp)) {
if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A';
}
if (!connected)
return;
(void) command("QUIT");
- cout = (int) NULL;
+ cout = 0;
connected = 0;
data = -1;
if (!proxy) {
#define strcasecmp strcmp
#define strncasecmp strnicmp
-struct timezone {
- int tz_minuteswest; /* minutes W of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
-int gettimeofday(struct timeval *tv, struct timezone *tz);
+void __cdecl _tzset(void);
printf("\n");
(void) fflush(stdout);
}
- if (cout == (int) NULL) {
+ if (cout == 0) {
perror ("No control connection for command");
code = -1;
return (0);
return;
}
dout = dataconn(mode);
- if (dout == (int)NULL)
+ if (!dout)
goto abort;
(void) gettimeofday(&start, (struct timezone *)0);
null();// oldintp = signal(SIGPIPE, SIG_IGN);
}
}
din = dataconn("r");
- if (din == (int)NULL)
+ if (!din)
goto abort;
if (strcmp(local, "-") == 0)
fout = stdout;
if (s < 0) {
perror("ftp: accept");
(void) closesocket(data), data = -1;
- return (int) (NULL);
+ return 0;
}
if(closesocket(data)) {
int iret=WSAGetLastError ();
#include "fake.h"
#include "prototypes.h"
#include <setjmp.h>
+#include <sys/time.h>
//typedef void (*Sig_t)(int);
#define STRU_R 2
#define STRU_P 3
-#define SIGQUIT 1
-#define SIGPIPE 2
-#define SIGALRM 3
-
-
#define FORM_N 1
#define FORM_T 2
#define FORM_C 3
extern int data;
if (connected) {
- if (cout != (int) NULL) {
+ if (cout) {
closesocket(cout);
- cout = (int) NULL;
+ cout = 0;
}
if (data >= 0) {
(void) shutdown(data, 1+1);
}
pswitch(1);
if (connected) {
- if (cout != (int)NULL) {
+ if (cout) {
closesocket(cout);
- cout = (int) NULL;
+ cout = 0;
}
connected = 0;
}
char *argv[];
{
extern struct cmd cmdtab[];
- register struct cmd *c;
+ struct cmd *c;
if (argc == 1) {
register int i, j, w, k;
else if (c == (struct cmd *)0)
printf("?Invalid help command %s\n", arg);
else
- printf("%-*s\t%s\n", HELPINDENT,
+ printf("%-*s\t%s\n", (int)HELPINDENT,
c->c_name, c->c_help);
}
(void) fflush(stdout);
<directory name="route">
<xi:include href="route/route.rbuild" />
</directory>
- <directory name="telnet">
- <xi:include href="telnet/telnet.rbuild" />
- </directory>
+
<directory name="tracert">
<xi:include href="tracert/tracert.rbuild" />
</directory>
DataSize = GetULONG2(&argv[i][2], argv[i + 1], &i);
if (DataSize > ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET))
{
- printf("Bad value for option -l, valid range is from 0 to %d.\n",
+ printf("Bad value for option -l, valid range is from 0 to %I64d.\n",
ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET));
return FALSE;
}
}
- printf("Reply from %s: bytes=%d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr),
+ printf("Reply from %s: bytes=%I64d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr),
size - IphLength - sizeof(ICMP_ECHO_PACKET), Sign, Time, IpHeader->TTL);
if (RelativeTime.QuadPart < MinRTT.QuadPart || !MinRTTSet)
{
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
-<module name="ping" type="win32cui" installbase="system32" installname="ping.exe">
+<module name="ping" type="win32cui" installbase="system32" installname="ping.exe" allowwarnings="true">
<include base="ping">.</include>
<define name="__USE_W32_SOCKETS" />
<define name="_WIN32_IE">0x600</define>
DebugPrint(_T("Rouge packet: header id, process id %d"), TTLExceedHdr->OrigIcmpHeader.id, GetCurrentProcessId());
return -1;
}
- _tprintf(_T("%3Ld ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart);
+ _tprintf(_T("%3I64d ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart);
return 0;
case ECHO_REPLY :
DebugPrint(_T("Rouge packet: header id %d, process id %d"), IcmpHdr->icmpheader.id, GetCurrentProcessId());
return -1;
}
- _tprintf(_T("%3Ld ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart);
+ _tprintf(_T("%3I64d ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart);
return 1;
case DEST_UNREACHABLE :
OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLETEMPLATE | OFN_ENABLEHOOK;
saveas.lpstrDefExt = szDefaultExt;
saveas.lpTemplateName = MAKEINTRESOURCE(DIALOG_ENCODING);
- saveas.lpfnHook = DIALOG_FileSaveAs_Hook;
+ saveas.lpfnHook = (LPOFNHOOKPROC)DIALOG_FileSaveAs_Hook;
if (GetSaveFileName(&saveas)) {
SetFileName(szPath);
#ifdef _MSC_VER
#pragma warning(disable : 4100)
#endif
-BOOL CALLBACK
+INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hLicenseEditWnd;
VOID DIALOG_TimeDate(VOID);
-BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* utility functions */
VOID ShowLastError(void);
case CMD_ABOUT: DialogBox(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_ABOUTBOX),
Globals.hMainWnd,
- (DLGPROC) AboutDialogProc);
+ AboutDialogProc);
break;
case CMD_ABOUT_WINE: DIALOG_HelpAboutWine(); break;
void macro_test(void)\r
{\r
WNDPROC lpfnDlg = MakeProcInstance(MACRO_TestDialogProc, Globals.hInstance);\r
- DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, (DLGPROC)lpfnDlg);\r
+ DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, lpfnDlg);\r
FreeProcInstance(lpfnDlg);\r
macro = szTestMacro;\r
}\r
dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;\r
WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name);\r
if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);\r
- if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD)Callbacks, 0);\r
+ if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD_PTR)Callbacks, 0);\r
}\r
else WINE_WARN("OOM\n");\r
}\r
#include <ctype.h>
#include <stdio.h>
#include <assert.h>
+#include <tchar.h>
#include <windows.h>
#include <richedit.h>
fontinfo.lfPitchAndFamily = 0;
EnumFontFamiliesExW(hdc, &fontinfo, enum_font_proc,
- (LPARAM)hListWnd, 0);
+ (LPARAM)(UINT_PTR)hListWnd, 0);
ZeroMemory(&fmt, sizeof(fmt));
fmt.cbSize = sizeof(fmt);
}
if (opt_print)
- MessageBox(hMainWnd, "Printing not implemented", "WordPad", MB_OK);
+ MessageBox(hMainWnd, _T("Printing not implemented"), _T("WordPad"), MB_OK);
}
static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
ZeroMemory(&cbItem, sizeof(cbItem));
cbItem.mask = CBEIF_TEXT;
cbItem.iItem = idx;
- cbItem.pszText = szBuffer;
+ cbItem.pszText = (ULONG_PTR)szBuffer;
cbItem.cchTextMax = bufferLength-1;
result = SendMessage(hComboEx, CBEM_GETITEM, 0, (LPARAM)&cbItem);
if (!result)
if (!hEditorWnd)
{
- fprintf(stderr, "Error code %u\n", GetLastError());
+ fprintf(stderr, _T("Error code %d\n"), GetLastError());
return -1;
}
assert(hEditorWnd);
mi.cbSize = sizeof(MENUITEMINFOW);
mi.fMask = MIIM_DATA;
if(GetMenuItemInfoW(hMenu, LOWORD(wParam), FALSE, &mi))
- DoOpenFile((LPWSTR)mi.dwItemData);
+ DoOpenFile((LPWSTR)(ULONG_PTR)mi.dwItemData);
}
break;
rcRightPanel.left = rcLeftPanel.right;
rcRightPanel.right = ulInnerWidth - 1;
- if (!LoadString(hInstance, (UINT)MAKEINTRESOURCE(IDS_APPTITLE), szAppTitle, 80))
+ if (!LoadString(hInstance, (UINT_PTR)MAKEINTRESOURCE(IDS_APPTITLE), szAppTitle, 80))
_tcscpy(szAppTitle, TEXT("ReactOS Welcome"));
/* Create main window */
--- /dev/null
+[Version]
+Signature="$ReactOS$
+
+[AddReg]
+HKLM,"SOFTWARE\Classes",,0x00000010
+
+
+; Default key
+HKCR,"*","",0x00000000,""
+HKCR,"*\shellex\ContextMenuHandlers\Open With","",0x00000000,"{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
+
+; Folders
+HKCR,"Folder","",0x00000000,"Folder"
+;HKCR,"Folder\Defaulticon","",0x00000000,"%SystemRoot%\system32\shell32.dll,-4"
+HKCR,"Folder\shell\open\command","",0x00000000,"explorer.exe ""%1"""
+HKCR,"Folder\shell\explore\command","",0x00000000,"explorer.exe /e,""%1"""
+HKCR,"Folder\shell\rootexplore","",0x00000000,"Explore from here"
+HKCR,"Folder\shell\rootexplore\command","",0x00000000,"explorer.exe /e,/root,""%1"""
+
+; Drive property page
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}","",0x00000000,"Drive Property Page Extension"
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; New Object Service
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}","",0x00000000,"ReactOS New Object Service"
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; Rich Text Files
+HKCR,".rtf","",0x00000000,"rtffile"
+HKCR,".rtf\shellnew","",0x00000000,""
+HKCR,".rtf\shellnew","Data",0x00020000,"{\rtf1}"
+HKCR,"rtffile","",0x00000000,"Rich Text Document"
+HKCR,"rtffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\wordpad.exe,-1404"
+HKCR,"rtffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-2"
+HKCR,"rtffile\shell\open","",0x00000000,"Open"
+HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.exe %1"
+
+; Virtual Device Drivers
+HKCR,".386","",0x00000000,"vxdfile"
+HKCR,".vxd","",0x00000000,"vxdfile"
+HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
+HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
+
+; Animated Cursors
+HKCR,".ani","",0x00000000,"anifile"
+HKCR,"anifile","",0x00000000,"Animated Cursor"
+HKCR,"anifile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\main.cpl,-1039"
+HKCR,"anifile\DefaultIcon","",0x00000000,"%1"
+
+; DOS Batch-Files
+HKCR,".bat","",0x00000000,"batfile"
+HKCR,"batfile","",0x00000000,"DOS Batch File"
+HKCR,"batfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-158"
+HKCR,"batfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-153"
+HKCR,"batfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"batfile\shell\open\command","",0x00000000,"""%1"" %*"
+
+HKCR,".cmd","",0x00000000,"cmdfile"
+HKCR,"cmdfile","",0x00000000,"ReactOS Command Script"
+HKCR,"cmdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-159"
+HKCR,"cmdfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-153"
+HKCR,"cmdfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"cmdfile\shell\open\command","",0x00000000,"""%1"" %*"
+
+; Get DOS Applications a Icon
+HKCR,".com","",0x00000000,"comfile"
+HKCR,"comfile","",0x00000000,"DOS Application"
+HKCR,"comfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-160"
+HKCR,"comfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-3"
+
+; Control Panel extensions
+HKCR,".cpl","",0x00000000,"cplfile"
+HKCR,"cplfile","",0x00000000,"Control Panel Extension"
+HKCR,"cplfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-161"
+HKCR,"cplfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+HKCR,"cplfile\shell\cplopen","",0x00000000,"Open with Control Panel"
+HKCR,"cplfile\shell\cplopen\command","",0x00020000,"%SystemRoot%\system32\rundll32.exe shell32.dll,Control_RunDLL %1,%*"
+
+; Cursors
+HKCR,".cur","",0x00000000,"curfile"
+HKCR,"curfile","",0x00000000,"Cursor"
+HKCR,"curfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-162"
+HKCR,"curfile\DefaultIcon","",0x00000000,"%1"
+
+; Dynamic Link Libraries
+HKCR,".dll","",0x00000000,"dllfile"
+HKCR,"dllfile","",0x00000000,"Dynamic Link Library"
+HKCR,"dllfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-163"
+HKCR,"dllfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+
+; Device Drivers
+HKCR,".drv","",0x00000000,"drvfile"
+HKCR,"drvfile","",0x00000000,"Device Driver"
+HKCR,"drvfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-164"
+
+; Applicatons
+HKCR,".exe","",0x00000000,"exefile"
+HKCR,"exefile","",0x00000000,"ReactOS Application"
+HKCR,"exefile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-165"
+HKCR,"exefile\Defaulticon","",0x00000000,"%1"
+HKCR,"exefile\shell\open\command","",0x00000000,"""%1"" %*"
+
+; Fonts
+HKCR,".fon","",0x00000000,"fonfile"
+HKCR,"fonfile","",0x00000000,"Font File"
+HKCR,"fonfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-166"
+HKCR,"fonfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-155"
+
+HKCR,".ttf","",0x00000000,"ttffile"
+HKCR,"ttffile","",0x00000000,"TrueType Font File"
+HKCR,"ttffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-156"
+HKCR,"ttffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-167"
+HKCR,"ttffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\fontview.exe %1"
+
+; Help Files
+HKCR,".hlp","",0x00000000,"hlpfile"
+HKCR,"hlpfile","",0x00000000,"Help File"
+HKCR,"fonfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-168"
+HKCR,"hlpfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-24"
+
+; set MIME type for .html and .htm because Tiny webserver needs it
+HKCR,".htm","",0x00000000,"html"
+HKCR,".htm","Content Type",0x00000000,"text/html"
+
+HKCR,".html","",0x00000000,"html"
+HKCR,".html","Content Type",0x00000000,"text/html"
+
+; Icons
+HKCR,".ico","",0x00000000,"icofile"
+HKCR,"icofile","",0x00000000,"Icon"
+HKCR,"icofile\DefaultIcon","",0x00000000,"%1"
+
+; JPEG Images
+HKCR,".jpg","",0x00000000,"jpegfile"
+HKCR,".jpeg","",0x00000000,"jpegfile"
+HKCR,"jpegfile","",0x00000000,"JPEG Image"
+HKCR,"jpegfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,-1"
+HKCR,"jpegfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; Bitmap Images
+HKCR,".bmp","",0x00000000,"bmpfile"
+HKCR,"bmpfile","",0x00000000,"Bitmap Image"
+HKCR,"bmpfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,-1"
+HKCR,"bmpfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; PNG Images
+HKCR,".png","",0x00000000,"pngfile"
+HKCR,"pngfile","",0x00000000,"PNG Image"
+HKCR,"pngfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,-1"
+HKCR,"pngfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; GIF Images
+HKCR,".gif","",0x00000000,"giffile"
+HKCR,"giffile","",0x00000000,"GIF Image"
+HKCR,"giffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,-1"
+HKCR,"giffile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; Configuration Files
+HKCR,".ini","",0x00000000,"inifile"
+HKCR,"inifile","",0x00000000,"Configuration Settings"
+HKCR,"inifile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-169"
+HKCR,"inifile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"inifile\shell\open\command","",0x00000000,"notepad.exe ""%1"""
+
+; Setup Information Files
+HKCR,".inf","",0x00000000,"inffile"
+HKCR,"inffile","",0x00000000,"Setup Information"
+HKCR,"inffile\FriendlyTypeName","",0x00020000,"%SystemRoot%\system32\setupapi.dll,-2001"
+HKCR,"inffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"inffile\shell\open\command","",0x00000000,"notepad.exe ""%1"""
+HKCR,"inffile\shell\Install","",0x00000000,"Install"
+HKCR,"inffile\shell\Install\command","",0x00020000,"%SystemRoot%\system32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %1"
+
+; Show icons for shortcuts in shell views (lnkfile is handled specially in shell32)
+; Don't display extension for shortcuts
+HKCR,".lnk","",0x00000000,"lnkfile"
+HKCR,".lnk\shellnew","",0x00000000,""
+HKCR,".lnk\shellnew","command",0x00020000,"%SystemRoot%\system32\rundll32.exe appwiz.cpl,NewLinkHere %1"
+HKCR,"lnkfile","",0x00000000,"Shortcut"
+HKCR,"lnkfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-170"
+HKCR,"lnkfile","NeverShowExt",0x00000000,""
+HKCR,"lnkfile","IsShortcut",0x00000000,"yes"
+HKCR,"lnkfile\CLSID","",0x00000000,"{00021401-0000-0000-C000-000000000046}"
+HKCR,"lnkfile\shellex\IconHandler","",0x00000000,"{00021401-0000-0000-C000-000000000046}"
+HKCR,"lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046}","",0x00000000,""
+
+; Text Documents
+HKCR,".log","",0x00000000,"txtfile"
+HKCR,".txt","",0x00000000,"txtfile"
+HKCR,".c","",0x00000000,"txtfile"
+HKCR,".cpp","",0x00000000,"txtfile"
+HKCR,".h","",0x00000000,"txtfile"
+HKCR,".hpp","",0x00000000,"txtfile"
+HKCR,".txt\shellnew","",0x00000000,""
+HKCR,".txt\shellnew","NullFile",0x00020000,""
+HKCR,"txtfile","",0x00000000,"Text Document"
+HKCR,".txt","Content Type",0x00000000,"text/plain"
+HKCR,"txtfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-152"
+HKCR,"txtfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+
+; XML Documents
+HKCR,".xml","",0x00000000,"xmlfile"
+HKCR,"xmlfile","",0x00000000,"XML Document"
+HKCR,".xml","Content Type",0x00000000,"text/xml"
+HKCR,"xmlfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"xmlfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+
+; MSI files
+HKCR,".msi","",0x00000000,"MSI.Package"
+HKCR,"Msi.Package\DefaultIcon","",0x00000000,"msiexec.exe"
+HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec /i %1"
+HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec /f %1"
+HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec /x %1"
+
+HKCR,".pif","",0x00000000,"piffile"
+
+; Registration Entries
+HKCR,".reg","",0x00000000,"regfile"
+HKCR,"regfile","",0x00000000,"Registration Entries"
+HKCR,"regfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-170"
+HKCR,"regfile\DefaultIcon","",0x00020000,"%SystemRoot%\regedit.exe,1"
+HKCR,"regfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"regfile\shell\open","",0x00000000,"Merge"
+HKCR,"regfile\shell\open\command","",0x00000000,"regedit.exe ""%1"""
+
+; Screen Savers
+HKCR,".scr","",0x00000000,"scrfile"
+HKCR,"scrfile","",0x00000000,"Screen Saver"
+HKCR,"scrfile\Defaulticon","",0x00000000,"%1"
+HKCR,"scrfile\shell\config","",0x00000000,"Configure"
+HKCR,"scrfile\shell\config\command","",0x00000000,"""%1"""
+HKCR,"scrfile\shell\install","",0x00000000,"Install"
+HKCR,"scrfile\shell\install\command","",0x00000000,"rundll32.exe desk.cpl,InstallScreenSaver %l"
+HKCR,"scrfile\shell\open","",0x00000000,"Test"
+HKCR,"scrfile\shell\open\command","",0x00000000,"""%1"" /S"
+
+; shell command files (e.g. "Show Desktop" in quicklaunch bar)
+HKCR,".scf","",0x00000000,"SHCmdFile"
+HKCR,"SHCmdFile","NeverShowExt",0x00000000,""
+HKCR,"SHCmdFile","IsShortcut",0x00000000,"yes"
+HKCR,"SHCmdFile\shell\open\command","",0x00000000,"explorer.exe ""%1"""
+HKCR,"SHCmdFile\CLSID","",0x00000000,"{57651662-CE3E-11D0-8D77-00C04FC99D61}"
+HKCR,"SHCmdFile\shellex\IconHandler","",0x00000000,"{57651662-CE3E-11D0-8D77-00C04FC99D61}"
+
+; System-Files
+HKCR,".sys","",0x00000000,"sysfile"
+HKCR,"sysfile","",0x00000000,"System File"
+HKCR,"regfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-171"
+HKCR,"sysfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+
+; URL shortcuts (e.g. used in favorites folder of IExplorer)
+HKCR,".url","",0x00000000,"InternetShortcut"
+HKCR,"InternetShortcut","NeverShowExt",0x00000000,""
+HKCR,"InternetShortcut","IsShortcut",0x00000000,"yes"
+HKCR,"InternetShortcut\shell\open\command","",0x00000000,"rundll32.exe shdocvw.dll,OpenURL %l"
+HKCR,"InternetShortcut\DefaultIcon","",0x00020000,"%SystemRoot%\system32\url.dll,0"
+
+; Wave Sounds
+HKCR,".wav","",0x00000000,"SoundRec"
+HKCR,"SoundRec","",0x00000000,"Wave Sound"
+HKCR,"SoundRec\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-225"
+
+HKCR,"CLSID",,0x00000012
+
+; For Shell32.dll
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}","",0x00000000,"Desktop"
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}","",0x00000000,"Shortcut"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\shellex\MayChangeDefaultMenu","",0x00000000,""
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}","",0x00000000,"Shellfolder"
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}","",0x00000000,"IShellLinkA"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}","",0x00000000,"IShellLinkW"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}","",0x00000000,"Computer Search Results Folder"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-30521"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-135"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\ShellFolder","Attributes",0x00010001,0x20180000
+
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}","",0x00000000,"Shell Drag and Drop helper"
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; Folder Options CPL
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","",0x00000000,"Folder Options"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-150"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-210"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\shell\Open\command","",0x00000000,"rundll32.exe shell32.dll,Options_RunDLL 0"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\shell\RunAs\command","",0x00000000,"rundll32.exe shell32.dll,Options_RunDLL 0"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\ShellFolder","Attributes",0x00010001,0x00000000
+
+; Open With shell extension
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}","",0x00000000,"Open With Context Menu Handler"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\shellex\MayChangeDefaultMenu","",0x00000000,""
+HKCR,"SystemFileAssociations","",0x00000000,""
+HKCR,"Applications","",0x00000000,""
+
+; Recycle bin is not implemented
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-8964"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","InfoTip",0x00020000,"@%SystemRoot%\system32\shell32.dll,-22915"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","IntroText",0x00020000,"@%SystemRoot%\system32\shell32.dll,-31748"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","SortOrderIndex",0x00010001,0x00000060
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,31"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Empty",0x00020000,"%SystemRoot%\system32\shell32.dll,31"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Full",0x00020000,"%SystemRoot%\system32\shell32.dll,32"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","Attributes",0x00010001,0x20000140
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","CallForAttributes",0x00010001,0x00000040
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\ContextMenuHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,""
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\PropertySheetHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,""
+
+HKCR,"CLSID\{00000320-0000-0000-C000-000000000046}","",0x00000000,"PSFactoryBuffer"
+HKCR,"CLSID\{00000320-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"ole32.dll"
+HKCR,"CLSID\{00000320-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Both"
+
+; StdGlobalInterfaceTable from winedefault.reg
+;HKCR,"CLSID\{00000323-0000-0000-C000-000000000046}","",0x00000000,"StdGlobalInterfaceTable"
+;HKCR,"CLSID\{00000323-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"ole32.dll"
+;HKCR,"CLSID\{00000323-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; deskadp.dll shell extension
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display Adapter CPL Extension"
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskadp.dll"
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; deskmon.dll shell extension
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display Monitor CPL Extension"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskmon.dll"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; For comcat.dll
+HKCR,"CLSID\{0002E005-0000-0000-C000-000000000046}","",0x00000000,"StdComponentCategoriesMgr"
+HKCR,"CLSID\{0002E005-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"comcat.dll"
+HKCR,"CLSID\{0002E005-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Both"
+
+; For TCPIP Protocol property page
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}","",0x00000000,"TCP/IP Configuration Notify Object"
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}\InProcServer32","",0x00000000,"netcfgx.dll"
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}\InProcServer32","ThreadingModel",0x00000000,"Both"
+
+; For dxdiagn.dll
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}","",0x00000000,"DxDiagProvider Class"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\InProcServer32","",0x00000000,"%SystemRoot%\system32\dxdiagn.dll"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\ProgID","",0x00000000,"DxDiag.DxDiagProvider.1"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\VersionIndependentProgID","",0x00000000,"DxDiag.DxDiagProvider"
+
+HKCR,"Interface",,0x00000012
+
+; For Ole32.dll
+HKCR,"Interface\{00000000-0000-0000-C000-000000000046}","",0x00000000,"IUnknown"
+HKCR,"Interface\{00000000-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,""
+HKCR,"Interface\{00000000-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"3"
+HKCR,"Interface\{00000000-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000001-0000-0000-C000-000000000046}","",0x00000000,"IClassFactory"
+HKCR,"Interface\{00000001-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"5"
+HKCR,"Interface\{00000001-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000002-0000-0000-C000-000000000046}}","",0x00000000,"IMalloc"
+HKCR,"Interface\{00000002-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+
+HKCR,"Interface\{00000003-0000-0000-C000-000000000046}","",0x00000000,"IMarshal"
+HKCR,"Interface\{00000003-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+
+HKCR,"Interface\{00000004-0000-0000-C000-000000000046}","",0x00000000,"IRpcChannel"
+HKCR,"Interface\{00000004-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+
+HKCR,"Interface\{00000005-0000-0000-C000-000000000046}","",0x00000000,"IRpcStub"
+HKCR,"Interface\{00000005-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"8"
+
+HKCR,"Interface\{00000006-0000-0000-C000-000000000046}","",0x00000000,"IStubManager"
+
+HKCR,"Interface\{00000007-0000-0000-C000-000000000046}","",0x00000000,"IRpcProxy"
+HKCR,"Interface\{00000007-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"5"
+
+HKCR,"Interface\{00000008-0000-0000-C000-000000000046}","",0x00000000,"IProxyManager"
+
+HKCR,"Interface\{00000009-0000-0000-C000-000000000046}","",0x00000000,"IPSFactory"
+HKCR,"Interface\{00000009-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"5"
+
+HKCR,"Interface\{0000000A-0000-0000-C000-000000000046}","",0x00000000,"ILockBytes"
+HKCR,"Interface\{0000000A-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"10"
+HKCR,"Interface\{0000000A-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000000B-0000-0000-C000-000000000046}","",0x00000000,"IStorage"
+HKCR,"Interface\{0000000B-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"18"
+HKCR,"Interface\{0000000B-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000000C-0000-0000-C000-000000000046}","",0x00000000,"IStream"
+HKCR,"Interface\{0000000C-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"14"
+HKCR,"Interface\{0000000C-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000000D-0000-0000-C000-000000000046}","",0x00000000,"IEnumSTATSTG"
+HKCR,"Interface\{0000000D-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{0000000D-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000000E-0000-0000-C000-000000000046}","",0x00000000,"IBindCtx"
+HKCR,"Interface\{0000000E-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"13"
+HKCR,"Interface\{0000000E-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000000F-0000-0000-C000-000000000046}","",0x00000000,"IMoniker"
+HKCR,"Interface\{0000000F-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{00000109-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000000F-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"23"
+HKCR,"Interface\{0000000F-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000010-0000-0000-C000-000000000046}","",0x00000000,"IRunningObjectTable"
+HKCR,"Interface\{00000010-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"10"
+HKCR,"Interface\{00000010-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000011-0000-0000-C000-000000000046}","",0x00000000,"IInternalMoniker"
+
+HKCR,"Interface\{00000012-0000-0000-C000-000000000046}","",0x00000000,"IRootStorage"
+HKCR,"Interface\{00000012-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"4"
+HKCR,"Interface\{00000012-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000013-0000-0000-C000-000000000046}","",0x00000000,"IDfReserved1"
+
+HKCR,"Interface\{00000014-0000-0000-C000-000000000046}","",0x00000000,"IDfReserved2"
+
+HKCR,"Interface\{00000015-0000-0000-C000-000000000046}","",0x00000000,"IDfReserved3"
+
+HKCR,"Interface\{00000016-0000-0000-C000-000000000046}","",0x00000000,"IMessageFilter"
+HKCR,"Interface\{00000016-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"6"
+
+HKCR,"Interface\{00000018-0000-0000-C000-000000000046}","",0x00000000,"IStdMarshalInfo"
+HKCR,"Interface\{00000018-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"4"
+
+HKCR,"Interface\{00000100-0000-0000-C000-000000000046}","",0x00000000,"IEnumUnknown"
+HKCR,"Interface\{00000100-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000100-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000101-0000-0000-C000-000000000046}","",0x00000000,"IEnumString"
+HKCR,"Interface\{00000101-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000101-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000102-0000-0000-C000-000000000046}","",0x00000000,"IEnumMoniker"
+HKCR,"Interface\{00000102-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000102-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000103-0000-0000-C000-000000000046}","",0x00000000,"IEnumFORMATETC"
+HKCR,"Interface\{00000103-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000103-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000104-0000-0000-C000-000000000046}","",0x00000000,"IEnumOLEVERB"
+HKCR,"Interface\{00000104-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000104-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000105-0000-0000-C000-000000000046}","",0x00000000,"IEnumSTATDATA"
+HKCR,"Interface\{00000105-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000105-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000106-0000-0000-C000-000000000046}","",0x00000000,"IEnumGeneric"
+
+HKCR,"Interface\{00000107-0000-0000-C000-000000000046}","",0x00000000,"IEnumHolder"
+
+HKCR,"Interface\{00000108-0000-0000-C000-000000000046}","",0x00000000,"IEnumCallback"
+
+HKCR,"Interface\{00000109-0000-0000-C000-000000000046}","",0x00000000,"IPersistStream"
+
+HKCR,"Interface\{00000109-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{0000010C-0000-0000-C000-000000000046}"
+HKCR,"Interface\{00000109-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"8"
+
+HKCR,"Interface\{00000109-0000-0000-C000-000000000046}\OLEViewerIViewerCLSID","",0x00000000,"{7CE551EB-F85C-11CE-9059-080036F12502}"
+HKCR,"Interface\{00000109-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010A-0000-0000-C000-000000000046}","",0x00000000,"IPersistStorage"
+HKCR,"Interface\{0000010A-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{0000010C-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000010A-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"10"
+HKCR,"Interface\{0000010A-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010B-0000-0000-C000-000000000046}","",0x00000000,"IPersistFile"
+HKCR,"Interface\{0000010B-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{0000010C-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000010B-0000-0000-C000-000000000046}\Distributor","",0x00000000,"{e436ebb7-524f-11ce-9f53-0020af0ba770}"
+HKCR,"Interface\{0000010B-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{0000010B-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010C-0000-0000-C000-000000000046}","",0x00000000,"IPersist"
+HKCR,"Interface\{0000010C-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"4"
+HKCR,"Interface\{0000010C-0000-0000-C000-000000000046}\OLEViewerIViewerCLSID","",0x00000000,"{7CE551EB-F85C-11CE-9059-080036F12502}"
+HKCR,"Interface\{0000010C-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010D-0000-0000-C000-000000000046}","",0x00000000,"IViewObject"
+HKCR,"Interface\{0000010D-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{0000010D-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010E-0000-0000-C000-000000000046}","",0x00000000,"IDataObject"
+HKCR,"Interface\{0000010E-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"12"
+HKCR,"Interface\{0000010E-0000-0000-C000-000000000046}\OLEViewerIViewerCLSID","",0x00000000,"{28D8ABA0-4B78-11CE-B27D-00AA001F73C1}"
+HKCR,"Interface\{0000010E-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000010F-0000-0000-C000-000000000046}","",0x00000000,"IAdviseSink"
+HKCR,"Interface\{0000010F-0000-0000-C000-000000000046}\AsynchronousInterface","",0x00000000,"{00000150-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000010F-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"8"
+HKCR,"Interface\{0000010F-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000110-0000-0000-C000-000000000046}","",0x00000000,"IDataAdviseHolder"
+HKCR,"Interface\{00000110-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+
+HKCR,"Interface\{00000111-0000-0000-C000-000000000046}","",0x00000000,"IOleAdviseHolder"
+HKCR,"Interface\{00000111-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+
+HKCR,"Interface\{00000112-0000-0000-C000-000000000046}","",0x00000000,"IOleObject"
+HKCR,"Interface\{00000112-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"24"
+HKCR,"Interface\{00000112-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000113-0000-0000-C000-000000000046}","",0x00000000,"IOleInPlaceObject"
+
+HKCR,"Interface\{00000113-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{00000114-0000-0000-C000-000000000046}"
+HKCR,"Interface\{00000113-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{00000113-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000114-0000-0000-C000-000000000046}","",0x00000000,"IOleWindow"
+HKCR,"Interface\{00000114-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"5"
+HKCR,"Interface\{00000114-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000115-0000-0000-C000-000000000046}","",0x00000000,"IOleInPlaceUIWindow"
+HKCR,"Interface\{00000115-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{00000114-0000-0000-C000-000000000046}"
+HKCR,"Interface\{00000115-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{00000115-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000116-0000-0000-C000-000000000046}","",0x00000000,"IOleInPlaceFrame"
+HKCR,"Interface\{00000116-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"15"
+HKCR,"Interface\{00000116-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000117-0000-0000-C000-000000000046}","",0x00000000,"IOleInPlaceActiveObject"
+HKCR,"Interface\{00000117-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{00000114-0000-0000-C000-000000000046}"
+HKCR,"Interface\{00000117-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"10"
+HKCR,"Interface\{00000117-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000118-0000-0000-C000-000000000046}","",0x00000000,"IOleClientSite"
+HKCR,"Interface\{00000118-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{00000118-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{00000119-0000-0000-C000-000000000046}","",0x00000000,"IOleInPlaceSite"
+HKCR,"Interface\{00000119-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{00000114-0000-0000-C000-000000000046}"
+HKCR,"Interface\{00000119-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"15"
+HKCR,"Interface\{00000119-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011A-0000-0000-C000-000000000046}","",0x00000000,"IParseDisplayName"
+HKCR,"Interface\{0000011A-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"4"
+HKCR,"Interface\{0000011A-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011B-0000-0000-C000-000000000046}","",0x00000000,"IOleContainer"
+HKCR,"Interface\{0000011B-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{0000011A-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000011B-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"6"
+HKCR,"Interface\{0000011B-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011C-0000-0000-C000-000000000046}","",0x00000000,"IOleItemContainer"
+HKCR,"Interface\{0000011C-0000-0000-C000-000000000046}\BaseInterface","",0x00000000,"{0000011B-0000-0000-C000-000000000046}"
+HKCR,"Interface\{0000011C-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"9"
+HKCR,"Interface\{0000011C-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011D-0000-0000-C000-000000000046}","",0x00000000,"IOleLink"
+HKCR,"Interface\{0000011D-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"14"
+HKCR,"Interface\{0000011D-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011E-0000-0000-C000-000000000046}","",0x00000000,"IOleCache"
+HKCR,"Interface\{0000011E-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"8"
+HKCR,"Interface\{0000011E-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"Interface\{0000011F-0000-0000-C000-000000000046}","",0x00000000,"IOleManager"
+
+HKCR,"Interface\{00000120-0000-0000-C000-000000000046}","",0x00000000,"IOlePresObj"
+
+HKCR,"Interface\{00000121-0000-0000-C000-000000000046}","",0x00000000,"IDropSource"
+HKCR,"Interface\{00000121-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"5"
+
+HKCR,"Interface\{00000122-0000-0000-C000-000000000046}","",0x00000000,"IDropTarget"
+HKCR,"Interface\{00000122-0000-0000-C000-000000000046}\NumMethods","",0x00000000,"7"
+HKCR,"Interface\{00000122-0000-0000-C000-000000000046}\ProxyStubClsid32","",0x00000000,"{00000320-0000-0000-C000-000000000046}"
+
+HKCR,"NDS\Clsid","",0x00000002,"{323991f0-7bad-11cf-b03d-00aa006e0975}"
+
+HKCR,"WinNT\Clsid","",0x00000002,"{8b20cd60-0f29-11cf-abc4-02608c9e7553}"
+
+
+; For language support:
+
+HKCR,"MIME",,0x00000012
+HKCR,"MIME\Database",,0x00000012
+HKCR,"MIME\Database\Rfc1766",,0x00000012
+HKCR,"MIME\Database\Rfc1766","0436",0x00000000,"af;Afrikaans"
+HKCR,"MIME\Database\Rfc1766","041C",0x00000000,"sq;Albanian"
+HKCR,"MIME\Database\Rfc1766","0001",0x00000000,"ar;Arabic"
+HKCR,"MIME\Database\Rfc1766","0401",0x00000000,"ar-sa;Arabic (Saudi Arabia)"
+HKCR,"MIME\Database\Rfc1766","0801",0x00000000,"ar-iq;Arabic (Iraq)"
+HKCR,"MIME\Database\Rfc1766","0C01",0x00000000,"ar-eg;Arabic (Egypt)"
+HKCR,"MIME\Database\Rfc1766","1001",0x00000000,"ar-ly;Arabic (Libya)"
+HKCR,"MIME\Database\Rfc1766","1401",0x00000000,"ar-dz;Arabic (Algeria)"
+HKCR,"MIME\Database\Rfc1766","1801",0x00000000,"ar-ma;Arabic (Morocco)"
+HKCR,"MIME\Database\Rfc1766","1C01",0x00000000,"ar-tn;Arabic (Tunisia)"
+HKCR,"MIME\Database\Rfc1766","2001",0x00000000,"ar-om;Arabic (Oman)"
+HKCR,"MIME\Database\Rfc1766","2401",0x00000000,"ar-ye;Arabic (Yemen)"
+HKCR,"MIME\Database\Rfc1766","2801",0x00000000,"ar-sy;Arabic (Syria)"
+HKCR,"MIME\Database\Rfc1766","2C01",0x00000000,"ar-jo;Arabic (Jordan)"
+HKCR,"MIME\Database\Rfc1766","3001",0x00000000,"ar-lb;Arabic (Lebanon)"
+HKCR,"MIME\Database\Rfc1766","3401",0x00000000,"ar-kw;Arabic (Kuwait)"
+HKCR,"MIME\Database\Rfc1766","3801",0x00000000,"ar-ae;Arabic (U.A.E.)"
+HKCR,"MIME\Database\Rfc1766","3C01",0x00000000,"ar-bh;Arabic (Bahrain)"
+HKCR,"MIME\Database\Rfc1766","4001",0x00000000,"ar-qa;Arabic (Qatar)"
+HKCR,"MIME\Database\Rfc1766","042D",0x00000000,"eu;Basque"
+HKCR,"MIME\Database\Rfc1766","0402",0x00000000,"bg;Bulgarian"
+HKCR,"MIME\Database\Rfc1766","0423",0x00000000,"be;Belarusian"
+HKCR,"MIME\Database\Rfc1766","0403",0x00000000,"ca;Catalan"
+HKCR,"MIME\Database\Rfc1766","0004",0x00000000,"zh;Chinese"
+HKCR,"MIME\Database\Rfc1766","0404",0x00000000,"zh-tw;Chinese (Taiwan)"
+HKCR,"MIME\Database\Rfc1766","0804",0x00000000,"zh-cn;Chinese (China)"
+HKCR,"MIME\Database\Rfc1766","0C04",0x00000000,"zh-hk;Chinese (Hong Kong SAR)"
+HKCR,"MIME\Database\Rfc1766","1004",0x00000000,"zh-sg;Chinese (Singapore)"
+HKCR,"MIME\Database\Rfc1766","041A",0x00000000,"hr;Croatian"
+HKCR,"MIME\Database\Rfc1766","0405",0x00000000,"cs;Czech"
+HKCR,"MIME\Database\Rfc1766","0406",0x00000000,"da;Danish"
+HKCR,"MIME\Database\Rfc1766","0413",0x00000000,"nl;Dutch (Netherlands)"
+HKCR,"MIME\Database\Rfc1766","0813",0x00000000,"nl-be;Dutch (Belgium)"
+HKCR,"MIME\Database\Rfc1766","0009",0x00000000,"en;English"
+HKCR,"MIME\Database\Rfc1766","0409",0x00000000,"en-us;English (United States)"
+HKCR,"MIME\Database\Rfc1766","0809",0x00000000,"en-gb;English (United Kingdom)"
+HKCR,"MIME\Database\Rfc1766","0C09",0x00000000,"en-au;English (Australia)"
+HKCR,"MIME\Database\Rfc1766","1009",0x00000000,"en-ca;English (Canada)"
+HKCR,"MIME\Database\Rfc1766","1409",0x00000000,"en-nz;English (New Zealand)"
+HKCR,"MIME\Database\Rfc1766","1809",0x00000000,"en-ie;English (Ireland)"
+HKCR,"MIME\Database\Rfc1766","1C09",0x00000000,"en-za;English (South Africa)"
+HKCR,"MIME\Database\Rfc1766","2009",0x00000000,"en-jm;English (Jamaica)"
+HKCR,"MIME\Database\Rfc1766","2809",0x00000000,"en-bz;English (Belize)"
+HKCR,"MIME\Database\Rfc1766","2C09",0x00000000,"en-tt;English (Trinidad)"
+HKCR,"MIME\Database\Rfc1766","0425",0x00000000,"et;Estonian"
+HKCR,"MIME\Database\Rfc1766","0438",0x00000000,"fo;Faeroese"
+HKCR,"MIME\Database\Rfc1766","0429",0x00000000,"fa;Farsi"
+HKCR,"MIME\Database\Rfc1766","040B",0x00000000,"fi;Finnish"
+HKCR,"MIME\Database\Rfc1766","040C",0x00000000,"fr;French (France)"
+HKCR,"MIME\Database\Rfc1766","080C",0x00000000,"fr-be;French (Belgium)"
+HKCR,"MIME\Database\Rfc1766","0C0C",0x00000000,"fr-ca;French (Canada)"
+HKCR,"MIME\Database\Rfc1766","100C",0x00000000,"fr-ch;French (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","140C",0x00000000,"fr-lu;French (Luxembourg)"
+HKCR,"MIME\Database\Rfc1766","043C",0x00000000,"gd;Gaelic"
+HKCR,"MIME\Database\Rfc1766","0407",0x00000000,"de;German (Germany)"
+HKCR,"MIME\Database\Rfc1766","0807",0x00000000,"de-ch;German (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","0C07",0x00000000,"de-at;German (Austria)"
+HKCR,"MIME\Database\Rfc1766","1007",0x00000000,"de-lu;German (Luxembourg)"
+HKCR,"MIME\Database\Rfc1766","1407",0x00000000,"de-li;German (Liechtenstein)"
+HKCR,"MIME\Database\Rfc1766","0408",0x00000000,"el;Greek"
+HKCR,"MIME\Database\Rfc1766","040D",0x00000000,"he;Hebrew"
+HKCR,"MIME\Database\Rfc1766","0439",0x00000000,"hi;Hindi"
+HKCR,"MIME\Database\Rfc1766","040E",0x00000000,"hu;Hungarian"
+HKCR,"MIME\Database\Rfc1766","040F",0x00000000,"is;Icelandic"
+HKCR,"MIME\Database\Rfc1766","0421",0x00000000,"in;Indonesian"
+HKCR,"MIME\Database\Rfc1766","0410",0x00000000,"it;Italian (Italy)"
+HKCR,"MIME\Database\Rfc1766","0810",0x00000000,"it-ch;Italian (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","0411",0x00000000,"ja;Japanese"
+HKCR,"MIME\Database\Rfc1766","0412",0x00000000,"ko;Korean"
+HKCR,"MIME\Database\Rfc1766","0426",0x00000000,"lv;Latvian"
+HKCR,"MIME\Database\Rfc1766","0427",0x00000000,"lt;Lithuanian"
+HKCR,"MIME\Database\Rfc1766","042F",0x00000000,"mk;FYRO Macedonian"
+HKCR,"MIME\Database\Rfc1766","043E",0x00000000,"ms;Malay (Malaysia)"
+HKCR,"MIME\Database\Rfc1766","043A",0x00000000,"mt;Maltese"
+HKCR,"MIME\Database\Rfc1766","0414",0x00000000,"no;Norwegian (Bokmal)"
+HKCR,"MIME\Database\Rfc1766","0814",0x00000000,"no;Norwegian (Nynorsk)"
+HKCR,"MIME\Database\Rfc1766","0415",0x00000000,"pl;Polish"
+HKCR,"MIME\Database\Rfc1766","0416",0x00000000,"pt-br;Portuguese (Brazil)"
+HKCR,"MIME\Database\Rfc1766","0816",0x00000000,"pt;Portuguese (Portugal)"
+HKCR,"MIME\Database\Rfc1766","0417",0x00000000,"rm;Rhaeto-Romanic"
+HKCR,"MIME\Database\Rfc1766","0418",0x00000000,"ro;Romanian"
+HKCR,"MIME\Database\Rfc1766","0818",0x00000000,"ro-mo;Romanian (Moldova)"
+HKCR,"MIME\Database\Rfc1766","0419",0x00000000,"ru;Russian"
+HKCR,"MIME\Database\Rfc1766","0819",0x00000000,"ru-mo;Russian (Moldova)"
+HKCR,"MIME\Database\Rfc1766","0C1A",0x00000000,"sr;Serbian (Cyrillic)"
+HKCR,"MIME\Database\Rfc1766","081A",0x00000000,"sr;Serbian (Latin)"
+HKCR,"MIME\Database\Rfc1766","041B",0x00000000,"sk;Slovak"
+HKCR,"MIME\Database\Rfc1766","0424",0x00000000,"sl;Slovenian"
+HKCR,"MIME\Database\Rfc1766","042E",0x00000000,"sb;Sorbian"
+HKCR,"MIME\Database\Rfc1766","040A",0x00000000,"es;Spanish (Traditional Sort)"
+HKCR,"MIME\Database\Rfc1766","080A",0x00000000,"es-mx;Spanish (Mexico)"
+HKCR,"MIME\Database\Rfc1766","0C0A",0x00000000,"es;Spanish (International Sort)"
+HKCR,"MIME\Database\Rfc1766","100A",0x00000000,"es-gt;Spanish (Guatemala)"
+HKCR,"MIME\Database\Rfc1766","140A",0x00000000,"es-cr;Spanish (Costa Rica)"
+HKCR,"MIME\Database\Rfc1766","180A",0x00000000,"es-pa;Spanish (Panama)"
+HKCR,"MIME\Database\Rfc1766","1C0A",0x00000000,"es-do;Spanish (Dominican Republic)"
+HKCR,"MIME\Database\Rfc1766","200A",0x00000000,"es-ve;Spanish (Venezuela)"
+HKCR,"MIME\Database\Rfc1766","240A",0x00000000,"es-co;Spanish (Colombia)"
+HKCR,"MIME\Database\Rfc1766","280A",0x00000000,"es-pe;Spanish (Peru)"
+HKCR,"MIME\Database\Rfc1766","2C0A",0x00000000,"es-ar;Spanish (Argentina)"
+HKCR,"MIME\Database\Rfc1766","300A",0x00000000,"es-ec;Spanish (Ecuador)"
+HKCR,"MIME\Database\Rfc1766","340A",0x00000000,"es-cl;Spanish (Chile)"
+HKCR,"MIME\Database\Rfc1766","380A",0x00000000,"es-uy;Spanish (Uruguay)"
+HKCR,"MIME\Database\Rfc1766","3C0A",0x00000000,"es-py;Spanish (Paraguay)"
+HKCR,"MIME\Database\Rfc1766","400A",0x00000000,"es-bo;Spanish (Bolivia)"
+HKCR,"MIME\Database\Rfc1766","440A",0x00000000,"es-sv;Spanish (El Salvador)"
+HKCR,"MIME\Database\Rfc1766","480A",0x00000000,"es-hn;Spanish (Honduras)"
+HKCR,"MIME\Database\Rfc1766","4C0A",0x00000000,"es-ni;Spanish (Nicaragua)"
+HKCR,"MIME\Database\Rfc1766","500A",0x00000000,"es-pr;Spanish (Puerto Rico)"
+HKCR,"MIME\Database\Rfc1766","0430",0x00000000,"sx;Sutu"
+HKCR,"MIME\Database\Rfc1766","041D",0x00000000,"sv;Swedish"
+HKCR,"MIME\Database\Rfc1766","081D",0x00000000,"sv-fi;Swedish (Finland)"
+HKCR,"MIME\Database\Rfc1766","041E",0x00000000,"th;Thai"
+HKCR,"MIME\Database\Rfc1766","0431",0x00000000,"ts;Tsonga"
+HKCR,"MIME\Database\Rfc1766","0432",0x00000000,"tn;Tswana"
+HKCR,"MIME\Database\Rfc1766","041F",0x00000000,"tr;Turkish"
+HKCR,"MIME\Database\Rfc1766","0422",0x00000000,"uk;Ukrainian"
+HKCR,"MIME\Database\Rfc1766","0420",0x00000000,"ur;Urdu"
+HKCR,"MIME\Database\Rfc1766","042A",0x00000000,"vi;Vietnamese"
+HKCR,"MIME\Database\Rfc1766","0434",0x00000000,"xh;Xhosa"
+HKCR,"MIME\Database\Rfc1766","043D",0x00000000,"ji;Yiddish"
+HKCR,"MIME\Database\Rfc1766","0435",0x00000000,"zu;Zulu"
+
+HKCR,"CLSID\{FBF23B42-E3F0-101B-8488-00AA003E56F8}",,,"Internet Explorer(Ver 1.0)"
+HKCR,"CLSID\{FBF23B42-E3F0-101B-8488-00AA003E56F8}\LocalServer32",,,"iexplore.exe"
+HKCR,"CLSID\{FBF23B42-E3F0-101B-8488-00AA003E56F8}\ProgID",,,"InternetExplorer.Application.1"
+HKCR,"CLSID\{FBF23B42-E3F0-101B-8488-00AA003E56F8}\VersionIndependentProgID",,,"InternetExplorer.Application"
+HKCR,"InternetExplorer.Application",,,"Internet Explorer(Ver 1.0)"
+HKCR,"InternetExplorer.Application\CLSID",,,"{FBF23B42-E3F0-101B-8488-00AA003E56F8}"
+HKCR,"InternetExplorer.Application\CurVer",,,"InternetExplorer.Application.1"
+HKCR,"InternetExplorer.Application.1",,,"Internet Explorer(Ver 1.0)"
+HKCR,"InternetExplorer.Application.1\CLSID",,,"{FBF23B42-E3F0-101B-8488-00AA003E56F8}"
+
+;HKCR,"CLSID\%CLSID_SearchAssistantOC%",,,"SearchAssistantOC"
+;HKCR,"CLSID\%CLSID_SearchAssistantOC%\InProcServer32",,,"shdocvw.dll"
+;HKCR,"CLSID\%CLSID_SearchAssistantOC%\InProcServer32","ThreadingModel",,"Apartment"
+;HKCR,"CLSID\%CLSID_SearchAssistantOC%\ProgID",,,"SearchAssistantOC.SearchAssistantOC.1"
+;HKCR,"CLSID\%CLSID_SearchAssistantOC%\VersionIndependentProgID",,,"SearchAssistantOC.SearchAssistantOC"
+;HKCR,"SearchAssistantOC.SearchAssistantOC",,,""
+;HKCR,"SearchAssistantOC.SearchAssistantOC\CLSID",,,"%CLSID_SearchAssistantOC%"
+;HKCR,"SearchAssistantOC.SearchAssistantOC\CurVer",,,"SearchAssistantOC.SearchAssistantOC.1"
+;HKCR,"SearchAssistantOC.SearchAssistantOC.1",,,""
+;HKCR,"SearchAssistantOC.SearchAssistantOC.1\CLSID",,,"%CLSID_SearchAssistantOC%"
+
+HKCR,"CLSID\{55136805-B2DE-11D1-B9F2-00A0C98BC547}",,,"Shell Name Space"
+HKCR,"CLSID\{55136805-B2DE-11D1-B9F2-00A0C98BC547}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{55136805-B2DE-11D1-B9F2-00A0C98BC547}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{55136805-B2DE-11D1-B9F2-00A0C98BC547}\ProgID",,,"ShellNameSpace.ShellNameSpace.1"
+HKCR,"CLSID\{55136805-B2DE-11D1-B9F2-00A0C98BC547}\VersionIndependentProgID",,,"ShellNameSpace.ShellNameSpace"
+
+HKCR,"CLSID\{3C374A40-BAE4-11CF-BF7D-00AA006946EE}",,,"Microsoft Url History Service"
+HKCR,"CLSID\{3C374A40-BAE4-11CF-BF7D-00AA006946EE}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{3C374A40-BAE4-11CF-BF7D-00AA006946EE}\InProcServer32","ThreadingModel",,"Apartment"
+
+;HKCR,"CLSID\%CLSID_MruLongList%",,,"MruLongList"
+;HKCR,"CLSID\%CLSID_MruLongList%\InProcServer32",,,"shdocvw.dll"
+;HKCR,"CLSID\%CLSID_MruLongList%\InProcServer32","ThreadingModel",,"Apartment"
+
+;HKCR,"CLSID\%CLSID_ShellShellNameSpace%",,,"Shell Name Space"
+;HKCR,"CLSID\%CLSID_ShellShellNameSpace%\InProcServer32",,,"shdocvw.dll"
+;HKCR,"CLSID\%CLSID_ShellShellNameSpace%\InProcServer32","ThreadingModel",,"Apartment"
+;HKCR,"CLSID\%CLSID_ShellShellNameSpace%\ProgID",,,"ShellNameSpace.ShellNameSpace.1"
+;HKCR,"CLSID\%CLSID_ShellShellNameSpace%\VersionIndependentProgID",,,"ShellNameSpace.ShellNameSpace"
+
+HKCR,"CLSID\{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}",,,"Microsoft Shell UI Helper"
+HKCR,"CLSID\{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}\ProgID",,,"Shell.UIHelper.1"
+HKCR,"Shell.UIHelper",,,"Microsoft Shell UI Helper"
+HKCR,"Shell.UIHelper\CLSID",,,"{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}"
+HKCR,"Shell.UIHelper\CurVer",,,"Shell.UIHelper.2"
+HKCR,"Shell.UIHelper.1",,,""
+HKCR,"Shell.UIHelper.1\CLSID",,,"{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}"
+
+HKCR,"CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}",,,"Internet Explorer"
+HKCR,"CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\ShellFolder",,2,"0x24"
+
+HKCR,"CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}",,,"Microsoft Web Browser"
+HKCR,"CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\ProgID",,,"Shell.Explorer.2"
+HKCR,"CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\VersionIndependentProgID",,,"Shell.Explorer"
+HKCR,"Shell.Explorer",,,"Microsoft Web Browser"
+HKCR,"Shell.Explorer\CLSID",,,"{8856F961-340A-11D0-A96B-00C04FD705A2}"
+HKCR,"Shell.Explorer\CurVer",,,"Shell.Explorer.2"
+HKCR,"Shell.Explorer.2",,,""
+HKCR,"Shell.Explorer.2\CLSID",,,"{8856F961-340A-11D0-A96B-00C04FD705A2}"
+
+HKCR,"CLSID\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}",,,"ShellWindows"
+HKCR,"CLSID\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}\InProcServer32","ThreadingModel",,"Apartment"
+
+;HKCR,"CLSID\%CLSID_MicrosoftBrowserArchitecture%",,,"Microsoft Browser Architecture"
+;HKCR,"CLSID\%CLSID_MicrosoftBrowserArchitecture%\InProcServer32",,,"shdocvw.dll"
+;HKCR,"CLSID\%CLSID_MicrosoftBrowserArchitecture%\InProcServer32","ThreadingModel",,"Apartment"
+
+;HKCR,"CLSID\%CLSID_ShellSearchAssistantOC%",,,"SearchAssistantOC"
+;HKCR,"CLSID\%CLSID_ShellSearchAssistantOC%\InProcServer32",,,"shdocvw.dll"
+;HKCR,"CLSID\%CLSID_ShellSearchAssistantOC%\InProcServer32","ThreadingModel",,"Apartment"
+;HKCR,"CLSID\%CLSID_ShellSearchAssistantOC%\ProgID",,,"SearchAssistantOC.SearchAssistantOC.1"
+;HKCR,"CLSID\%CLSID_ShellSearchAssistantOC%\VersionIndependentProgID",,,"SearchAssistantOC.SearchAssistantOC"
+
+HKCR,"CLSID\{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}",,,"Microsoft Web Browser Version 1"
+HKCR,"CLSID\{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}\ProgID",,,"Shell.Explorer.1"
+HKCR,"CLSID\{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}\VersionIndependentProgID",,,"Shell.Explorer"
+HKCR,"Shell.Explorer.1",,,""
+HKCR,"Shell.Explorer.1\CLSID",,,"{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B0}"
+HKCR,"CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}",,,"Internet Shortcut"
+HKCR,"CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\InProcServer32",,,"shdocvw.dll"
+HKCR,"CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\InProcServer32","ThreadingModel",,"Apartment"
+HKCR,"CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\ProgID",,,"InternetShortcut"
+HKCR,"CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\shellex\MayChangeDefaultMenu",,,
+HKCR,"InternetShortcut",,,"Internet Shortcut"
+HKCR,"InternetShortcut","EditFlags",2,"2"
+HKCR,"InternetShortcut","IsShortcut",,
+HKCR,"InternetShortcut","NeverShowExt",,
+;HKCR,"InternetShortcut\CLSID",,,"%CLSID_InteretShortcut%"
+HKCR,"InternetShortcut\DefaultIcon",,,"url.dll,0"
+HKCR,"InternetShortcut\shell\open\command",,,"rundll32.exe shdocvw.dll,OpenURL %l"
+HKCR,"InternetShortcut\shell\print\command",,,"rundll32.exe mshtml.dll,PrintHTML \"%1\""
+HKCR,"InternetShortcut\shell\printto\command",,,"rundll32.exe mshtml.dll,PrintHTML \"%1\" \"%2\" \"%3\" \"%4\""
+
+; EOF
--- /dev/null
+[Version]
+Signature="$ReactOS$
+
+[AddReg]
+
+HKCU,"Control Panel",,0x00000012
+HKCU,"Control Panel\Appearance",,0x00000012
+HKCU,"Control Panel\Mouse","MouseTrails",0x00010001,0x00000000
+HKCU,"Control Panel\Mouse","SnapToDefaultButton",0x00010001,0x00000000
+HKCU,"Control Panel\Mouse","MouseSpeed",0x00010001,0x00000001
+HKCU,"Control Panel\Mouse","MouseThreshold1",0x00010001,0x00000006
+HKCU,"Control Panel\Mouse","MouseThreshold2",0x00010001,0x0000000A
+HKCU,"Control Panel\Mouse","DoubleClickSpeed",0x00010001,0x000001E0
+HKCU,"Control Panel\Mouse","SwapMouseButtons",0x00010001,0x00000000
+
+HKCU,"Control Panel\Desktop","AutoEndTasks",0x00000002,"0"
+HKCU,"Control Panel\Desktop","CursorBlinkRate",0x00000002,"530"
+HKCU,"Control Panel\Desktop","DragFullWindows",0x00000002,"0"
+HKCU,"Control Panel\Desktop","PaintDesktopVersion",0x00010001,"0"
+HKCU,"Control Panel\Desktop","HungAppTimeout",0x00000002,"5000"
+HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0x00000000,""
+HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
+HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
+HKCU,"Control Panel\International",,0x00000012
+HKCU,"Control Panel\International","Locale",0x00000000,"0409"
+HKCU,"Control Panel\International\Geo","Nation",0x00000000,"1"
+
+;Cursors Schemes
+HKCU,"Control Panel\Cursors",,,"ReactOS Default"
+HKCU,"Control Panel\Cursors","Scheme Source",0x00010001,0x00000002
+
+;PowerCfg
+HKCU,"Control Panel\PowerCfg","CurrentPowerPolicy",0x00000002,"0"
+HKCU,"Control Panel\PowerCfg\GlobalPowerPolicy","Policies",0x00000001,01,00,00,00,03,\
+00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,\
+00,00,00,00,00,00,00,02,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,\
+00,00,80,00,00,00,00,01,00,00,00,00,00,00,80,01,00,00,00,03,00,00,00,02,00,00,00,04,\
+00,00,c0,01,00,00,00,04,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,\
+00,01,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,00,16,\
+00,00,00
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Name",0x00020000,"Home/Office Desk"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Description",0x00020000,"This scheme is suited to most home or desktop computers that are left plugged in all the time."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Policies",0x00000001,01,00,00,00,02,\
+00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,\
+01,00,00,32,32,00,03,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,b0,04,00,00,2c,\
+01,00,00,00,00,00,00,58,02,00,00,01,01,64,50,64,64,00,00
+
+; Color schemes
+HKCU,"Control Panel\Current","Color Schemes",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance","Current",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance","NewCurrent",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance\New Schemes","SelectedStyle",0x00020000,"0"
+; ReactOS Standard
+HKCU,"Control Panel\Appearance\New Schemes\0","DisplayName",0x00020000,"@themeui.dll,-883"
+HKCU,"Control Panel\Appearance\New Schemes\0","SelectedSize",0x00020000,"0"
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #0",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #1",0x00010001,0x00a56e3a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #2",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #4",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #10",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #11",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #12",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #13",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #15",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #16",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #17",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #19",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #20",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #21",0x00010001,0x00404040
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #22",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #24",0x00010001,0x00e1ffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #25",0x00010001,0x00b5b5b5
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #26",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #27",0x00010001,0x00f0caa6
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #28",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #29",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #30",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","LegacyName",0x00020000,"ReactOS Standard"
+; ReactOS Classic
+HKCU,"Control Panel\Appearance\New Schemes\1","DisplayName",0x00020000,"@themeui.dll,-880"
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,fc,\
+7f,22,14,fc,7f,b0,fe,12,00,00,00,00,00,00,00,00,00,98,23,eb,77
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,f0,\
+77,00,20,14,00,00,00,00,10,80,05,14,00,f0,1f,14,00,00,00,14,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,14,\
+00,88,fb,e8,77,02,02,00,00,ac,b9,f0,77,00,00,00,00,20,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,7c,6b,e8,77,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,00,\
+00,06,00,00,00,18,00,00,00,ff,ff,ff,ff,f0,4b,21,fc,00,c4,f0,77
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,4d,00,69,00,63,00,72,00,6f,00,73,\
+00,6f,00,66,00,74,00,20,00,53,00,61,00,6e,00,73,00,20,00,53,00,65,00,72,00,69,00,66,00,00,00,14,\
+00,0b,00,00,00,00,ff,12,00,50,00,00,00,c0,fe,12,00,0c,10,00,01
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #0",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #1",0x00010001,0x00a56e3a
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #2",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #4",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #10",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #11",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #12",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #13",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #15",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #16",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #17",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #19",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #20",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #21",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #22",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #24",0x00010001,0x00e1ffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #26",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #27",0x00010001,0x00d08410
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #28",0x00010001,0x00b5b5b5
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #29",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #30",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","LegacyName",0x00020000,"ReactOS Classic"
+
+HKCU,"Environment",,0x00000012
+HKCU,"Environment","TEMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
+HKCU,"Environment","TMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
+
+HKCU,"SOFTWARE",,0x00000012
+HKCU,"SOFTWARE\Microsoft",,0x00000012
+
+; DirectX version report as DirectX 9.0
+HKCU,"SOFTWARE\Microsoft\DirectX","Debug",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\DirectX","InstalledVersion",0x00000001,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00
+HKCU,"SOFTWARE\Microsoft\DirectX","InstallMDX",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\DirectX","RC",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"5.03.2600.2180"
+
+; Open With settings
+HKCU,"SOFTWARE\Classes",,0x00000012
+HKCU,"SOFTWARE\Classes\Applications",,0x00000012
+
+; Current user shell folder settings
+HKCU,"SOFTWARE\Microsoft\Windows",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,0x00000000
+HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}",,0x00000012
+
+
+HKCU,"SOFTWARE\Microsoft\Windows NT",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion",,0x00000012
+
+; application compatibility settings for Windows 95
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","MinorVersion",0x00010001,0x0000000A
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","BuildNumber",0x00010001,0x000003B6
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","PlatformId",0x00010001,0x00000001
+; application compatibility settings for Windows 98/ME
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","BuildNumber",0x00010001,0x000008AE
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","PlatformId",0x00010001,0x00000001
+; application compatibility settings for Windows NT 4 Service Pack 5
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","BuildNumber",0x00010001,0x00000565
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","SPMajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","SPMinorVersion",0x00010001,0x00000000
+; application compatibility settings for Windows 2000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","MajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","BuildNumber",0x00010001,0x00000893
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","SPMajorVersion",0x00010001,0x00000003
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","SPMinorVersion",0x00010001,0x00000000
+; application compatibility settings for Windows XP
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","MajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","MinorVersion",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","BuildNumber",0x00010001,0x00000A28
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","SPMajorVersion",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","SPMinorVersion",0x00010001,0x00000000
+
+; DEBUG: Windows Messages SPY configuration
+HKCU,"SOFTWARE\ReactOS\Debug","SpyInclude",0x00020000,"INCLUDEALL"
+;HKCU,"SOFTWARE\ReactOS\Debug","SpyExclude",0x00020000,""
+;HKCU,"SOFTWARE\ReactOS\Debug","SpyExcludeDWP",0x00020000,""
+
+; GUI Setup
+
+HKCU, "Control Panel\Desktop\WindowMetrics","CaptionFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","IconFont",0x00000001,f5,ff,ff,ff,00,00,00,00,\
+00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,\
+61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","MenuFont",0x00000001,f5,ff,ff,ff,00,00,00,00,\
+00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,\
+61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","MessageFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","SmCaptionFont",0x00000001,f5,ff,ff,ff,00,00,\
+00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,\
+6d,00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","StatusFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+
+; Internet Explorer
+
+HKCU,"Software\Microsoft\Internet Explorer\Main","Start Page",,"http://www.reactos.org"
+HKCU,"Software\Microsoft\Internet Explorer\Main","Search Page",,"http://www.google.com"
+
+
+; EOF
--- /dev/null
+[Version]
+Signature="$ReactOS$
+
+[AddReg]
+
+; Internet Explorer
+HKLM,"Software\Microsoft\Internet Explorer","Version",,"6.0.2900.2180"
+
+; DirectX
+HKLM,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"4.09.00.0904"
+
+; RPC
+HKLM,Software\Microsoft\Rpc\SecurityService,1,2,"secur32.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,10,2,"secur32.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,14,2,"schannel.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,16,2,"secur32.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,18,2,"secur32.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,68,2,"netlogon.dll"
+HKLM,Software\Microsoft\Rpc\SecurityService,9,2,"secur32.dll"
+
+; HTML Help
+HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9},,2,"HTML Help"
+HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9},"ComponentID",2,"HTMLHelp"
+HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9},"IsInstalled",2,1
+HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9},"Locale",2,"*"
+HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9},"Version",2,"4,74,9273,0"
+
+; Common shell folders
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,0x00000000
+
+; CMD Settings
+HKLM,"SOFTWARE\Microsoft\Command Processor","AutoRun",0x00020000,""
+
+; Uninstall Application list
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000010
+
+HKLM,"SOFTWARE\Microsoft\Rpc",,0x00000012
+
+; Version Information
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"5.0"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 3"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"2195"
+
+
+; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
+HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loadlib.exe","GlobalFlag",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\soffice.exe","GlobalFlag",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\tlstest.exe","GlobalFlag",0x00000000,"0x00000002"
+
+; MME - TODO: Should not require full paths!
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midimapper",0x00000000,"c:\reactos\system32\midimap.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wavemapper",0x00000000,"c:\reactos\system32\msacm32.dll"
+;HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wave",0x00000000,"sndblst.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midi",0x00000000,"c:\reactos\system32\beepmidi.dll"
+
+; Mesa OpenGL Driver
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers","DefaultDriver",0x00000000,"Mesa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Version",0x00010001,0x00000002
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Dll",0x00000000,"mesa32"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","DriverVersion",0x00010001,0x00000010
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Flags",0x00010001,0x00000001
+
+; User Profile List
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList",,0x00000012
+;HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020000,"%SystemDrive%\Documents and Settings"
+
+; Font substitutes
+; SysFontSubstitutes are also returned by EnumFontFamilies, FontSubstitutes aren't
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes",,0x00000012
+
+; Time zone settings
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x00010000,\
+ "409", "4",\
+ "1009", "4",\
+ "2809", "20",\
+ "80a", "30",\
+ "440a", "30",\
+ "480a", "30",\
+ "4c0a", "30",\
+ "140a", "30",\
+ "100a", "33",\
+ "c0c", "35",\
+ "2009", "35",\
+ "240a", "45",\
+ "280a", "45",\
+ "300a", "45",\
+ "180a", "45",\
+ "500a", "50",\
+ "2409", "50",\
+ "1c0a", "50",\
+ "2c09", "50",\
+ "200a", "55",\
+ "3c0a", "55",\
+ "400a", "55",\
+ "340a", "56",\
+ "416", "65",\
+ "2c0a", "70",\
+ "380a", "70",\
+ "438", "85",\
+ "809", "85",\
+ "816", "85",\
+ "1809", "85",\
+ "40f", "90",\
+ "1801", "90",\
+ "41c", "95",\
+ "405", "95",\
+ "40e", "95",\
+ "424", "95",\
+ "41b", "95",\
+ "81a", "95",\
+ "c1a", "95",\
+ "415", "100",\
+ "1401", "100",\
+ "41a", "100",\
+ "42f", "100",\
+ "140c", "100",\
+ "180c", "100",\
+ "1c01", "100",\
+ "403", "105",\
+ "406", "105",\
+ "813", "105",\
+ "827", "105",\
+ "40a", "105",\
+ "40c", "105",\
+ "42d", "105",\
+ "80c", "105",\
+ "c0a", "105",\
+ "407", "110",\
+ "410", "110",\
+ "413", "110",\
+ "414", "110",\
+ "807", "110",\
+ "810", "110",\
+ "814", "110",\
+ "1007", "110",\
+ "1407", "110",\
+ "41d", "110",\
+ "c07", "110",\
+ "100c", "110",\
+ "1001", "115",\
+ "2801", "115",\
+ "3001", "115",\
+ "43e", "115",\
+ "2c01", "115",\
+ "423", "115",\
+ "c01", "120",\
+ "425", "125",\
+ "426", "125",\
+ "40b", "125",\
+ "81d", "125",\
+ "422", "125",\
+ "402", "125",\
+ "427", "125",\
+ "408", "130",\
+ "41f", "130",\
+ "418", "130",\
+ "40d", "135",\
+ "436", "140",\
+ "3009", "140",\
+ "1c09", "140",\
+ "419", "145",\
+ "401", "150",\
+ "4001", "150",\
+ "3c01", "150",\
+ "3401", "150",\
+ "441", "155",\
+ "801", "158",\
+ "2401", "158",\
+ "429", "160",\
+ "2001", "165",\
+ "3801", "165",\
+ "420", "185",\
+ "439", "190",\
+ "421", "205",\
+ "41e", "205",\
+ "42a", "205",\
+ "804", "210",\
+ "c04", "210",\
+ "1404", "210",\
+ "83e", "210",\
+ "1004", "215",\
+ "404", "220",\
+ "3409", "220",\
+ "412", "230",\
+ "812", "230",\
+ "411", "235",\
+ "c09", "255",\
+ "1409", "290"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Display",0x00000000,"(GMT-12:00) International Date Line West"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Dlt",0x00000000,"Dateline Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Std",0x00000000,"Dateline Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Index",0x00010001,0
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","TZI",0x00000001,\
+0xd0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Display",0x00000000,"(GMT-11:00) Midway Island, Samoa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Dlt",0x00000000,"Samoa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Std",0x00000000,"Samoa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Index",0x00010001,1
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","TZI",0x00000001,\
+0x94,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Display",0x00000000,"(GMT-10:00) Hawaii"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Dlt",0x00000000,"Hawaiian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Std",0x00000000,"Hawaiian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Index",0x00010001,2
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","TZI",0x00000001,\
+0x58,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Display",0x00000000,"(GMT-09:00) Alaska"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Dlt",0x00000000,"Alaskan Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Std",0x00000000,"Alaskan Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Index",0x00010001,3
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","TZI",0x00000001,\
+0x1c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Display",0x00000000,"(GMT-08:00) Pacific Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Dlt",0x00000000,"Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Std",0x00000000,"Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Index",0x00010001,4
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","TZI",0x00000001,\
+0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Display",0x00000000,"(GMT-07:00) Mountain Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Dlt",0x00000000,"Mountain Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Std",0x00000000,"Mountain Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Index",0x00010001,10
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Display",0x00000000,"(GMT-07:00) Chihuahua, La Paz, Mazatlan"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Dlt",0x00000000,"Mountain Daylight Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Std",0x00000000,"Mountain Standard Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Index",0x00010001,13
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Display",0x00000000,"(GMT-07:00) Arizona"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Dlt",0x00000000,"US Mountain Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Std",0x00000000,"US Mountain Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Index",0x00010001,15
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Display",0x00000000,"(GMT-06:00) Central Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Dlt",0x00000000,"Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Std",0x00000000,"Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Index",0x00010001,20
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Display",0x00000000,"(GMT-06:00) Saskatchewan"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Dlt",0x00000000,"Canada Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Std",0x00000000,"Canada Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Index",0x00010001,25
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Display",0x00000000,"(GMT-06:00) Guadalajara, Mexico City, Monterrey"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Dlt",0x00000000,"Central Daylight Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Std",0x00000000,"Central Standard Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Index",0x00010001,30
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Display",0x00000000,"(GMT-06:00) Central America"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Dlt",0x00000000,"Central America Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Std",0x00000000,"Central America Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Index",0x00010001,33
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Display",0x00000000,"(GMT-05:00) Eastern Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Dlt",0x00000000,"Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Std",0x00000000,"Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Index",0x00010001,35
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Display",0x00000000,"(GMT-05:00) Indiana (East)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Dlt",0x00000000,"US Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Std",0x00000000,"US Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Index",0x00010001,40
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Display",0x00000000,"(GMT-05:00) Bogota, Lima, Quito, Rio Branco"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Dlt",0x00000000,"SA Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Std",0x00000000,"SA Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Index",0x00010001,45
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Display",0x00000000,"(GMT-04:00) Atlantic Time (Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Dlt",0x00000000,"Atlantic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Std",0x00000000,"Atlantic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Index",0x00010001,50
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Display",0x00000000,"(GMT-04:00) La Paz"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Dlt",0x00000000,"SA Western Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Std",0x00000000,"SA Western Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Index",0x00010001,55
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Display",0x00000000,"(GMT-04:00) Santiago"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Dlt",0x00000000,"Pacific SA Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Std",0x00000000,"Pacific SA Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Index",0x00010001,56
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x06,0x00,0x02,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0xe7,0x03,\
+0x00,0x00,0x0a,0x00,0x06,0x00,0x02,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0xe7,0x03
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Display",0x00000000,"(GMT-03:30) Newfoundland"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Dlt",0x00000000,"Newfoundland Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Std",0x00000000,"Newfoundland Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Index",0x00010001,60
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","TZI",0x00000001,\
+0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Display",0x00000000,"(GMT-03:00) Brasilia"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Dlt",0x00000000,"E. South America Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Std",0x00000000,"E. South America Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Index",0x00010001,65
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Display",0x00000000,"(GMT-03:00) Buenos Aires, Georgetown"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Dlt",0x00000000,"SA Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Std",0x00000000,"SA Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Index",0x00010001,70
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Display",0x00000000,"(GMT-03:00) Greenland"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Dlt",0x00000000,"Greenland Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Std",0x00000000,"Greenland Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Index",0x00010001,73
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Display",0x00000000,"(GMT-02:00) Mid-Atlantic"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Dlt",0x00000000,"Mid-Atlantic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Std",0x00000000,"Mid-Atlantic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Index",0x00010001,75
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","TZI",0x00000001,\
+0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x09,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Display",0x00000000,"(GMT-01:00) Azores"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Dlt",0x00000000,"Azores Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Std",0x00000000,"Azores Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Index",0x00010001,80
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","TZI",0x00000001,\
+0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Display",0x00000000,"(GMT-01:00) Cape Verde Is."
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Dlt",0x00000000,"Cape Verde Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Std",0x00000000,"Cape Verde Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Index",0x00010001,83
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","TZI",0x00000001,\
+0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Display",0x00000000,"(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Dlt",0x00000000,"GMT Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Std",0x00000000,"GMT Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Index",0x00010001,85
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","TZI",0x00000001,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Display",0x00000000,"(GMT) Casablanca, Monrovia, Reykjavik"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Dlt",0x00000000,"Greenwich Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Std",0x00000000,"Greenwich Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Index",0x00010001,90
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","TZI",0x00000001,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Display",0x00000000,"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Dlt",0x00000000,"Central Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Std",0x00000000,"Central Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Index",0x00010001,95
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Display",0x00000000,"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Dlt",0x00000000,"Central European Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Std",0x00000000,"Central European Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Index",0x00010001,100
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Display",0x00000000,"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Dlt",0x00000000,"Romance Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Std",0x00000000,"Romance Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Index",0x00010001,105
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Display",0x00000000,"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Dlt",0x00000000,"W. Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Std",0x00000000,"W. Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Index",0x00010001,110
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Display",0x00000000,"(GMT+02:00) Minsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Dlt",0x00000000,"E. Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Std",0x00000000,"E. Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Index",0x00010001,115
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Display",0x00000000,"(GMT+02:00) Cairo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Dlt",0x00000000,"Egypt Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Std",0x00000000,"Egypt Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Index",0x00010001,120
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x09,0x00,0x04,0x00,0x05,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x04,0x00,0x05,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Display",0x00000000,"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Dlt",0x00000000,"FLE Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Std",0x00000000,"FLE Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Index",0x00010001,125
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Display",0x00000000,"(GMT+02:00) Athens, Bucharest, Istanbul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Dlt",0x00000000,"GTB Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Std",0x00000000,"GTB Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Index",0x00010001,130
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Display",0x00000000,"(GMT+02:00) Jerusalem"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Dlt",0x00000000,"Israel Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Std",0x00000000,"Israel Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Index",0x00010001,135
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x05,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x05,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Display",0x00000000,"(GMT+02:00) Harare, Pretoria"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Dlt",0x00000000,"South Africa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Std",0x00000000,"South Africa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Index",0x00010001,140
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Display",0x00000000,"(GMT+03:00) Moscow, St. Petersburg, Volgograd"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Dlt",0x00000000,"Russian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Std",0x00000000,"Russian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Index",0x00010001,145
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Display",0x00000000,"(GMT+03:00) Kuwait, Riyadh"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Dlt",0x00000000,"Arab Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Std",0x00000000,"Arab Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Index",0x00010001,150
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Display",0x00000000,"(GMT+03:00) Nairobi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Dlt",0x00000000,"E. Africa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Std",0x00000000,"E. Africa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Index",0x00010001,155
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Display",0x00000000,"(GMT+03:00) Baghdad"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Dlt",0x00000000,"Arabic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Std",0x00000000,"Arabic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Index",0x00010001,158
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Display",0x00000000,"(GMT+03:30) Tehran"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Dlt",0x00000000,"Iran Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Std",0x00000000,"Iran Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Index",0x00010001,160
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","TZI",0x00000001,\
+0x2e,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Display",0x00000000,"(GMT+04:00) Abu Dhabi, Muscat"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Dlt",0x00000000,"Arabian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Std",0x00000000,"Arabian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Index",0x00010001,165
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","TZI",0x00000001,\
+0x10,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Display",0x00000000,"(GMT+04:00) Caucasus Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Dlt",0x00000000,"Caucasus Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Std",0x00000000,"Caucasus Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Index",0x00010001,170
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","TZI",0x00000001,\
+0x10,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Display",0x00000000,"(GMT+04:30) Kabul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Dlt",0x00000000,"Afghanistan Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Std",0x00000000,"Afghanistan Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Index",0x00010001,175
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","TZI",0x00000001,\
+0xf2,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Display",0x00000000,"(GMT+05:00) Ekaterinburg"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Dlt",0x00000000,"Ekaterinburg Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Std",0x00000000,"Ekaterinburg Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Index",0x00010001,180
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","TZI",0x00000001,\
+0xd4,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Display",0x00000000,"(GMT+05:00) Islamabad, Karachi, Tashkent"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Dlt",0x00000000,"West Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Std",0x00000000,"West Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Index",0x00010001,185
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","TZI",0x00000001,\
+0xd4,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Display",0x00000000,"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Dlt",0x00000000,"India Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Std",0x00000000,"India Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Index",0x00010001,190
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","TZI",0x00000001,\
+0xb6,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Display",0x00000000,"(GMT+05:45) Kathmandu"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Dlt",0x00000000,"Nepal Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Std",0x00000000,"Nepal Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Index",0x00010001,193
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","TZI",0x00000001,\
+0xa7,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Display",0x00000000,"(GMT+05:30) Sri Jayawardenepura"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Dlt",0x00000000,"Sri Lanka Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Std",0x00000000,"Sri Lanka Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Index",0x00010001,194
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","TZI",0x00000001,\
+0xb6,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Display",0x00000000,"(GMT+06:00) Astana, Dhaka"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Dlt",0x00000000,"Central Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Std",0x00000000,"Central Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Index",0x00010001,195
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","TZI",0x00000001,\
+0x98,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Display",0x00000000,"(GMT+06:00) Almaty, Novosibirsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Dlt",0x00000000,"N. Central Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Std",0x00000000,"N. Central Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Index",0x00010001,201
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","TZI",0x00000001,\
+0x98,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Display",0x00000000,"(GMT+06:30) Yangon (Rangoon)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Dlt",0x00000000,"Myanmar Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Std",0x00000000,"Myanmar Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Index",0x00010001,203
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","TZI",0x00000001,\
+0x7a,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Display",0x00000000,"(GMT+07:00) Bangkok, Hanoi, Jakarta"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Dlt",0x00000000,"SE Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Std",0x00000000,"SE Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Index",0x00010001,205
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","TZI",0x00000001,\
+0x5c,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Display",0x00000000,"(GMT+07:00) Krasnoyarsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Dlt",0x00000000,"North Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Std",0x00000000,"North Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Index",0x00010001,207
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","TZI",0x00000001,\
+0x5c,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Display",0x00000000,"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Dlt",0x00000000,"China Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Std",0x00000000,"China Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Index",0x00010001,210
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Display",0x00000000,"(GMT+08:00) Kuala Lumpur, Singapore"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Dlt",0x00000000,"Singapore Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Std",0x00000000,"Singapore Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Index",0x00010001,215
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Display",0x00000000,"(GMT+08:00) Taipei"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Dlt",0x00000000,"Taipei Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Std",0x00000000,"Taipei Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Index",0x00010001,220
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Display",0x00000000,"(GMT+08:00) Perth"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Dlt",0x00000000,"W. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Std",0x00000000,"W. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Index",0x00010001,225
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Display",0x00000000,"(GMT+08:00) Irkutsk, Ulaan Bataar"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Dlt",0x00000000,"North Asia East Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Std",0x00000000,"North Asia East Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Index",0x00010001,227
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Display",0x00000000,"(GMT+09:00) Seoul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Dlt",0x00000000,"Korea Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Std",0x00000000,"Korea Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Index",0x00010001,230
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Display",0x00000000,"(GMT+09:00) Osaka, Sapporo, Tokyo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Dlt",0x00000000,"Tokyo Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Std",0x00000000,"Tokyo Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Index",0x00010001,235
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Display",0x00000000,"(GMT+09:00) Yakutsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Dlt",0x00000000,"Yakutsk Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Std",0x00000000,"Yakutsk Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Index",0x00010001,240
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Display",0x00000002,"(GMT+09:30) Darwin"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Dlt",0x00000002,"AUS Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Std",0x00000002,"AUS Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Index",0x00010001,245
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","TZI",0x00000001,\
+0xc6,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Display",0x00000000,"(GMT+09:30) Adelaide"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Dlt",0x00000000,"Cen. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Std",0x00000000,"Cen. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Index",0x00010001,250
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","TZI",0x00000001,\
+0xc6,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Display",0x00000000,"(GMT+10:00) Canberra, Melbourne, Sydney"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Dlt",0x00000000,"AUS Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Std",0x00000000,"AUS Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Index",0x00010001,255
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Display",0x00000000,"(GMT+10:00) Brisbane"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Dlt",0x00000000,"E. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Std",0x00000000,"E. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Index",0x00010001,260
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Display",0x00000000,"(GMT+10:00) Hobart"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Dlt",0x00000000,"Tasmania Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Std",0x00000000,"Tasmania Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Index",0x00010001,265
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Display",0x00000000,"(GMT+10:00) Vladivostok"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Dlt",0x00000000,"Vladivostok Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Std",0x00000000,"Vladivostok Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Index",0x00010001,270
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Display",0x00000000,"(GMT+10:00) Guam, Port Moresby"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Dlt",0x00000000,"West Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Std",0x00000000,"West Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Index",0x00010001,275
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Display",0x00000000,"(GMT+11:00) Magadan, Solomon Is., New Caledonia"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Dlt",0x00000000,"Central Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Std",0x00000000,"Central Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Index",0x00010001,280
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","TZI",0x00000001,\
+0x6c,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Display",0x00000000,"(GMT+12:00) Fiji, Kamchatka, Marshall Is."
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Dlt",0x00000000,"Fiji Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Std",0x00000000,"Fiji Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Index",0x00010001,285
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","TZI",0x00000001,\
+0x30,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Display",0x00000000,"(GMT+12:00) Auckland, Wellington"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Dlt",0x00000000,"New Zealand Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Std",0x00000000,"New Zealand Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Index",0x00010001,290
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","TZI",0x00000001,\
+0x30,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x09,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Display",0x00000000,"(GMT+13:00) Nuku'alofa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Dlt",0x00000000,"Tonga Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Std",0x00000000,"Tonga Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Index",0x00010001,300
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","TZI",0x00000001,\
+0xf4,0xfc,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+; Available file systems
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT",0x00000000,"ufat.dll"
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT32",0x00000000,"ufat.dll"
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FATX",0x00000000,"ufatx.dll"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ConsoleShell",0x00020000,"%SystemRoot%\system32\cmd.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartServices",0x00010001,0x00000001
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartLsass",0x00010001,0x00000001
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,"1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,"Administrator"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,"Secret"
+
+;Time Zone Servers
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","1",0x00000000,"pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","2",0x00000000,"asia.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","3",0x00000000,"europe.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","4",0x00000000,"north-america.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","5",0x00000000,"oceania.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","6",0x00000000,"south-america.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","7",0x00000000,"time.windows.com"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","8",0x00000000,"time.nist.gov"
+
+; Country Codes
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List","CountryListVersion",0x00010001,0x00000019
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","CountryCode",0x00010001,0x00000001
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","Name",0x00000000,"United States of America"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","CountryCode",0x00010001,0x0000006A
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","Name",0x00000000,"British Virgin Islands"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","CountryCode",0x00010001,0x0000006B
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","Name",0x00000000,"Canada"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","CountryCode",0x00010001,0x0000006D
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","Name",0x00000000,"Dominica"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","CountryCode",0x00010001,0x0000006E
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","Name",0x00000000,"Dominican Republic"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","CountryCode",0x00010001,0x00000014
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","Name",0x00000000,"Egypt"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","CountryCode",0x00010001,0x0000010c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","Name",0x00000000,"Swaziland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","CountryCode",0x00010001,0x0000001b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","Name",0x00000000,"South Africa"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","CountryCode",0x00010001,0x0000001e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","Name",0x00000000,"Greece"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","CountryCode",0x00010001,0x0000001f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","Name",0x00000000,"Netherlands"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","CountryCode",0x00010001,0x00000020
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","Name",0x00000000,"Belgium"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","CountryCode",0x00010001,0x00000021
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","Name",0x00000000,"France"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","CountryCode",0x00010001,0x00000022
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","Name",0x00000000,"Spain"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","CountryCode",0x00010001,0x0000015f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","Name",0x00000000,"Portugal"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","CountryCode",0x00010001,0x00000160
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","Name",0x00000000,"Luxembourg"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","CountryCode",0x00010001,0x00000161
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","Name",0x00000000,"Ireland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","CountryCode",0x00010001,0x00000162
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","Name",0x00000000,"Iceland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","CountryCode",0x00010001,0x00000163
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","Name",0x00000000,"Albania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","CountryCode",0x00010001,0x00000166
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","Name",0x00000000,"Finland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","CountryCode",0x00010001,0x00000167
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","Name",0x00000000,"Bulgaria"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","CountryCode",0x00010001,0x00000024
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","Name",0x00000000,"Hungary"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","CountryCode",0x00010001,0x00000172
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","Name",0x00000000,"Lithuania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","CountryCode",0x00010001,0x00000173
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","Name",0x00000000,"Latvia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","CountryCode",0x00010001,0x00000174
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","Name",0x00000000,"Estonia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","CountryCode",0x00010001,0x00000175
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","Name",0x00000000,"Moldova"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","CountryCode",0x00010001,0x00000176
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","Name",0x00000000,"Armenia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","CountryCode",0x00010001,0x0000017c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","Name",0x00000000,"Ukraine"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","CountryCode",0x00010001,0x0000017d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","Name",0x00000000,"Yugoslavia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","CountryCode",0x00010001,0x00000181
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","Name",0x00000000,"Croatia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","CountryCode",0x00010001,0x00000182
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","Name",0x00000000,"Slovenia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","CountryCode",0x00010001,0x00000183
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","Name",0x00000000,"Bosnia and Herzegovina"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","CountryCode",0x00010001,0x00000027
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","Name",0x00000000,"Italy"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","CountryCode",0x00010001,0x00000028
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","Name",0x00000000,"Romania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","CountryCode",0x00010001,0x00000029
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","Name",0x00000000,"Switzerland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","CountryCode",0x00010001,0x000001a4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","Name",0x00000000,"Czech Republic"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","CountryCode",0x00010001,0x000001a5
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","Name",0x00000000,"Slovakia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","CountryCode",0x00010001,0x000001a7
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","Name",0x00000000,"Liechtenstein"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","CountryCode",0x00010001,0x0000002b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"Austria"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"United Kingdom"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"Sweden"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","Name",0x00000000,"Norway"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","CountryCode",0x00010001,0x00000030
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","Name",0x00000000,"Poland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","CountryCode",0x00010001,0x00000031
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","Name",0x00000000,"Germany"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","CountryCode",0x00010001,0x00000034
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","Name",0x00000000,"Mexico"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","CountryCode",0x00010001,0x00000036
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","Name",0x00000000,"Argentina"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","CountryCode",0x00010001,0x00000037
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","Name",0x00000000,"Brazil"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","CountryCode",0x00010001,0x00000038
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","Name",0x00000000,"Chile"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","CountryCode",0x00010001,0x00000039
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","Name",0x00000000,"Colombia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","CountryCode",0x00010001,0x0000003a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","Name",0x00000000,"Venezuela"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","CountryCode",0x00010001,0x0000003c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","Name",0x00000000,"Malaysia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","CountryCode",0x00010001,0x0000003d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","Name",0x00000000,"Australia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","CountryCode",0x00010001,0x0000003e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","Name",0x00000000,"Indonesia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","CountryCode",0x00010001,0x0000003f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","Name",0x00000000,"Philippines"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","CountryCode",0x00010001,0x00000040
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","Name",0x00000000,"New Zealand"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","CountryCode",0x00010001,0x00000007
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","Name",0x00000000,"Russia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","CountryCode",0x00010001,0x000002C1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","Name",0x00000000,"Kazakhstan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","CountryCode",0x00010001,0x000002C4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","Name",0x00000000,"Tajikistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","CountryCode",0x00010001,0x00000051
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","Name",0x00000000,"Japan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","CountryCode",0x00010001,0x00000052
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","Name",0x00000000,"Korea (Republic of)"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","CountryCode",0x00010001,0x00000352
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","Name",0x00000000,"Korea (North)"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","CountryCode",0x00010001,0x00000056
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","Name",0x00000000,"China"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","CountryCode",0x00010001,0x00000376
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","Name",0x00000000,"Taiwan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","CountryCode",0x00010001,0x0000005a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","Name",0x00000000,"Turkey"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","CountryCode",0x00010001,0x0000005b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","Name",0x00000000,"India"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","CountryCode",0x00010001,0x0000005d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","Name",0x00000000,"Afghanistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","CountryCode",0x00010001,0x000003c0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","Name",0x00000000,"Maldives"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","CountryCode",0x00010001,0x000003c4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","Name",0x00000000,"Iraq"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","CountryCode",0x00010001,0x000003c6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","Name",0x00000000,"Saudi Arabia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","CountryCode",0x00010001,0x000003cb
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","Name",0x00000000,"United Arab Emirates"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","CountryCode",0x00010001,0x000003cc
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","Name",0x00000000,"Israel"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","CountryCode",0x00010001,0x000003ce
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","Name",0x00000000,"Qatar"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","CountryCode",0x00010001,0x000003d0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","Name",0x00000000,"Mongolia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","CountryCode",0x00010001,0x000003d1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","Name",0x00000000,"Nepal"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","CountryCode",0x00010001,0x00000062
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","Name",0x00000000,"Iran"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","CountryCode",0x00010001,0x000003e1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","Name",0x00000000,"Turkmenistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","CountryCode",0x00010001,0x000003e2
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","Name",0x00000000,"Azerbaijan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","CountryCode",0x00010001,0x000003e3
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","Name",0x00000000,"Georgia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","CountryCode",0x00010001,0x000003e4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","Name",0x00000000,"Kyrgyzstan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","CountryCode",0x00010001,0x000003e6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","Name",0x00000000,"Uzbekistan"
+
+;Cursors Schemes
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes","ReactOS Default",0x00020000,"\",,,,,,,,,,,,,\""
+
+;PowerCfg
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","LastID",0x00000002,"0"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","DiskSpinDownMax",0x00000002,"3600"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","DiskSpinDownMin",0x00000002,"3"
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy","Policies",0x00000001,\
+01,00,00,00,01,00,00,00,01,00,00,00,03,00,00,00
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\0","Policies",0x00000001,\
+01,00,00,00,02,00,00,00,04,00,00,00,02,00,00,00,02,00,00,00,00,00,00,00,84,03,00,00,00,00,00,00,84,03,\
+00,00,32,32,00,00,02,00,00,00,04,00,00,c0,00,00,00,00,02,00,00,00,04,00,00,c0,00,00,00,00
+
+; deskadp.dll shell extension
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\Device\shellex\PropertySheetHandlers\Display Adapter CPL Extension","",0x00000000,"{42071712-76d4-11d1-8b24-00a0c9068ff3}"
+
+; deskmon.dll shell extension
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\Device\shellex\PropertySheetHandlers\Display Monitor CPL Extension","",0x00000000,"{42071713-76d4-11d1-8b24-00a0c9068ff3}"
+
+; Where to download the Mozilla ActiveX control
+HKLM,"SOFTWARE\ReactOS\shdocvw","MozillaUrl",0x00000000,"http://links.reactos.org/mozactivex"
+
+; Keyboard layout switcher
+;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","kbswitch",0x00000000,"kbswitch.exe"
+
+; EOF
--- /dev/null
+[Version]
+Signature = "$ReactOS$"
+
+[AddReg]
+
+; Device classes (this list is incomplete... and should be generated from .inf files during installation)
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Client"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-7"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Service"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetService"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-7"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Protocol"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetTrans"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-6"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+; Default computer name settings
+HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName",0x00000002,"COMPUTERNAME"
+
+; Device classes key
+HKLM,"SYSTEM\CurrentControlSet\Control\DeviceClasses",,0x00000012
+
+; Hardware profile settings
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB","CurrentConfig",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0000","FriendlyName",0x00000000,"New Hardware Profile"
+
+; Keyboard Layouts
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout File",0x00000000,"kbda1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout Text",0x00000000,"Arabic (101)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5084"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout File",0x00000000,"kbda2.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout Text",0x00000000,"Arabic (102)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5085"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout File",0x00000000,"kbda3.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Text",0x00000000,"Arabic (102) AZERTY"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5086"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout File",0x00000000,"kbdbgm.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Text",0x00000000,"Bulgarian BDS 5237-1978"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5136"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout File",0x00000000,"kbdbgt.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout Text",0x00000000,"Bulgarian phonetic classic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5134"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout File",0x00000000,"kbdbga.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout Text",0x00000000,"Bulgarian phonetic BDS 5237-2006"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5135"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout File",0x00000000,"kbdda.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout Text",0x00000000,"Danish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5007"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout File",0x00000000,"kbdgerg.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout Text",0x00000000,"German (de_ergo)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5139"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout File",0x00000000,"kbdgneo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout Text",0x00000000,"German (NEO-1.1)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5138"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout File",0x00000000,"kbdgrist.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout Text",0x00000000,"German (RISTOME)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5137"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout File",0x00000000,"kbdgr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout Text",0x00000000,"German"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5011"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout File",0x00000000,"kbdsg.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout Text",0x00000000,"Swiss (German)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5024"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout File",0x00000000,"kbdhe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout Text",0x00000000,"Greek"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5046"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout File",0x00000000,"kbdus.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout Text",0x00000000,"United States"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5000"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout File",0x00000000,"kbduk.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout Text",0x00000000,"United Kingdom"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5025"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout File",0x00000000,"kbddv.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Id", 0x00000000,"0002"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Text",0x00000000,"US-Dvorak"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5092"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout File",0x00000000,"kbdusx.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Id", 0x00000000,"0001"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Text",0x00000000,"US International"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5026"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout File",0x00000000,"kbdusl.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Id", 0x00000000,"001A"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Text",0x00000000,"US Dvorak for left hand"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5027"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout File",0x00000000,"kbdusr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Id", 0x00000000,"001B"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Text",0x00000000,"US Dvorak for right hand"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5028"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout File",0x00000000,"kbdusa.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Id", 0x00000000,"000B"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Text",0x00000000,"US English (IBM Arabic 238_L)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5123"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout File",0x00000000,"kbdir.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout Text",0x00000000,"Irish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5014"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout File",0x00000000,"kbdes.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout Text",0x00000000,"Spanish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5020"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout File",0x00000000,"kbdla.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout Text",0x00000000,"Latin American"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5017"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout File",0x00000000,"kbdfi.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout Text",0x00000000,"Finnish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5009"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout File",0x00000000,"kbdfr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout Text",0x00000000,"French"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5010"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout File",0x00000000,"kbdheb.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout Text",0x00000000,"Hebrew"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5083"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout File",0x00000000,"kbdic.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout Text",0x00000000,"Icelandic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5013"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout File",0x00000000,"kbdit.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout Text",0x00000000,"Italian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5015"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout File",0x00000000,"kbdja.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout Text",0x00000000,"Japanese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5061"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout File",0x00000000,"kbdal.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout Text",0x00000000,"Albanian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5029"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout File",0x00000000,"kbdtuq.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout Text",0x00000000,"Turkish Q"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5060"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout File",0x00000000,"kbdtuf.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Text",0x00000000,"Turkish F"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5059"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Id",0x00000000,"0014"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout File",0x00000000,"kbdbe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout Text",0x00000000,"Belgian (French)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5002"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout File",0x00000000,"kbdne.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout Text",0x00000000,"Dutch"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5008"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout File",0x00000000,"kbdbe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout Text",0x00000000,"Belgian (Dutch)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5001"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout File",0x00000000,"kbdpl1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout Text",0x00000000,"Polish (Programmers)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5035"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout File",0x00000000,"kbdbr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout Text",0x00000000,"Portuguese (Brazilian ABNT2)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5126"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout File",0x00000000,"kbdpo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout Text",0x00000000,"Portuguese (Portugal)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5019"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout File",0x00000000,"kbdro.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout Text",0x00000000,"Romanian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5037"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout File",0x00000000,"kbdru.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout Text",0x00000000,"Russian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5055"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout File",0x00000000,"kbdru1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout Text",0x00000000,"Russian (Typewriter)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5056"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout File",0x00000000,"kbdcr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout Text",0x00000000,"Croatian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5030"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout File",0x00000000,"kbdsk.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout Text",0x00000000,"Slovak"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5039"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout File",0x00000000,"kbdsk1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout Text",0x00000000,"Slovak (QWERTY)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5040"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout File",0x00000000,"kbdsw.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout Text",0x00000000,"Swedish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5022"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout File",0x00000000,"kbdth0.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout Text",0x00000000,"Thai Kedmanee"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5079"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout File",0x00000000,"kbdth1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout Text",0x00000000,"Thai Pattachote"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5080"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout File",0x00000000,"kbdth2.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout Text",0x00000000,"Thai Kedmanee (non-ShiftLock)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5081"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout File",0x00000000,"kbdth3.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout Text",0x00000000,"Thai Pattachote (non-ShiftLock)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5082"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout File",0x00000000,"kbdur.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout Text",0x00000000,"Ukrainian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5058"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout File",0x00000000,"kbdurs.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout Text",0x00000000,"Ukrainian (Student)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5141"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout File",0x00000000,"kbdblr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout Text",0x00000000,"Belarusian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5052"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout File",0x00000000,"kbdest.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout Text",0x00000000,"Estonian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5042"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout File",0x00000000,"kbdlv.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout Text",0x00000000,"Latvian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5043"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000427","Layout File",0x00000000,"kbdlt.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000427","Layout Text",0x00000000,"Lithuanian IBM"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000427","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5045"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout File",0x00000000,"kbdvntc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout Text",0x00000000,"Vietnamese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5118"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout File",0x00000000,"kbdarme.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Text",0x00000000,"Armenian Eastern"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5120"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout File",0x00000000,"kbdarmw.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Eastern"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5121"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout File",0x00000000,"kbdazel.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout Text",0x00000000,"Azeri Latin"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5117"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout File",0x00000000,"kbdaze.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout Text",0x00000000,"Azeri Cyrillic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5115"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout File",0x00000000,"kbdmac.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout Text",0x00000000,"Macedonian (FYRO)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5109"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout File",0x00000000,"kbdgeo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout Text",0x00000000,"Georgian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5119"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout File",0x00000000,"kbdindev.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout Text",0x00000000,"Devanagari - INSCRIPT"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5096"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout File",0x00000000,"kbdkaz.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout Text",0x00000000,"Kazakh"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5113"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout File",0x00000000,"kbduzb.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout Text",0x00000000,"Uzbek (Cyrillic)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5114"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout File",0x00000000,"kbdtat.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout Text",0x00000000,"Tatar"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5116"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout File",0x00000000,"kbdinben.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout Text",0x00000000,"Bengali"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5135"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout File",0x00000000,"kbdinguj.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout Text",0x00000000,"Gujarati"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5097"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout File",0x00000000,"kbdinmal.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout Text",0x00000000,"Malayalam"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5139"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout File",0x00000000,"kbdinasa.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout Text",0x00000000,"ASSAMESE - INSCRIPT"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5177"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout File",0x00000000,"kbdbur.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout Text",0x00000000,"Burmese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5140"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout File",0x00000000,"kbdno.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout Text",0x00000000,"Norwegian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5018"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout File",0x00000000,"kbdcz1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout Text",0x00000000,"Czech (QWERTY)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5031"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout File",0x00000000,"kbdcan.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Id", 0x00000000,"0020"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Text",0x00000000,"Canadian Multilingual Standard"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5110"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout File",0x00000000,"kbdfc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout Text",0x00000000,"Canadian French (Legacy)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5005"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout File",0x00000000,"kbdycc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout Text",0x00000000,"Serbian (Cyrillic)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5057"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout File",0x00000000,"kbdycl.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout Text",0x00000000,"Serbian (Latin)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5038"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout File",0x00000000,"kbdko.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout Text",0x00000000,"Korean"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5063"
+
+; Network
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Adapters"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"Net"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Client"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Service"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetService"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Protocol"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetTrans"
+
+; NLS Files
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","37",0x00000000,"c_037.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","424",0x00000000,"c_424.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","437",0x00000000,"c_437.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","500",0x00000000,"c_500.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","737",0x00000000,"c_737.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","775",0x00000000,"c_775.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","850",0x00000000,"c_850.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","852",0x00000000,"c_852.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","855",0x00000000,"c_855.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","856",0x00000000,"c_856.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","857",0x00000000,"c_857.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","860",0x00000000,"c_860.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","861",0x00000000,"c_861.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","862",0x00000000,"c_862.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","863",0x00000000,"c_863.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","864",0x00000000,"c_864.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","865",0x00000000,"c_865.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","866",0x00000000,"c_866.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","869",0x00000000,"c_869.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","874",0x00000000,"c_874.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","875",0x00000000,"c_875.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","878",0x00000000,"c_878.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","932",0x00000000,"c_932.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","936",0x00000000,"c_936.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","949",0x00000000,"c_949.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","950",0x00000000,"c_950.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1006",0x00000000,"c_1006.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1026",0x00000000,"c_1026.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1250",0x00000000,"c_1250.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1251",0x00000000,"c_1251.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1252",0x00000000,"c_1252.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1253",0x00000000,"c_1253.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1254",0x00000000,"c_1254.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1255",0x00000000,"c_1255.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1256",0x00000000,"c_1256.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1257",0x00000000,"c_1257.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1258",0x00000000,"c_1258.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10000",0x00000000,"c_10000.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10006",0x00000000,"c_10006.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10007",0x00000000,"c_10007.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10029",0x00000000,"c_10029.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10079",0x00000000,"c_10079.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10081",0x00000000,"c_10081.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","20866",0x00000000,"c_20866.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28591",0x00000000,"c_28591.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28592",0x00000000,"c_28592.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28593",0x00000000,"c_28593.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28594",0x00000000,"c_28594.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28595",0x00000000,"c_28595.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28596",0x00000000,"c_28596.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28597",0x00000000,"c_28597.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28598",0x00000000,"c_28598.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28599",0x00000000,"c_28599.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","ACP",0x00000000,"1252"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","OEMCP",0x00000000,"437"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","MACCP",0x00000000,"10000"
+
+; NLS Language settings
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0402",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0403",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0404",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0804",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0405",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0406",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0407",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0807",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c07",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1407",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0408",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0809",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c09",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1809",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1c09",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","2009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","080a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","100a",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","140a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","180a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","200a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","240a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","280a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","2c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","300a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","340a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","380a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","400a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","440a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","480a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","4c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","500a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040b",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","080c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c0c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","100c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","140c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","180c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040f",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0410",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0810",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0411",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0412",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0413",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0813",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0814",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0415",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0416",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0816",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0418",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0419",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","081a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c1a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041b",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","081d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041f",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0420",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0421",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0422",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0423",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0424",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0425",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0426",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0427",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0429",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042b",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042c",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","082c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042f",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0436",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0437",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0438",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0439",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","043e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","083e",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","043f",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0440",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0441",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0443",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0843",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0455",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0456",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","Default",0x00000000,"0409"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","InstallLanguage",0x00000000,"0409"
+
+; Supported and installed locales
+; If you add/uncomment an entry here, please also add the appropriate Language
+; in the previous section.
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000402",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000403",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000404",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000804",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000405",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000406",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000807",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c07",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000408",0x00000000,"4"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000809",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c09",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001809",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001c09",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00002009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000080a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000100a",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000140a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000180a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000200a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000240a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000280a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00002c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000300a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000340a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000380a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000400a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000440a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000480a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00004c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000500a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040b",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000080c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c0c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000100c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000140c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000180c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040d",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040e",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040f",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000410",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000810",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000411",0x00000000,"7"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000412",0x00000000,"8"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000413",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000813",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000414",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000814",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000415",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000416",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000816",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000418",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000419",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041a",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000081a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c1a",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041b",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041c",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000081d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041e",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041f",0x00000000,"6"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000420",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000421",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000422",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000423",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000424",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000425",0x00000000,"3"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000426",0x00000000,"3"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000427",0x00000000,"3"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000429",0x00000000,""
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042a",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042b",0x00000000,""
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042c",0x00000000,"6"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000082c",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042f",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000436",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000437",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000438",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000439",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000043e",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000083e",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000043f",0x00000000,"5"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000440",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000441",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000443",0x00000000,"6"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000843",0x00000000,"5"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000455",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000456",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","1",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","2",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","3",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","4",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","5",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","6",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","7",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","8",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","9",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","10",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","11",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","b",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","e",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","f",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00010407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","0001040e",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00010437",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00020804",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00021004",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00021404",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00030404",0x00000000,""
+
+; Some installers check for SP6
+HKLM,"SYSTEM\CurrentControlSet\Control\Windows","CSDVersion",0x00010001,0x00000600
+
+; Service groups
+HKLM,"SYSTEM\CurrentControlSet\Control\ServiceGroupOrder","List",0x00010000, \
+ "Boot Bus Extender", \
+ "System Bus Extender", \
+ "SCSI Port", \
+ "SCSI Miniport", \
+ "Primary Disk", \
+ "SCSI Class Helper", \
+ "SCSI Class", \
+ "Boot File System", \
+ "Base", \
+ "Pointer Port", \
+ "Keyboard Port", \
+ "Pointer Class", \
+ "Keyboard Class", \
+ "Debug", \
+ "Video Init", \
+ "Video", \
+ "Video Save", \
+ "File System", \
+ "Event log", \
+ "NDIS", \
+ "PNP_TDI", \
+ "TDI", \
+ "PlugPlay", \
+ "Extended Base"
+
+; Set the timeout for directx/ReactX graphic surface lock see _EDD_DIRECTDRAW_GLOBAL struct for more info
+HKLM,"SYSTEM\CurrentControlSet\Control\GraphicsDrivers\DCI","Timeout",0x00010001,0x00000007
+
+; Group order, the first DWORD is the count of entries,
+; the following dwords are the tag entries for the load order.
+HKLM,"SYSTEM\CurrentControlSet\Control\GroupOrderList","Video Save", 0x00000001, \
+ 0x02, 0x00, 0x00, 0x00, \
+ 0x01, 0x00, 0x00, 0x00, \
+ 0x02, 0x00, 0x00, 0x00
+HKLM,"SYSTEM\CurrentControlSet\Control\GroupOrderList","SCSI Miniport", 0x00000001, \
+ 0x02, 0x00, 0x00, 0x00, \
+ 0x10, 0x00, 0x00, 0x00, \
+ 0x20, 0x00, 0x00, 0x00
+
+; Session Manager stuff
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","BootExecute", 0x00010000, \
+ "autocheck autochk *"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","ObjectDirectories",0x00010000, \
+ "\Windows", \
+ "\RPC Control"
+
+; DOS devices
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","AUX",0x00000000,"\DosDevices\COM1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","MAILSLOT",0x00000000,"\Device\MailSlot"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","NUL",0x00000000,"\Device\Null"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","PIPE",0x00000000,"\Device\NamedPipe"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","PRN",0x00000000,"\DosDevices\LPT1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x00000000,"\Device\Mup"
+
+; System environment settings
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","OS",0x00020000,"ReactOS"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00020000,".COM;.EXE;.BAT;.CMD"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROCESSOR_ARCHITECTURE",0x00020000,"x86"
+
+
+; Known DLLs
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","DllDirectory",0x00020000,"%SystemRoot%\system32"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","advapi32",0x00000000,"advapi32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","kernel32",0x00000000,"kernel32.dll"
+
+; Pagefile settings
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management","PagingFiles",0x00010000, \
+ "C:\pagefile.sys"
+
+; Subsystems
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Debug",0x00020000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Kmode",0x00020000,"%SystemRoot%\system32\win32k.sys"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Optional",0x00010000,"Posix","Os2","Vms"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Os2",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\OS2 SharedSection=128 Windows=Off SubSystemType=Text ServerDll=os2srv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Posix",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\POSIX SharedSection=128 Windows=Off SubSystemType=Text ServerDll=psxsrv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Required",0x00010000,"Debug","Windows"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Vms",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\VMS SharedSection=128 Windows=Off SubSystemType=Text ServerDll=vmssrv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Windows",0x00020000,"%SystemRoot%\system32\csrss.exe"
+
+; WOW Support
+HKLM,"SYSTEM\CurrentControlSet\Control\Wow","",0x00000000,""
+
+; PNP Root device
+HKLM,"SYSTEM\CurrentControlSet\Enum\HTREE\ROOT\0","",0x00000000,""
+
+; Afd driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Group",0x00000000,"TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","ImagePath",0x00020000,"system32\drivers\afd.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Type",0x00010001,0x00000001
+
+; Atapi miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","Group",0x00000000,"SCSI Miniport"
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","ImagePath",0x00020000,"system32\drivers\atapi.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Atapi","Tag",0x00010001,0x00000010
+
+; Audio Service
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","DisplayName",0x00000000,"Audio Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Description",0x00000000,"Provides audio facilities to applications"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Group",0x00000000,"Audio"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","ImagePath",0x00020000,"%SystemRoot%\system32\audiosrv.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Type",0x00010001,0x00000010
+
+; BusLogic 958 miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Group",0x00000000,"SCSI Miniport"
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ImagePath",0x00020000,"system32\drivers\buslogic.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Tag",0x00010001,0x00000020
+
+; Beep device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ImagePath",0x00020000,"system32\drivers\beep.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Type",0x00010001,0x00000001
+
+; BlueScreen device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Group",0x00000000,"Video Init"
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ImagePath",0x00020000,"system32\drivers\blue.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Type",0x00010001,0x00000001
+
+; Cdfs (ISO96660) filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ImagePath",0x00020000,"system32\drivers\cdfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Type",0x00010001,0x00000002
+
+; Cdrom class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Group",0x00000000,"SCSI Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","ImagePath",0x00020000,"system32\drivers\cdrom.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Type",0x00010001,0x00000001
+
+; Class2 driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Group",0x00000000,"SCSI Class Helper"
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","ImagePath",0x00020000,"system32\drivers\class2.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Type",0x00010001,0x00000001
+
+; Debug output driver
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Group",0x00000000,"Debug"
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ImagePath",0x00020000,"system32\drivers\debugout.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Type",0x00010001,0x00000001
+
+; Disk class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Group",0x00000000,"SCSI Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","ImagePath",0x00020000,"system32\drivers\disk.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Type",0x00010001,0x00000001
+
+; DHCP client service
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","DisplayName",0x00000000,"DHCP Client"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Description",0x00000000,"Attempts to obtain network settings automatically from an available DHCP server"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Group",0x00000000,"Network"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ImagePath",0x00020000,"%SystemRoot%\system32\dhcp.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Type",0x00010001,0x00000010
+
+; Event logging service
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","DisplayName",0x00000000,"Event Logger"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Description",0x00000000,"Logs events or messages sent by the operating system in a database accessible via the event log viewer"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Group",0x00000000,"Event log"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","ImagePath",0x00020000,"%SystemRoot%\system32\eventlog.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Type",0x00010001,0x00000010
+
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application","File",0x00020000,"%SystemRoot%\system32\config\AppEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security","File",0x00020000,"%SystemRoot%\system32\config\SecEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System","File",0x00020000,"%SystemRoot%\system32\config\SysEvent.Evt"
+
+; Floppy driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Group",0x00000000,"Primary Disk"
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ImagePath",0x00020000,"system32\drivers\floppy.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Type",0x00010001,0x00000001
+
+; Filesystem recognizer driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Group",0x00000000,"Boot file system"
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ImagePath",0x00020000,"system32\drivers\fs_rec.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Type",0x00010001,0x00000008
+
+; i8042 port driver
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt","Group",0x00000000,"Keyboard Port"
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt","ImagePath",0x00020000,"system32\drivers\i8042prt.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\i8042prt\Parameters","BreakOnSysRq",0x00010001,0x00000001
+
+; Kernel-Mode Tests
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ErrorControl",0x00010001,0x00000000
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Group",0x00000000,"Base"
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ImagePath",0x00020000,"system32\drivers\kmtest.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Start",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Type",0x00010001,0x00000001
+
+; Keyboard class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Group",0x00000000,"Keyboard Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ImagePath",0x00020000,"system32\drivers\kbdclass.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass\Parameters","ConnectMultiplePorts",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"kbdclass"
+
+; SB16 driver
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ServiceType",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ImagePath",0x00020000,"system32\drivers\sndblst.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DmaChannel",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DmaChannel16",0x00010001,0x00000005
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","Port",0x00010001,0x00000220
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","Interrupt",0x00010001,0x00000005
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DSP Version",0x00010001,0x00000401
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0\Devices","SBWaveIn0",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0\Devices","SBWaveOut0",0x00010001,0x00000002
+
+; MPU-401 MIDI driver
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ServiceType",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ImagePath",0x00020000,"system32\drivers\mpu401.sys"
+
+; Mouse class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Group",0x00000000,"Pointer Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","ImagePath",0x00020000,"system32\drivers\mouclass.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"mouclass"
+
+; Mailslot filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","ImagePath",0x00020000,"system32\drivers\msfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Type",0x00010001,0x00000002
+
+; NDIS driver - the only boot-start network driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Group",0x00000000,"NDIS"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","ImagePath",0x00020000,"system32\drivers\ndis.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Type",0x00010001,0x00000001
+
+; NetLogon
+HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","DisplayName",0x00000000,"Net Logon"
+HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Description",0x00000000,"Sets up a secure channel to a domain controller for domain authentication"
+HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","ImagePath",0x00020000,"%SystemRoot%\system32\lsass.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","Type",0x00010001,0x00000020
+
+; Named Pipe filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","ImagePath",0x00020000,"system32\drivers\npfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Type",0x00010001,0x00000002
+
+; NTFS filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","ImagePath",0x00020000,"system32\drivers\ntfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Type",0x00010001,0x00000002
+
+; Null device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","ImagePath",0x00020000,"system32\drivers\null.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Type",0x00010001,0x00000001
+
+; Packet driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Group",0x00000000,"PNP_TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ImagePath",0x00020000,"system32\drivers\packet.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Type",0x00010001,0x00000001
+
+; Plug and Play manager
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","DisplayName",0x00000000,"Plug and Play"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Description",0x00000000,"Detects hardware changes and installs needed software if possible"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Group",0x00000000,"PlugPlay"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ImagePath",0x00020000,"%SystemRoot%\system32\umpnpmgr.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Type",0x00010001,0x00000010
+
+; RPC service
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","DisplayName",0x00000000,"Remote Procedure Call"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Description",0x00000000,"RPC subsystem which is responsible for Remote procedure Calls on the local machine"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Group",0x00000000," RPC Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","ImagePath",0x00020000,"%SystemRoot%\system32\rpcss.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Type",0x00010001,0x00000010
+
+; Scsiport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Group",0x00000000,"SCSI Port"
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","ImagePath",0x00020000,"system32\drivers\scsiport.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Type",0x00010001,0x00000001
+
+; Simple TCP services
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Description",0x00000000,"Supports the following TCP/IP services: Chargen, Daytime, Discard, Echo, QOTD"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","DisplayName",0x00000000,"Simple TCP/IP Services"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Group",0x00000000,"Network"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","ImagePath",0x00020000,"%SystemRoot%\system32\tcpsvcs.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Type",0x00010001,0x00000020
+
+; Virtual FAT filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Group",0x00000000,"Boot File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","ImagePath",0x00020000,"system32\drivers\fastfat.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Type",0x00010001,0x00000002
+
+; EXT2 Filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Group",0x00000000,"Boot File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ImagePath",0x00020000,"system32\drivers\ext2.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Type",0x00010001,0x00000002
+
+; VBE SVGA driver
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Group",0x00000000,"Video Save"
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","ImagePath",0x00020000,"system32\drivers\vbemp.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Tag",0x00010001,0x00000001
+
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.BitsPerPel",0x00010001,8
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.XResolution",0x00010001,640
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.YResolution",0x00010001,480
+
+; VGA miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Group",0x00000000,"Video Save"
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","ImagePath",0x00020000,"system32\drivers\vgamp.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Tag",0x00010001,0x00000002
+
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","InstalledDisplayDrivers",0x00010000,"vgaddi"
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.BitsPerPel",0x00010001,8
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.XResolution",0x00010001,640
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.YResolution",0x00010001,480
+
+; USB uhci/ehci driver
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base"
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001
+
+; Windows Installer Service
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","DisplayName",0x00000000,"ReactOS Installer"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Description",0x00000000,"Controls installation, maintenance, and removal of software packaged as an msi (Windows Installer)"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Group",0x00000000,"Windows Installer"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","ImagePath",0x00020000,"system32\msiexec.exe /V"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Type",0x00010001,0x00000020
+
+; ControlSet selection settings
+HKLM,"SYSTEM\Select","Current",0x00010001,0x00000001
+HKLM,"SYSTEM\Select","Default",0x00010001,0x00000001
+HKLM,"SYSTEM\Select","Failed",0x00010001,0x00000000
+HKLM,"SYSTEM\Select","LastKnownGood",0x00010001,0x00000000
+
+; System setup settings
+HKLM,"SYSTEM\Setup","CmdLine",0x00000000,"setup -newsetup"
+HKLM,"SYSTEM\Setup","OsLoaderPath",0x00000000,"\"
+HKLM,"SYSTEM\Setup","SetupType",0x00010001,0x00000001
+HKLM,"SYSTEM\Setup","SystemPartition",0x00000000,"\Device\Harddisk0\Partition1"
+HKLM,"SYSTEM\Setup","SystemSetupInProgress",0x00010001,0x00000001
+
+; Debug channels
+;HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","DEBUGCHANNEL",0x00020000,"+ole,+rpc"
+
+; EOF
; Base files
-base\applications\cacls\cacls.exe 1
-base\applications\calc\calc.exe 1
-base\applications\charmap\charmap.exe 1
-base\applications\cmdutils\dbgprint\dbgprint.exe 1
-base\applications\cmdutils\doskey\doskey.exe 1
-base\applications\cmdutils\find\find.exe 1
-base\applications\cmdutils\hostname\hostname.exe 1
-base\applications\cmdutils\more\more.exe 1
-base\applications\cmdutils\xcopy\xcopy.exe 1
-base\applications\control\control.exe 1
-base\applications\mscutils\devmgmt\devmgmt.exe 1
-base\applications\mscutils\eventvwr\eventvwr.exe 1
-base\applications\games\solitaire\sol.exe 1
-base\applications\games\winemine\winemine.exe 1
-base\applications\hh\hh.exe 1
-base\applications\kbswitch\kbswitch.exe 1
-base\applications\kbswitch\kbsdll\kbsdll.dll 1
-base\applications\logoff\logoff.exe 1
-base\applications\msconfig\msconfig.exe 1
-base\applications\mstsc\mstsc.exe 1
-base\applications\network\arp\arp.exe 1
-base\applications\network\dwnl\dwnl.exe 1
-base\applications\network\route\route.exe 1
-base\applications\network\finger\finger.exe 1
-base\applications\network\ftp\ftp.exe 1
-base\applications\network\ipconfig\ipconfig.exe 1
-base\applications\network\netstat\netstat.exe 1
-base\applications\network\ping\ping.exe 1
-base\applications\network\telnet\telnet.exe 1
-base\applications\network\tracert\tracert.exe 1
-base\applications\network\whois\whois.exe 1
-base\applications\notepad\notepad.exe 1
-base\applications\regedit\regedit.exe 4
-base\applications\regedit\clb\clb.dll 1
-base\applications\sc\sc.exe 1
-base\applications\screensavers\3dtext\3dtext.scr 1
-base\applications\screensavers\logon\logon.scr 1
-base\applications\mscutils\servman\servman.exe 1
-base\applications\shutdown\shutdown.exe 1
-base\applications\sndvol32\sndvol32.exe 1
-base\applications\taskmgr\taskmgr.exe 1
-base\applications\winhlp32\winhlp32.exe 1
-base\applications\wordpad\wordpad.exe 1
-
-base\services\dhcp\dhcp.exe 1
-base\services\eventlog\eventlog.exe 1
-base\services\rpcss\rpcss.exe 1
-base\services\tcpsvcs\tcpsvcs.exe 1
-base\services\tcpsvcs\quotes 5
-base\services\umpnpmgr\umpnpmgr.exe 1
-base\services\audiosrv\audiosrv.exe 1
-
-base\setup\setup\setup.exe 1
-base\setup\vmwinst\vmwinst.exe 1
-
-base\shell\cmd\cmd.exe 1
-base\shell\explorer\explorer.exe 4
-base\shell\explorer\explorer-cfg-template.xml 4
-base\shell\explorer\notifyhook\notifyhook.dll 1
-base\shell\explorer-new\explorer_new.exe 4 optional
-
-base\system\autochk\autochk.exe 1
-base\system\format\format.exe 1
-base\system\lsass\lsass.exe 1
-base\system\msiexec\msiexec.exe 1
-base\system\regsvr32\regsvr32.exe 1
-base\system\rundll32\rundll32.exe 1
-base\system\services\services.exe 1
-base\system\userinit\userinit.exe 1
-base\system\winlogon\winlogon.exe 1
-base\system\expand\expand.exe 1
-base\system\smss\smss.exe 1
+;base\applications\cacls\cacls.exe 1
+;base\applications\calc\calc.exe 1
+;base\applications\charmap\charmap.exe 1
+;base\applications\cmdutils\dbgprint\dbgprint.exe 1
+;base\applications\cmdutils\doskey\doskey.exe 1
+;base\applications\cmdutils\find\find.exe 1
+;base\applications\cmdutils\hostname\hostname.exe 1
+;base\applications\cmdutils\more\more.exe 1
+;base\applications\cmdutils\xcopy\xcopy.exe 1
+;base\applications\control\control.exe 1
+;base\applications\mscutils\devmgmt\devmgmt.exe 1
+;base\applications\mscutils\eventvwr\eventvwr.exe 1
+;base\applications\games\solitaire\sol.exe 1
+;base\applications\games\winemine\winemine.exe 1
+;base\applications\hh\hh.exe 1
+;base\applications\kbswitch\kbswitch.exe 1
+;base\applications\kbswitch\kbsdll\kbsdll.dll 1
+;base\applications\logoff\logoff.exe 1
+;base\applications\msconfig\msconfig.exe 1
+;base\applications\mstsc\mstsc.exe 1
+;base\applications\network\arp\arp.exe 1
+;base\applications\network\dwnl\dwnl.exe 1
+;base\applications\network\route\route.exe 1
+;base\applications\network\finger\finger.exe 1
+;base\applications\network\ftp\ftp.exe 1
+;base\applications\network\ipconfig\ipconfig.exe 1
+;base\applications\network\netstat\netstat.exe 1
+;base\applications\network\ping\ping.exe 1
+;base\applications\network\telnet\telnet.exe 1
+;base\applications\network\tracert\tracert.exe 1
+;base\applications\network\whois\whois.exe 1
+;base\applications\notepad\notepad.exe 1
+;base\applications\regedit\regedit.exe 4
+;base\applications\regedit\clb\clb.dll 1
+;base\applications\sc\sc.exe 1
+;base\applications\screensavers\3dtext\3dtext.scr 1
+;base\applications\screensavers\logon\logon.scr 1
+;base\applications\mscutils\servman\servman.exe 1
+;base\applications\shutdown\shutdown.exe 1
+;base\applications\sndvol32\sndvol32.exe 1
+;base\applications\taskmgr\taskmgr.exe 1
+;base\applications\winhlp32\winhlp32.exe 1
+;base\applications\wordpad\wordpad.exe 1
+
+;base\services\dhcp\dhcp.exe 1
+;base\services\eventlog\eventlog.exe 1
+;base\services\rpcss\rpcss.exe 1
+;base\services\tcpsvcs\tcpsvcs.exe 1
+;base\services\tcpsvcs\quotes 5
+;base\services\umpnpmgr\umpnpmgr.exe 1
+;base\services\audiosrv\audiosrv.exe 1
+
+;base\setup\setup\setup.exe 1
+;base\setup\vmwinst\vmwinst.exe 1
+
+;base\shell\cmd\cmd.exe 1
+;base\shell\explorer\explorer.exe 4
+;base\shell\explorer\explorer-cfg-template.xml 4
+;base\shell\explorer\notifyhook\notifyhook.dll 1
+;base\shell\explorer-new\explorer_new.exe 4 optional
+
+;base\system\autochk\autochk.exe 1
+;base\system\format\format.exe 1
+;base\system\lsass\lsass.exe 1
+;base\system\msiexec\msiexec.exe 1
+;base\system\regsvr32\regsvr32.exe 1
+;base\system\rundll32\rundll32.exe 1
+;base\system\services\services.exe 1
+;base\system\userinit\userinit.exe 1
+;base\system\winlogon\winlogon.exe 1
+;base\system\expand\expand.exe 1
+;base\system\smss\smss.exe 1
; Dynamic Link Libraries
-dll\3rdparty\freetype\freetype.dll 1
-dll\3rdparty\mesa32\mesa32.dll 1
-dll\3rdparty\dxtn\dxtn.dll 1 optional
-
-dll\cpl\access\access.cpl 1
-dll\cpl\appwiz\appwiz.cpl 1
-dll\cpl\console\console.dll 1
-dll\cpl\desk\desk.cpl 1
-dll\cpl\intl\intl.cpl 1
-dll\cpl\main\main.cpl 1
-dll\cpl\mmsys\mmsys.cpl 1
-dll\cpl\ncpa\ncpa.cpl 1
-dll\cpl\powercfg\powercfg.cpl 1
-dll\cpl\sysdm\sysdm.cpl 1
-dll\cpl\timedate\timedate.cpl 1
-dll\cpl\input\input.dll 1
-dll\cpl\joy\joy.cpl 1
-
-dll\directx\dinput\dinput.dll 1
-dll\directx\dinput8\dinput8.dll 1
-dll\directx\dplay\dplay.dll 1
-dll\directx\dplayx\dplayx.dll 1
-dll\directx\dsound\dsound.dll 1
-dll\directx\dxdiagn\dxdiagn.dll 1
-dll\directx\ddraw\ddraw.dll 1
-dll\directx\d3d8thk\d3d8thk.dll 1
-dll\directx\devenum\devenum.dll 1
-dll\directx\ksproxy\ksproxy.ax 1
-dll\directx\ksuser\ksuser.dll 1
-dll\directx\msdmo\msdmo.dll 1
-dll\directx\quartz\quartz.dll 1
-dll\directx\qedit\qedit.dll 1
-dll\directx\wine\d3d8\d3d8.dll 1
-dll\directx\wine\wined3d\wined3d.dll 1
-dll\directx\wine\d3d9\d3d9.dll 1
-
-dll\keyboard\kbda1\kbda1.dll 1
-dll\keyboard\kbda2\kbda2.dll 1
-dll\keyboard\kbda3\kbda3.dll 1
-dll\keyboard\kbdal\kbdal.dll 1
-dll\keyboard\kbdarme\kbdarme.dll 1
-dll\keyboard\kbdarmw\kbdarmw.dll 1
-dll\keyboard\kbdaze\kbdaze.dll 1
-dll\keyboard\kbdazel\kbdazel.dll 1
-dll\keyboard\kbdbgm\kbdbgm.dll 1
-dll\keyboard\kbdbgt\kbdbgt.dll 1
-dll\keyboard\kbdblr\kbdblr.dll 1
-dll\keyboard\kbdbr\kbdbr.dll 1
-dll\keyboard\kbdbga\kbdbga.dll 1
-dll\keyboard\kbdbe\kbdbe.dll 1
-dll\keyboard\kbdbur\kbdbur.dll 1
-dll\keyboard\kbdcan\kbdcan.dll 1
-dll\keyboard\kbdcr\kbdcr.dll 1
-dll\keyboard\kbdcz1\kbdcz1.dll 1
-dll\keyboard\kbdda\kbdda.dll 1
-dll\keyboard\kbddv\kbddv.dll 1
-dll\keyboard\kbdes\kbdes.dll 1
-dll\keyboard\kbdest\kbdest.dll 1
-dll\keyboard\kbdfc\kbdfc.dll 1
-dll\keyboard\kbdfi\kbdfi.dll 1
-dll\keyboard\kbdfr\kbdfr.dll 1
-dll\keyboard\kbdgeo\kbdgeo.dll 1
-dll\keyboard\kbdgerg\kbdgerg.dll 1
-dll\keyboard\kbdgneo\kbdgneo.dll 1
-dll\keyboard\kbdgrist\kbdgrist.dll 1
-dll\keyboard\kbdgr\kbdgr.dll 1
-dll\keyboard\kbdhe\kbdhe.dll 1
-dll\keyboard\kbdheb\kbdheb.dll 1
-dll\keyboard\kbdhu\kbdhu.dll 1
-dll\keyboard\kbdic\kbdic.dll 1
-dll\keyboard\kbdinasa\kbdinasa.dll 1
-dll\keyboard\kbdinben\kbdinben.dll 1
-dll\keyboard\kbdindev\kbdindev.dll 1
-dll\keyboard\kbdinguj\kbdinguj.dll 1
-dll\keyboard\kbdinmal\kbdinmal.dll 1
-dll\keyboard\kbdir\kbdir.dll 1
-dll\keyboard\kbdit\kbdit.dll 1
-dll\keyboard\kbdja\kbdja.dll 1
-dll\keyboard\kbdkaz\kbdkaz.dll 1
-dll\keyboard\kbdla\kbdla.dll 1
-dll\keyboard\kbdlt\kbdlt.dll 1
-dll\keyboard\kbdlv\kbdlv.dll 1
-dll\keyboard\kbdmac\kbdmac.dll 1
-dll\keyboard\kbdne\kbdne.dll 1
-dll\keyboard\kbdno\kbdno.dll 1
-dll\keyboard\kbdpl1\kbdpl1.dll 1
-dll\keyboard\kbdpo\kbdpo.dll 1
-dll\keyboard\kbdro\kbdro.dll 1
-dll\keyboard\kbdru\kbdru.dll 1
-dll\keyboard\kbdru1\kbdru1.dll 1
-dll\keyboard\kbdsg\kbdsg.dll 1
-dll\keyboard\kbdsk\kbdsk.dll 1
-dll\keyboard\kbdsk1\kbdsk1.dll 1
-dll\keyboard\kbdsw\kbdsw.dll 1
-dll\keyboard\kbdtat\kbdtat.dll 1
-dll\keyboard\kbdth0\kbdth0.dll 1
-dll\keyboard\kbdth1\kbdth1.dll 1
-dll\keyboard\kbdth2\kbdth2.dll 1
-dll\keyboard\kbdth3\kbdth3.dll 1
-dll\keyboard\kbdtuf\kbdtuf.dll 1
-dll\keyboard\kbdtuq\kbdtuq.dll 1
-dll\keyboard\kbduk\kbduk.dll 1
-dll\keyboard\kbdur\kbdur.dll 1
-dll\keyboard\kbdurs\kbdurs.dll 1
-dll\keyboard\kbdus\kbdus.dll 1
-dll\keyboard\kbdusa\kbdusa.dll 1
-dll\keyboard\kbdusl\kbdusl.dll 1
-dll\keyboard\kbdusr\kbdusr.dll 1
-dll\keyboard\kbdusx\kbdusx.dll 1
-dll\keyboard\kbduzb\kbduzb.dll 1
-dll\keyboard\kbdvntc\kbdvntc.dll 1
-dll\keyboard\kbdycc\kbdycc.dll 1
-dll\keyboard\kbdycl\kbdycl.dll 1
-dll\keyboard\kbdko\kbdko.dll 1
-
-dll\ntdll\ntdll.dll 1
-
-dll\win32\acledit\acledit.dll 1
-dll\win32\aclui\aclui.dll 1
-dll\win32\advapi32\advapi32.dll 1
-dll\win32\advpack\advpack.dll 1
-dll\win32\atl\atl.dll 1
-dll\win32\authz\authz.dll 1
-dll\win32\avifil32\avifil32.dll 1
-dll\win32\beepmidi\beepmidi.dll 1
-dll\win32\browseui\browseui.dll 1
-dll\win32\cabinet\cabinet.dll 1
-dll\win32\cards\cards.dll 1
-dll\win32\cfgmgr32\cfgmgr32.dll 1
-dll\win32\clusapi\clusapi.dll 1
-dll\win32\comcat\comcat.dll 1
-dll\win32\comctl32\comctl32.dll 1
-dll\win32\comdlg32\comdlg32.dll 1
-dll\win32\compstui\compstui.dll 1
-dll\win32\crtdll\crtdll.dll 1
-dll\win32\crypt32\crypt32.dll 1
-dll\win32\cryptdll\cryptdll.dll 1
-dll\win32\cryptnet\cryptnet.dll 1
-dll\win32\cryptui\cryptui.dll 1
-dll\win32\dbghelp\dbghelp.dll 1
-dll\win32\dciman32\dciman32.dll 1
-dll\win32\devmgr\devmgr.dll 1
-dll\win32\dhcpcsvc\dhcpcsvc.dll 1
-dll\win32\dnsapi\dnsapi.dll 1
-dll\win32\fmifs\fmifs.dll 1
-dll\win32\gdi32\gdi32.dll 1
-dll\win32\gdiplus\gdiplus.dll 1
-dll\win32\glu32\glu32.dll 1
-dll\win32\hhctrl.ocx\hhctrl.ocx 1
-dll\win32\hid\hid.dll 1
-dll\win32\hlink\hlink.dll 1
-dll\win32\icmp\icmp.dll 1
-dll\win32\imagehlp\imagehlp.dll 1
-dll\win32\imm32\imm32.dll 1
-dll\win32\inetcomm\inetcomm.dll 1
-dll\win32\inetmib1\inetmib1.dll 1
-dll\win32\iphlpapi\iphlpapi.dll 1
-dll\win32\kernel32\kernel32.dll 1
-dll\win32\lsasrv\lsasrv.dll 1
-dll\win32\lz32\lz32.dll 1
-dll\win32\mapi32\mapi32.dll 1
-dll\win32\mlang\mlang.dll 1
-dll\win32\mmdrv\mmdrv.dll 1
-dll\win32\modemui\modemui.dll 1
-dll\win32\mpr\mpr.dll 1
-dll\win32\msacm32\msacm32.dll 1
-dll\win32\msafd\msafd.dll 1
-dll\win32\msgina\msgina.dll 1
-dll\win32\mshtml\mshtml.dll 1
-dll\win32\msi\msi.dll 1
-dll\win32\msimg32\msimg32.dll 1
-dll\win32\msvcrt\msvcrt.dll 1
-dll\win32\msvcrt20\msvcrt20.dll 1
-dll\win32\msvcrt40\msvcrt40.dll 1
-dll\win32\msvfw32\msvfw32.dll 1
-dll\win32\mswsock\mswsock.dll 1
-dll\win32\msxml3\msxml3.dll 1
-dll\win32\nddeapi\nddeapi.dll 1
-dll\win32\netapi32\netapi32.dll 1
-dll\win32\netcfgx\netcfgx.dll 1
-dll\win32\netid\netid.dll 1
-dll\win32\newdev\newdev.dll 1
-dll\win32\ntdsapi\ntdsapi.dll 1
-dll\win32\ntmarta\ntmarta.dll 1
-dll\win32\objsel\objsel.dll 1
-dll\win32\odbccp32\odbccp32.dll 1
-dll\win32\ole32\ole32.dll 1
-dll\win32\oleacc\oleacc.dll 1
-dll\win32\oleaut32\oleaut32.dll 1
-dll\win32\oledlg\oledlg.dll 1
-dll\win32\olepro32\olepro32.dll 1
-dll\win32\opengl32\opengl32.dll 1
-dll\win32\pdh\pdh.dll 1
-dll\win32\powrprof\powrprof.dll 1
-dll\win32\printui\printui.dll 1
-dll\win32\psapi\psapi.dll 1
-dll\win32\rasapi32\rasapi32.dll 1
-dll\win32\rasdlg\rasdlg.dll 1
-dll\win32\rasman\rasman.dll 1
-dll\win32\riched20\riched20.dll 1
-dll\win32\riched32\riched32.dll 1
-dll\win32\rpcrt4\rpcrt4.dll 1
-dll\win32\rsabase\rsabase.dll 1
-dll\win32\rsaenh\rsaenh.dll 1
-dll\win32\samlib\samlib.dll 1
-dll\win32\samsrv\samsrv.dll 1
-dll\win32\schannel\schannel.dll 1
-dll\win32\secur32\secur32.dll 1
-dll\win32\security\security.dll 1
-dll\win32\sensapi\sensapi.dll 1
-dll\win32\serialui\serialui.dll 1
-dll\win32\setupapi\setupapi.dll 1
-dll\win32\shdocvw\shdocvw.dll 1
-dll\win32\shell32\shell32.dll 1
-dll\win32\shfolder\shfolder.dll 1
-dll\win32\shimgvw\shimgvw.dll 1
-dll\win32\shlwapi\shlwapi.dll 1
-dll\win32\smdll\smdll.dll 1
-dll\win32\snmpapi\snmpapi.dll 1
-dll\win32\stdole2.tlb\stdole2.tlb 1
-dll\win32\syssetup\syssetup.dll 1
-dll\win32\tapi32\tapi32.dll 1
-dll\win32\tapiui\tapiui.dll 1
-dll\win32\twain_32\twain_32.dll 1
-dll\win32\uext2\uext2.dll 1
-dll\win32\ufat\ufat.dll 1
-dll\win32\ufatx\ufatx.dll 1 optional
-dll\win32\untfs\untfs.dll 1
-dll\win32\urlmon\urlmon.dll 1
-dll\win32\user32\user32.dll 1
-dll\win32\userenv\userenv.dll 1
-dll\win32\usp10\usp10.dll 1
-dll\win32\uxtheme\uxtheme.dll 1
-dll\win32\vdmdbg\vdmdbg.dll 1
-dll\win32\version\version.dll 1
-dll\win32\winfax\winfax.dll 1
-dll\win32\winhttp\winhttp.dll 1
-dll\win32\wininet\wininet.dll 1
-dll\win32\winmm\winmm.dll 1
-dll\win32\winspool\winspool.drv 1
-dll\win32\winsta\winsta.dll 1
-dll\win32\wintrust\wintrust.dll 1
-dll\win32\wldap32\wldap32.dll 1
-dll\win32\ws2_32\ws2_32.dll 1
-dll\win32\ws2help\ws2help.dll 1
-dll\win32\wshirda\wshirda.dll 1
-dll\win32\wshtcpip\wshtcpip.dll 1
-dll\win32\wsock32\wsock32.dll 1
-dll\win32\wtsapi32\wtsapi32.dll 1
-dll\win32\winmm\midimap\midimap.dll 1
-dll\win32\winmm\wavemap\msacm32.drv 1 optional
+;dll\3rdparty\freetype\freetype.dll 1
+;dll\3rdparty\mesa32\mesa32.dll 1
+;dll\3rdparty\dxtn\dxtn.dll 1 optional
+
+;dll\cpl\access\access.cpl 1
+;dll\cpl\appwiz\appwiz.cpl 1
+;dll\cpl\console\console.dll 1
+;dll\cpl\desk\desk.cpl 1
+;dll\cpl\intl\intl.cpl 1
+;dll\cpl\main\main.cpl 1
+;dll\cpl\mmsys\mmsys.cpl 1
+;dll\cpl\ncpa\ncpa.cpl 1
+;dll\cpl\powercfg\powercfg.cpl 1
+;dll\cpl\sysdm\sysdm.cpl 1
+;dll\cpl\timedate\timedate.cpl 1
+;dll\cpl\input\input.dll 1
+;dll\cpl\joy\joy.cpl 1
+
+;dll\directx\dinput\dinput.dll 1
+;dll\directx\dinput8\dinput8.dll 1
+;dll\directx\dplay\dplay.dll 1
+;dll\directx\dplayx\dplayx.dll 1
+;dll\directx\dsound\dsound.dll 1
+;dll\directx\dxdiagn\dxdiagn.dll 1
+;dll\directx\ddraw\ddraw.dll 1
+;dll\directx\d3d8thk\d3d8thk.dll 1
+;dll\directx\devenum\devenum.dll 1
+;dll\directx\ksproxy\ksproxy.ax 1
+;dll\directx\ksuser\ksuser.dll 1
+;dll\directx\msdmo\msdmo.dll 1
+;dll\directx\quartz\quartz.dll 1
+;dll\directx\qedit\qedit.dll 1
+;dll\directx\wine\d3d8\d3d8.dll 1
+;dll\directx\wine\wined3d\wined3d.dll 1
+;dll\directx\wine\d3d9\d3d9.dll 1
+
+;dll\keyboard\kbda1\kbda1.dll 1
+;dll\keyboard\kbda2\kbda2.dll 1
+;dll\keyboard\kbda3\kbda3.dll 1
+;dll\keyboard\kbdal\kbdal.dll 1
+;dll\keyboard\kbdarme\kbdarme.dll 1
+;dll\keyboard\kbdarmw\kbdarmw.dll 1
+;dll\keyboard\kbdaze\kbdaze.dll 1
+;dll\keyboard\kbdazel\kbdazel.dll 1
+;dll\keyboard\kbdbgm\kbdbgm.dll 1
+;dll\keyboard\kbdbgt\kbdbgt.dll 1
+;dll\keyboard\kbdblr\kbdblr.dll 1
+;dll\keyboard\kbdbr\kbdbr.dll 1
+;dll\keyboard\kbdbga\kbdbga.dll 1
+;dll\keyboard\kbdbe\kbdbe.dll 1
+;dll\keyboard\kbdbur\kbdbur.dll 1
+;dll\keyboard\kbdcan\kbdcan.dll 1
+;dll\keyboard\kbdcr\kbdcr.dll 1
+;dll\keyboard\kbdcz1\kbdcz1.dll 1
+;dll\keyboard\kbdda\kbdda.dll 1
+;dll\keyboard\kbddv\kbddv.dll 1
+;dll\keyboard\kbdes\kbdes.dll 1
+;dll\keyboard\kbdest\kbdest.dll 1
+;dll\keyboard\kbdfc\kbdfc.dll 1
+;dll\keyboard\kbdfi\kbdfi.dll 1
+;dll\keyboard\kbdfr\kbdfr.dll 1
+;dll\keyboard\kbdgeo\kbdgeo.dll 1
+;dll\keyboard\kbdgerg\kbdgerg.dll 1
+;dll\keyboard\kbdgneo\kbdgneo.dll 1
+;dll\keyboard\kbdgrist\kbdgrist.dll 1
+;dll\keyboard\kbdgr\kbdgr.dll 1
+;dll\keyboard\kbdhe\kbdhe.dll 1
+;dll\keyboard\kbdheb\kbdheb.dll 1
+;dll\keyboard\kbdhu\kbdhu.dll 1
+;dll\keyboard\kbdic\kbdic.dll 1
+;dll\keyboard\kbdinasa\kbdinasa.dll 1
+;dll\keyboard\kbdinben\kbdinben.dll 1
+;dll\keyboard\kbdindev\kbdindev.dll 1
+;dll\keyboard\kbdinguj\kbdinguj.dll 1
+;dll\keyboard\kbdinmal\kbdinmal.dll 1
+;dll\keyboard\kbdir\kbdir.dll 1
+;dll\keyboard\kbdit\kbdit.dll 1
+;dll\keyboard\kbdja\kbdja.dll 1
+;dll\keyboard\kbdkaz\kbdkaz.dll 1
+;dll\keyboard\kbdla\kbdla.dll 1
+;dll\keyboard\kbdlt\kbdlt.dll 1
+;dll\keyboard\kbdlv\kbdlv.dll 1
+;dll\keyboard\kbdmac\kbdmac.dll 1
+;dll\keyboard\kbdne\kbdne.dll 1
+;dll\keyboard\kbdno\kbdno.dll 1
+;dll\keyboard\kbdpl1\kbdpl1.dll 1
+;dll\keyboard\kbdpo\kbdpo.dll 1
+;dll\keyboard\kbdro\kbdro.dll 1
+;dll\keyboard\kbdru\kbdru.dll 1
+;dll\keyboard\kbdru1\kbdru1.dll 1
+;dll\keyboard\kbdsg\kbdsg.dll 1
+;dll\keyboard\kbdsk\kbdsk.dll 1
+;dll\keyboard\kbdsk1\kbdsk1.dll 1
+;dll\keyboard\kbdsw\kbdsw.dll 1
+;dll\keyboard\kbdtat\kbdtat.dll 1
+;dll\keyboard\kbdth0\kbdth0.dll 1
+;dll\keyboard\kbdth1\kbdth1.dll 1
+;dll\keyboard\kbdth2\kbdth2.dll 1
+;dll\keyboard\kbdth3\kbdth3.dll 1
+;dll\keyboard\kbdtuf\kbdtuf.dll 1
+;dll\keyboard\kbdtuq\kbdtuq.dll 1
+;dll\keyboard\kbduk\kbduk.dll 1
+;dll\keyboard\kbdur\kbdur.dll 1
+;dll\keyboard\kbdurs\kbdurs.dll 1
+;dll\keyboard\kbdus\kbdus.dll 1
+;dll\keyboard\kbdusa\kbdusa.dll 1
+;dll\keyboard\kbdusl\kbdusl.dll 1
+;dll\keyboard\kbdusr\kbdusr.dll 1
+;dll\keyboard\kbdusx\kbdusx.dll 1
+;dll\keyboard\kbduzb\kbduzb.dll 1
+;dll\keyboard\kbdvntc\kbdvntc.dll 1
+;dll\keyboard\kbdycc\kbdycc.dll 1
+;dll\keyboard\kbdycl\kbdycl.dll 1
+;dll\keyboard\kbdko\kbdko.dll 1
+
+;dll\nt;dll\ntdll.dll 1
+
+;dll\win32\acledit\acledit.dll 1
+;dll\win32\aclui\aclui.dll 1
+;dll\win32\advapi32\advapi32.dll 1
+;dll\win32\advpack\advpack.dll 1
+;dll\win32\atl\atl.dll 1
+;dll\win32\authz\authz.dll 1
+;dll\win32\avifil32\avifil32.dll 1
+;dll\win32\beepmidi\beepmidi.dll 1
+;dll\win32\browseui\browseui.dll 1
+;dll\win32\cabinet\cabinet.dll 1
+;dll\win32\cards\cards.dll 1
+;dll\win32\cfgmgr32\cfgmgr32.dll 1
+;dll\win32\clusapi\clusapi.dll 1
+;dll\win32\comcat\comcat.dll 1
+;dll\win32\comctl32\comctl32.dll 1
+;dll\win32\comdlg32\comdlg32.dll 1
+;dll\win32\compstui\compstui.dll 1
+;dll\win32\crtdll\crtdll.dll 1
+;dll\win32\crypt32\crypt32.dll 1
+;dll\win32\cryptdll\cryptdll.dll 1
+;dll\win32\cryptnet\cryptnet.dll 1
+;dll\win32\cryptui\cryptui.dll 1
+;dll\win32\dbghelp\dbghelp.dll 1
+;dll\win32\dciman32\dciman32.dll 1
+;dll\win32\devmgr\devmgr.dll 1
+;dll\win32\dhcpcsvc\dhcpcsvc.dll 1
+;dll\win32\dnsapi\dnsapi.dll 1
+;dll\win32\fmifs\fmifs.dll 1
+;dll\win32\gdi32\gdi32.dll 1
+;dll\win32\gdiplus\gdiplus.dll 1
+;dll\win32\glu32\glu32.dll 1
+;dll\win32\hhctrl.ocx\hhctrl.ocx 1
+;dll\win32\hid\hid.dll 1
+;dll\win32\hlink\hlink.dll 1
+;dll\win32\icmp\icmp.dll 1
+;dll\win32\imagehlp\imagehlp.dll 1
+;dll\win32\imm32\imm32.dll 1
+;dll\win32\inetcomm\inetcomm.dll 1
+;dll\win32\inetmib1\inetmib1.dll 1
+;dll\win32\iphlpapi\iphlpapi.dll 1
+;dll\win32\kernel32\kernel32.dll 1
+;dll\win32\lsasrv\lsasrv.dll 1
+;dll\win32\lz32\lz32.dll 1
+;dll\win32\mapi32\mapi32.dll 1
+;dll\win32\mlang\mlang.dll 1
+;dll\win32\mmdrv\mmdrv.dll 1
+;dll\win32\modemui\modemui.dll 1
+;dll\win32\mpr\mpr.dll 1
+;dll\win32\msacm32\msacm32.dll 1
+;dll\win32\msafd\msafd.dll 1
+;dll\win32\msgina\msgina.dll 1
+;dll\win32\mshtml\mshtml.dll 1
+;dll\win32\msi\msi.dll 1
+;dll\win32\msimg32\msimg32.dll 1
+;dll\win32\msvcrt\msvcrt.dll 1
+;dll\win32\msvcrt20\msvcrt20.dll 1
+;dll\win32\msvcrt40\msvcrt40.dll 1
+;dll\win32\msvfw32\msvfw32.dll 1
+;dll\win32\mswsock\mswsock.dll 1
+;dll\win32\msxml3\msxml3.dll 1
+;dll\win32\nddeapi\nddeapi.dll 1
+;dll\win32\netapi32\netapi32.dll 1
+;dll\win32\netcfgx\netcfgx.dll 1
+;dll\win32\netid\netid.dll 1
+;dll\win32\newdev\newdev.dll 1
+;dll\win32\ntdsapi\ntdsapi.dll 1
+;dll\win32\ntmarta\ntmarta.dll 1
+;dll\win32\objsel\objsel.dll 1
+;dll\win32\odbccp32\odbccp32.dll 1
+;dll\win32\ole32\ole32.dll 1
+;dll\win32\oleacc\oleacc.dll 1
+;dll\win32\oleaut32\oleaut32.dll 1
+;dll\win32\oledlg\oledlg.dll 1
+;dll\win32\olepro32\olepro32.dll 1
+;dll\win32\opengl32\opengl32.dll 1
+;dll\win32\pdh\pdh.dll 1
+;dll\win32\powrprof\powrprof.dll 1
+;dll\win32\printui\printui.dll 1
+;dll\win32\psapi\psapi.dll 1
+;dll\win32\rasapi32\rasapi32.dll 1
+;dll\win32\rasdlg\rasdlg.dll 1
+;dll\win32\rasman\rasman.dll 1
+;dll\win32\riched20\riched20.dll 1
+;dll\win32\riched32\riched32.dll 1
+;dll\win32\rpcrt4\rpcrt4.dll 1
+;dll\win32\rsabase\rsabase.dll 1
+;dll\win32\rsaenh\rsaenh.dll 1
+;dll\win32\samlib\samlib.dll 1
+;dll\win32\samsrv\samsrv.dll 1
+;dll\win32\schannel\schannel.dll 1
+;dll\win32\secur32\secur32.dll 1
+;dll\win32\security\security.dll 1
+;dll\win32\sensapi\sensapi.dll 1
+;dll\win32\serialui\serialui.dll 1
+;dll\win32\setupapi\setupapi.dll 1
+;dll\win32\shdocvw\shdocvw.dll 1
+;dll\win32\shell32\shell32.dll 1
+;dll\win32\shfolder\shfolder.dll 1
+;dll\win32\shimgvw\shimgvw.dll 1
+;dll\win32\shlwapi\shlwapi.dll 1
+;dll\win32\smdll\smdll.dll 1
+;dll\win32\snmpapi\snmpapi.dll 1
+;dll\win32\stdole2.tlb\stdole2.tlb 1
+;dll\win32\syssetup\syssetup.dll 1
+;dll\win32\tapi32\tapi32.dll 1
+;dll\win32\tapiui\tapiui.dll 1
+;dll\win32\twain_32\twain_32.dll 1
+;dll\win32\uext2\uext2.dll 1
+;dll\win32\ufat\ufat.dll 1
+;dll\win32\ufatx\ufatx.dll 1 optional
+;dll\win32\untfs\untfs.dll 1
+;dll\win32\urlmon\urlmon.dll 1
+;dll\win32\user32\user32.dll 1
+;dll\win32\userenv\userenv.dll 1
+;dll\win32\usp10\usp10.dll 1
+;dll\win32\uxtheme\uxtheme.dll 1
+;dll\win32\vdmdbg\vdmdbg.dll 1
+;dll\win32\version\version.dll 1
+;dll\win32\winfax\winfax.dll 1
+;dll\win32\winhttp\winhttp.dll 1
+;dll\win32\wininet\wininet.dll 1
+;dll\win32\winmm\winmm.dll 1
+;dll\win32\winspool\winspool.drv 1
+;dll\win32\winsta\winsta.dll 1
+;dll\win32\wintrust\wintrust.dll 1
+;dll\win32\wldap32\wldap32.dll 1
+;dll\win32\ws2_32\ws2_32.dll 1
+;dll\win32\ws2help\ws2help.dll 1
+;dll\win32\wshirda\wshirda.dll 1
+;dll\win32\wshtcpip\wshtcpip.dll 1
+;dll\win32\wsock32\wsock32.dll 1
+;dll\win32\wtsapi32\wtsapi32.dll 1
+;dll\win32\winmm\midimap\midimap.dll 1
+;dll\win32\winmm\wavemap\msacm32.drv 1 optional
; Shell Extensions
-dll\shellext\deskadp\deskadp.dll 1
-dll\shellext\deskmon\deskmon.dll 1
+;dll\shellext\deskadp\deskadp.dll 1
+;dll\shellext\deskmon\deskmon.dll 1
; Drivers
-drivers\base\bootvid\bootvid.dll 1
-drivers\base\beep\beep.sys 2
-drivers\base\null\null.sys 2
+;drivers\base\bootvid\bootvid.dll 1
+;drivers\base\beep\beep.sys 2
+;drivers\base\null\null.sys 2
-drivers\bus\isapnp\isapnp.sys 2
+;drivers\bus\isapnp\isapnp.sys 2
-drivers\directx\dxapi\dxapi.sys 2
-drivers\directx\dxg\dxg.sys 2
-drivers\directx\dxgthk\dxgthk.sys 2
+;drivers\directx\dxapi\dxapi.sys 2
+;drivers\directx\dxg\dxg.sys 2
+;drivers\directx\dxgthk\dxgthk.sys 2
-drivers\filesystems\fs_rec\fs_rec.sys 2
-drivers\filesystems\msfs\msfs.sys 2
-drivers\filesystems\mup\mup.sys 2
-drivers\filesystems\npfs\npfs.sys 2
+;drivers\filesystems\fs_rec\fs_rec.sys 2
+;drivers\filesystems\msfs\msfs.sys 2
+;drivers\filesystems\mup\mup.sys 2
+;drivers\filesystems\npfs\npfs.sys 2
-drivers\input\mouclass\mouclass.sys 2
-drivers\input\sermouse\sermouse.sys 2
+;drivers\input\mouclass\mouclass.sys 2
+;drivers\input\sermouse\sermouse.sys 2
-drivers\network\afd\afd.sys 2
-drivers\network\ndis\ndis.sys 2
-drivers\network\tcpip\tcpip.sys 2
-drivers\network\tdi\tdi.sys 2
-drivers\network\dd\ne2000\ne2000.sys 2
-drivers\network\dd\pcnet\pcnet.sys 2
+;drivers\network\afd\afd.sys 2
+;drivers\network\ndis\ndis.sys 2
+;drivers\network\tcpip\tcpip.sys 2
+;drivers\network\tdi\tdi.sys 2
+;drivers\network\dd\ne2000\ne2000.sys 2
+;drivers\network\dd\pcnet\pcnet.sys 2
-drivers\serial\serenum\serenum.sys 2
-drivers\serial\serial\serial.sys 2
+;drivers\serial\serenum\serenum.sys 2
+;drivers\serial\serial\serial.sys 2
-drivers\storage\ide\pciide\pciide.sys 2
-drivers\storage\ide\pciidex\pciidex.sys 2
+;drivers\storage\ide\pciide\pciide.sys 2
+;drivers\storage\ide\pciidex\pciidex.sys 2
-;drivers\usb\miniport\usbohci\usbohci.sys 2
-;drivers\usb\miniport\usbuhci\usbuhci.sys 2
-;drivers\usb\usbhub\usbhub.sys 2
-;drivers\usb\usbport\usbport.sys 2
-drivers\usb\nt4compat\usbdriver\usbdriver.sys 2
+;;drivers\usb\miniport\usbohci\usbohci.sys 2
+;;drivers\usb\miniport\usbuhci\usbuhci.sys 2
+;;drivers\usb\usbhub\usbhub.sys 2
+;;drivers\usb\usbport\usbport.sys 2
+;drivers\usb\nt4compat\usbdriver\usbdriver.sys 2
-drivers\video\displays\vga\vgaddi.dll 1
-drivers\video\displays\framebuf\framebuf.dll 1
-drivers\video\miniport\vga\vgamp.sys 2
-drivers\video\miniport\vbe\vbemp.sys 2
-drivers\video\videoprt\videoprt.sys 2
+;drivers\video\displays\vga\vgaddi.dll 1
+;drivers\video\displays\framebuf\framebuf.dll 1
+;drivers\video\miniport\vga\vgamp.sys 2
+;drivers\video\miniport\vbe\vbemp.sys 2
+;drivers\video\videoprt\videoprt.sys 2
-drivers\wmi\wmilib.sys 2
+;drivers\wmi\wmilib.sys 2
; Media
-media\fonts\DejaVuSans.ttf 3
-media\fonts\DejaVuSans-Bold.ttf 3
-media\fonts\DejaVuSans-BoldOblique.ttf 3
-media\fonts\DejaVuSansCondensed.ttf 3
-media\fonts\DejaVuSansCondensed-Bold.ttf 3
-media\fonts\DejaVuSansCondensed-BoldOblique.ttf 3
-media\fonts\DejaVuSansCondensed-Oblique.ttf 3
-media\fonts\DejaVuSans-ExtraLight.ttf 3
-media\fonts\DejaVuSansMono.ttf 3
-media\fonts\DejaVuSansMono-Bold.ttf 3
-media\fonts\DejaVuSansMono-BoldOblique.ttf 3
-media\fonts\DejaVuSansMono-Oblique.ttf 3
-media\fonts\DejaVuSans-Oblique.ttf 3
-media\fonts\DejaVuSerif.ttf 3
-media\fonts\DejaVuSerif-Bold.ttf 3
-media\fonts\DejaVuSerif-BoldItalic.ttf 3
-media\fonts\DejaVuSerifCondensed.ttf 3
-media\fonts\DejaVuSerifCondensed-Bold.ttf 3
-media\fonts\DejaVuSerifCondensed-BoldItalic.ttf 3
-media\fonts\DejaVuSerifCondensed-Italic.ttf 3
-media\fonts\DejaVuSerif-Italic.ttf 3
-
-media\fonts\LiberationMono-Bold.ttf 3
-media\fonts\LiberationMono-BoldItalic.ttf 3
-media\fonts\LiberationMono-Italic.ttf 3
-media\fonts\LiberationMono-Regular.ttf 3
-media\fonts\LiberationSans-Bold.ttf 3
-media\fonts\LiberationSans-BoldItalic.ttf 3
-media\fonts\LiberationSans-Italic.ttf 3
-media\fonts\LiberationSans-Regular.ttf 3
-media\fonts\LiberationSerif-Bold.ttf 3
-media\fonts\LiberationSerif-BoldItalic.ttf 3
-media\fonts\LiberationSerif-Italic.ttf 3
-media\fonts\LiberationSerif-Regular.ttf 3
-
-media\fonts\tahoma.ttf 3
-media\fonts\tahomabd.ttf 3
-
-media\fonts\c0419bt_.ttf 3
-media\fonts\c0582bt_.ttf 3
-media\fonts\c0583bt_.ttf 3
-media\fonts\c0611bt_.ttf 3
-media\fonts\c0632bt_.ttf 3
-media\fonts\c0633bt_.ttf 3
-media\fonts\c0648bt_.ttf 3
-media\fonts\c0649bt_.ttf 3
-media\fonts\courbi.ttf 3
-media\fonts\courb.ttf 3
-media\fonts\cour.ttf 3
-media\fonts\helb____.ttf 3
-media\fonts\Marlett.ttf 3
-media\fonts\timr____.ttf 3
-media\fonts\UTBI____.ttf 3
-media\fonts\UTB_____.ttf 3
-media\fonts\UTI_____.ttf 3
-media\fonts\UTRG____.ttf 3
-media\nls\c_037.nls 1
-media\nls\c_500.nls 1
-media\nls\c_737.nls 1
-media\nls\c_775.nls 1
-media\nls\c_850.nls 1
-media\nls\c_852.nls 1
-media\nls\c_855.nls 1
-media\nls\c_856.nls 1
-media\nls\c_857.nls 1
-media\nls\c_860.nls 1
-media\nls\c_861.nls 1
-media\nls\c_862.nls 1
-media\nls\c_863.nls 1
-media\nls\c_864.nls 1
-media\nls\c_865.nls 1
-media\nls\c_866.nls 1
-media\nls\c_869.nls 1
-media\nls\c_874.nls 1
-media\nls\c_875.nls 1
-media\nls\c_878.nls 1
-media\nls\c_932.nls 1
-media\nls\c_936.nls 1
-media\nls\c_949.nls 1
-media\nls\c_950.nls 1
-media\nls\c_1006.nls 1
-media\nls\c_1026.nls 1
-media\nls\c_1250.nls 1
-media\nls\c_1251.nls 1
-media\nls\c_1253.nls 1
-media\nls\c_1254.nls 1
-media\nls\c_1255.nls 1
-media\nls\c_1256.nls 1
-media\nls\c_1257.nls 1
-media\nls\c_1258.nls 1
-media\nls\c_10000.nls 1
-media\nls\c_10006.nls 1
-media\nls\c_10007.nls 1
-media\nls\c_10029.nls 1
-media\nls\c_10079.nls 1
-media\nls\c_10081.nls 1
-media\nls\c_20866.nls 1
-media\nls\c_28591.nls 1
-media\nls\c_28592.nls 1
-media\nls\c_28593.nls 1
-media\nls\c_28594.nls 1
-media\nls\c_28595.nls 1
-media\nls\c_28596.nls 1
-media\nls\c_28597.nls 1
-media\nls\c_28598.nls 1
-media\nls\c_28599.nls 1
-media\drivers\etc\services 5
-media\inf\acpi.inf 6
-media\inf\cdrom.inf 6
-media\inf\display.inf 6
-media\inf\font.inf 6
-media\inf\hdc.inf 6
-media\inf\intl.inf 6
-media\inf\layout.inf 6
-media\inf\machine.inf 6
-media\inf\msmouse.inf 6
-media\inf\keyboard.inf 6
-media\inf\NET_NIC.inf 6
-media\inf\netamd.inf 6
-media\inf\netisa.inf 6
-media\inf\netrtpnt.inf 6
-media\inf\nettcpip.inf 6
-media\inf\ports.inf 6
-media\inf\scsi.inf 6
-media\inf\syssetup.inf 6
-media\inf\usbport.inf 6
-media\inf\usb.inf 6
-media\inf\usbstor.inf 6
-media\inf\xboxdisp.inf 6
+;media\fonts\DejaVuSans.ttf 3
+;media\fonts\DejaVuSans-Bold.ttf 3
+;media\fonts\DejaVuSans-BoldOblique.ttf 3
+;media\fonts\DejaVuSansCondensed.ttf 3
+;media\fonts\DejaVuSansCondensed-Bold.ttf 3
+;media\fonts\DejaVuSansCondensed-BoldOblique.ttf 3
+;media\fonts\DejaVuSansCondensed-Oblique.ttf 3
+;media\fonts\DejaVuSans-ExtraLight.ttf 3
+;media\fonts\DejaVuSansMono.ttf 3
+;media\fonts\DejaVuSansMono-Bold.ttf 3
+;media\fonts\DejaVuSansMono-BoldOblique.ttf 3
+;media\fonts\DejaVuSansMono-Oblique.ttf 3
+;media\fonts\DejaVuSans-Oblique.ttf 3
+;media\fonts\DejaVuSerif.ttf 3
+;media\fonts\DejaVuSerif-Bold.ttf 3
+;media\fonts\DejaVuSerif-BoldItalic.ttf 3
+;media\fonts\DejaVuSerifCondensed.ttf 3
+;media\fonts\DejaVuSerifCondensed-Bold.ttf 3
+;media\fonts\DejaVuSerifCondensed-BoldItalic.ttf 3
+;media\fonts\DejaVuSerifCondensed-Italic.ttf 3
+;media\fonts\DejaVuSerif-Italic.ttf 3
+
+;media\fonts\LiberationMono-Bold.ttf 3
+;media\fonts\LiberationMono-BoldItalic.ttf 3
+;media\fonts\LiberationMono-Italic.ttf 3
+;media\fonts\LiberationMono-Regular.ttf 3
+;media\fonts\LiberationSans-Bold.ttf 3
+;media\fonts\LiberationSans-BoldItalic.ttf 3
+;media\fonts\LiberationSans-Italic.ttf 3
+;media\fonts\LiberationSans-Regular.ttf 3
+;media\fonts\LiberationSerif-Bold.ttf 3
+;media\fonts\LiberationSerif-BoldItalic.ttf 3
+;media\fonts\LiberationSerif-Italic.ttf 3
+;media\fonts\LiberationSerif-Regular.ttf 3
+
+;media\fonts\tahoma.ttf 3
+;media\fonts\tahomabd.ttf 3
+
+;media\fonts\c0419bt_.ttf 3
+;media\fonts\c0582bt_.ttf 3
+;media\fonts\c0583bt_.ttf 3
+;media\fonts\c0611bt_.ttf 3
+;media\fonts\c0632bt_.ttf 3
+;media\fonts\c0633bt_.ttf 3
+;media\fonts\c0648bt_.ttf 3
+;media\fonts\c0649bt_.ttf 3
+;media\fonts\courbi.ttf 3
+;media\fonts\courb.ttf 3
+;media\fonts\cour.ttf 3
+;media\fonts\helb____.ttf 3
+;media\fonts\Marlett.ttf 3
+;media\fonts\timr____.ttf 3
+;media\fonts\UTBI____.ttf 3
+;media\fonts\UTB_____.ttf 3
+;media\fonts\UTI_____.ttf 3
+;media\fonts\UTRG____.ttf 3
+;media\nls\c_037.nls 1
+;media\nls\c_500.nls 1
+;media\nls\c_737.nls 1
+;media\nls\c_775.nls 1
+;media\nls\c_850.nls 1
+;media\nls\c_852.nls 1
+;media\nls\c_855.nls 1
+;media\nls\c_856.nls 1
+;media\nls\c_857.nls 1
+;media\nls\c_860.nls 1
+;media\nls\c_861.nls 1
+;media\nls\c_862.nls 1
+;media\nls\c_863.nls 1
+;media\nls\c_864.nls 1
+;media\nls\c_865.nls 1
+;media\nls\c_866.nls 1
+;media\nls\c_869.nls 1
+;media\nls\c_874.nls 1
+;media\nls\c_875.nls 1
+;media\nls\c_878.nls 1
+;media\nls\c_932.nls 1
+;media\nls\c_936.nls 1
+;media\nls\c_949.nls 1
+;media\nls\c_950.nls 1
+;media\nls\c_1006.nls 1
+;media\nls\c_1026.nls 1
+;media\nls\c_1250.nls 1
+;media\nls\c_1251.nls 1
+;media\nls\c_1253.nls 1
+;media\nls\c_1254.nls 1
+;media\nls\c_1255.nls 1
+;media\nls\c_1256.nls 1
+;media\nls\c_1257.nls 1
+;media\nls\c_1258.nls 1
+;media\nls\c_10000.nls 1
+;media\nls\c_10006.nls 1
+;media\nls\c_10007.nls 1
+;media\nls\c_10029.nls 1
+;media\nls\c_10079.nls 1
+;media\nls\c_10081.nls 1
+;media\nls\c_20866.nls 1
+;media\nls\c_28591.nls 1
+;media\nls\c_28592.nls 1
+;media\nls\c_28593.nls 1
+;media\nls\c_28594.nls 1
+;media\nls\c_28595.nls 1
+;media\nls\c_28596.nls 1
+;media\nls\c_28597.nls 1
+;media\nls\c_28598.nls 1
+;media\nls\c_28599.nls 1
+;media\drivers\etc\services 5
+;media\inf\acpi.inf 6
+;media\inf\cdrom.inf 6
+;media\inf\display.inf 6
+;media\inf\font.inf 6
+;media\inf\hdc.inf 6
+;media\inf\intl.inf 6
+;media\inf\layout.inf 6
+;media\inf\machine.inf 6
+;media\inf\msmouse.inf 6
+;media\inf\keyboard.inf 6
+;media\inf\NET_NIC.inf 6
+;media\inf\netamd.inf 6
+;media\inf\netisa.inf 6
+;media\inf\netrtpnt.inf 6
+;media\inf\nettcpip.inf 6
+;media\inf\ports.inf 6
+;media\inf\scsi.inf 6
+;media\inf\syssetup.inf 6
+;media\inf\usbport.inf 6
+;media\inf\usb.inf 6
+;media\inf\usbstor.inf 6
+;media\inf\xboxdisp.inf 6
; Subsystems
-subsystems\win32\csrss\csrss.exe 1
-subsystems\win32\csrss\win32csr\win32csr.dll 1
-subsystems\csr\csr.exe 1 optional
-subsystems\csr\csrsrv\csrsrv.dll 1 optional
-subsystems\win\basesrv\basesrv.dll 1 optional
-subsystems\win\winsrv\winsrv.dll 1 optional
-subsystems\ntvdm\ntvdm.exe 1
-subsystems\win32\win32k\win32k.sys 1
+;subsystems\win32\csrss\csrss.exe 1
+;subsystems\win32\csrss\win32csr\win32csr.dll 1
+;subsystems\csr\csr.exe 1 optional
+;subsystems\csr\csrsrv\csrsrv.dll 1 optional
+;subsystems\win\basesrv\basesrv.dll 1 optional
+;subsystems\win\winsrv\winsrv.dll 1 optional
+;subsystems\ntvdm\ntvdm.exe 1
+;subsystems\win32\win32k\win32k.sys 1
boot\bootdata\bootcdregtest\testboot.bat 7 optional
tools\dbgprint\dbgprint.exe 7 optional
; Modules
-modules\os2\server\os2srv.dll 1 optional
-modules\os2\dll\win32\doscalls\doscalls.dll 1 optional
-modules\posix\server\psxsrv.dll 1 optional
-modules\posix\dll\win32\psxdll\psxdll.dll 1 optional
-modules\rosky\dll\win32\libsky\libsky.dll 1 optional
-modules\rosky\dll\win32\libskygi\libskygi.dll 1 optional
-modules\vms\server\vmssrv.dll 1 optional
-modules\vms\dll\win32\vmsdll\vmsdll.dll 1 optional
-modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr 1 optional
-modules\rosapps\applications\screensavers\matrix\matrix.scr 1 optional
-modules\rosapps\applications\screensavers\blankscr\scrnsave.scr 1 optional
-modules\rosapps\applications\screensavers\starfield\starfield.scr 1 optional
-modules\rosapps\applications\screensavers\mazescr\mazescr.scr 1 optional
-modules\rosapps\applications\screensavers\butterflies\butterflies.scr 1 optional
-modules\rosapps\applications\cmdutils\comp\comp.exe 1 optional
-modules\rosapps\applications\cmdutils\mode\mode.exe 1 optional
-modules\rosapps\applications\cmdutils\sort\sort.exe 1 optional
-modules\rosapps\applications\cmdutils\tee\tee.exe 1 optional
-modules\rosapps\applications\cmdutils\touch\touch.exe 1 optional
-modules\rosapps\applications\cmdutils\uptime\uptime.exe 1 optional
-modules\rosapps\applications\cmdutils\y\y.exe 1 optional
-modules\rosapps\applications\devutils\gdb2\gdb2.exe 1 optional
-modules\rosapps\applications\devutils\gdihv\gdihv.exe 1 optional
-modules\rosapps\applications\devutils\genguid\genguid.exe 1 optional
-modules\rosapps\applications\devutils\gettype\gettype.exe 1 optional
-modules\rosapps\applications\devutils\roswebparser\roswebparser.exe 1 optional
-modules\rosapps\applications\devutils\zoomin\zoomin.exe 1 optional
-modules\rosapps\applications\downloader\downloader.exe 1 optional
-modules\rosapps\applications\downloader\downloader.xml 1 optional
-modules\rosapps\applications\fontview\fontview.exe 1 optional
-modules\rosapps\applications\imagesoft\imagesoft.exe 1 optional
-modules\rosapps\applications\net\ncftp\ncftp.exe 1 optional
-modules\rosapps\applications\net\netreg\netreg.exe 1 optional
-modules\rosapps\applications\net\niclist\niclist.exe 1 optional
-modules\rosapps\applications\net\roshttpd\roshttpd.exe 1 optional
-modules\rosapps\applications\notevil\notevil.exe 1 optional
-modules\rosapps\applications\magnify\magnify.exe 1 optional
-modules\rosapps\applications\packmgr\cmd-line\rosget.exe 1 optional
-modules\rosapps\applications\packmgr\gui\packmgr.exe 1 optional
-modules\rosapps\applications\packmgr\lib\package.dll 1 optional
-modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe 1 optional
-modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe 1 optional
-modules\rosapps\applications\sysutils\chklib\chklib.exe 1 optional
-modules\rosapps\applications\sysutils\ctm\ctm.exe 1 optional
-modules\rosapps\applications\sysutils\kill\kill.exe 1 optional
-modules\rosapps\applications\sysutils\lsdd\lsdd.exe 1 optional
-modules\rosapps\applications\sysutils\man\man.exe 1 optional
-modules\rosapps\applications\sysutils\pedump\pedump.exe 1 optional
-modules\rosapps\applications\sysutils\regexpl\regexpl.exe 1 optional
-modules\rosapps\applications\sysutils\tcat\tcat.exe 1 optional
-modules\rosapps\applications\sysutils\tlist\tlist.exe 1 optional
-modules\rosapps\applications\sysutils\screenshot\screenshot.exe 1 optional
-modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe 1 optional
-modules\rosapps\applications\sysutils\utils\cat\cat.exe 1 optional
-modules\rosapps\applications\sysutils\utils\driver\load\load.exe 1 optional
-modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe 1 optional
-modules\rosapps\applications\sysutils\utils\infinst\infinst.exe 1 optional
-modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe 1 optional
-modules\rosapps\applications\sysutils\utils\objdir\objdir.exe 1 optional
-modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe 1 optional
-modules\rosapps\applications\sysutils\utils\ps\ps.exe 1 optional
-modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe 1 optional
-modules\rosapps\applications\sysutils\utils\stats\stats.exe 1 optional
-modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe 1 optional
-modules\rosapps\applications\winfile\winfile.exe 1 optional
-modules\rosapps\applications\winver\winver.exe 1 optional
-modules\rosapps\applications\write\write.exe 1 optional
-modules\rosapps\demos\ddraw\ddraw_demo.exe 1 optional
-modules\rosapps\demos\maze\maze.exe 1 optional
-modules\rosapps\dflat32\edit.exe 1 optional
-modules\rosapps\drivers\avtest\avtest.sys 1 optional
-modules\rosapps\drivers\ramdrv\ramdrv.sys 1 optional
-modules\rosapps\drivers\green\green.sys 1 optional
-modules\rosapps\lib\dflat32\dflat32.dll 1 optional
-modules\rosapps\templates\dialog.exe 1 optional
-modules\rosapps\templates\mdi.exe 1 optional
-modules\rostests\winetests\advapi32\advapi32_winetest.exe 7 optional
-modules\rostests\winetests\advpack\advpack_winetest.exe 7 optional
-modules\rostests\winetests\browseui\browseui_winetest.exe 7 optional
-modules\rostests\winetests\cabinet\cabinet_winetest.exe 7 optional
-modules\rostests\winetests\comcat\comcat_winetest.exe 7 optional
-modules\rostests\winetests\comctl32\comctl32_winetest.exe 7 optional
-modules\rostests\winetests\comdlg32\comdlg32_winetest.exe 7 optional
-modules\rostests\winetests\gdi32\gdi32_winetest.exe 7 optional
-modules\rostests\winetests\gdiplus\gdiplus_winetest.exe 7 optional
-modules\rostests\winetests\hlink\hlink_winetest.exe 7 optional
-modules\rostests\winetests\icmp\icmp_winetest.exe 7 optional
-modules\rostests\winetests\kernel32\kernel32_winetest.exe 7 optional
-modules\rostests\winetests\lz32\lz32_winetest.exe 7 optional
-modules\rostests\winetests\mapi32\mapi32_winetest.exe 7 optional
-modules\rostests\winetests\mlang\mlang_winetest.exe 7 optional
-modules\rostests\winetests\mshtml\mshtml_winetest.exe 7 optional
-modules\rostests\winetests\msi\msi_winetest.exe 7 optional
-modules\rostests\winetests\msvcrt\msvcrt_winetest.exe 7 optional
-modules\rostests\winetests\netapi32\netapi32_winetest.exe 7 optional
-modules\rostests\winetests\ntdll\ntdll_winetest.exe 7 optional
-modules\rostests\winetests\odbccp32\odbccp32_winetest.exe 7 optional
-modules\rostests\winetests\ole32\ole32_winetest.exe 7 optional
-modules\rostests\winetests\oleaut32\oleaut32_winetest.exe 7 optional
-modules\rostests\winetests\powrprof\powrprof_winetest.exe 7 optional
-modules\rostests\winetests\psapi\psapi_winetest.exe 7 optional
-modules\rostests\winetests\riched20\riched20_winetest.exe 7 optional
-modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe 7 optional
-modules\rostests\winetests\rsabase\rsabase_winetest.exe 7 optional
-modules\rostests\winetests\rsaenh\rsaenh_winetest.exe 7 optional
-modules\rostests\winetests\schannel\schannel_winetest.exe 7 optional
-modules\rostests\winetests\secur32\secur32_winetest.exe 7 optional
-modules\rostests\winetests\setupapi\setupapi_winetest.exe 7 optional
-modules\rostests\winetests\shdocvw\shdocvw_winetest.exe 7 optional
-modules\rostests\winetests\shell32\shell32_winetest.exe 7 optional
-modules\rostests\winetests\shlwapi\shlwapi_winetest.exe 7 optional
-modules\rostests\winetests\urlmon\urlmon_winetest.exe 7 optional
-modules\rostests\winetests\user32\user32_winetest.exe 7 optional
-modules\rostests\winetests\usp10\usp10_winetest.exe 7 optional
-modules\rostests\winetests\uxtheme\uxtheme_winetest.exe 7 optional
-modules\rostests\winetests\version\version_winetest.exe 7 optional
-modules\rostests\winetests\wininet\wininet_winetest.exe 7 optional
-modules\wallpaper\lake.bmp 4 optional
+;modules\os2\server\os2srv.dll 1 optional
+;modules\os2\dll\win32\doscalls\doscalls.dll 1 optional
+;modules\posix\server\psxsrv.dll 1 optional
+;modules\posix\dll\win32\psxdll\psxdll.dll 1 optional
+;modules\rosky\dll\win32\libsky\libsky.dll 1 optional
+;modules\rosky\dll\win32\libskygi\libskygi.dll 1 optional
+;modules\vms\server\vmssrv.dll 1 optional
+;modules\vms\dll\win32\vmsdll\vmsdll.dll 1 optional
+;modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr 1 optional
+;modules\rosapps\applications\screensavers\matrix\matrix.scr 1 optional
+;modules\rosapps\applications\screensavers\blankscr\scrnsave.scr 1 optional
+;modules\rosapps\applications\screensavers\starfield\starfield.scr 1 optional
+;modules\rosapps\applications\screensavers\mazescr\mazescr.scr 1 optional
+;modules\rosapps\applications\screensavers\butterflies\butterflies.scr 1 optional
+;modules\rosapps\applications\cmdutils\comp\comp.exe 1 optional
+;modules\rosapps\applications\cmdutils\mode\mode.exe 1 optional
+;modules\rosapps\applications\cmdutils\sort\sort.exe 1 optional
+;modules\rosapps\applications\cmdutils\tee\tee.exe 1 optional
+;modules\rosapps\applications\cmdutils\touch\touch.exe 1 optional
+;modules\rosapps\applications\cmdutils\uptime\uptime.exe 1 optional
+;modules\rosapps\applications\cmdutils\y\y.exe 1 optional
+;modules\rosapps\applications\devutils\gdb2\gdb2.exe 1 optional
+;modules\rosapps\applications\devutils\gdihv\gdihv.exe 1 optional
+;modules\rosapps\applications\devutils\genguid\genguid.exe 1 optional
+;modules\rosapps\applications\devutils\gettype\gettype.exe 1 optional
+;modules\rosapps\applications\devutils\roswebparser\roswebparser.exe 1 optional
+;modules\rosapps\applications\devutils\zoomin\zoomin.exe 1 optional
+;modules\rosapps\applications\downloader\downloader.exe 1 optional
+;modules\rosapps\applications\downloader\downloader.xml 1 optional
+;modules\rosapps\applications\fontview\fontview.exe 1 optional
+;modules\rosapps\applications\imagesoft\imagesoft.exe 1 optional
+;modules\rosapps\applications\net\ncftp\ncftp.exe 1 optional
+;modules\rosapps\applications\net\netreg\netreg.exe 1 optional
+;modules\rosapps\applications\net\niclist\niclist.exe 1 optional
+;modules\rosapps\applications\net\roshttpd\roshttpd.exe 1 optional
+;modules\rosapps\applications\notevil\notevil.exe 1 optional
+;modules\rosapps\applications\magnify\magnify.exe 1 optional
+;modules\rosapps\applications\packmgr\cmd-line\rosget.exe 1 optional
+;modules\rosapps\applications\packmgr\gui\packmgr.exe 1 optional
+;modules\rosapps\applications\packmgr\lib\package.dll 1 optional
+;modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe 1 optional
+;modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe 1 optional
+;modules\rosapps\applications\sysutils\chklib\chklib.exe 1 optional
+;modules\rosapps\applications\sysutils\ctm\ctm.exe 1 optional
+;modules\rosapps\applications\sysutils\kill\kill.exe 1 optional
+;modules\rosapps\applications\sysutils\lsdd\lsdd.exe 1 optional
+;modules\rosapps\applications\sysutils\man\man.exe 1 optional
+;modules\rosapps\applications\sysutils\pedump\pedump.exe 1 optional
+;modules\rosapps\applications\sysutils\regexpl\regexpl.exe 1 optional
+;modules\rosapps\applications\sysutils\tcat\tcat.exe 1 optional
+;modules\rosapps\applications\sysutils\tlist\tlist.exe 1 optional
+;modules\rosapps\applications\sysutils\screenshot\screenshot.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\cat\cat.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\driver\load\load.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\infinst\infinst.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\objdir\objdir.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\ps\ps.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\stats\stats.exe 1 optional
+;modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe 1 optional
+;modules\rosapps\applications\winfile\winfile.exe 1 optional
+;modules\rosapps\applications\winver\winver.exe 1 optional
+;modules\rosapps\applications\write\write.exe 1 optional
+;modules\rosapps\demos\ddraw\ddraw_demo.exe 1 optional
+;modules\rosapps\demos\maze\maze.exe 1 optional
+;modules\rosapps\dflat32\edit.exe 1 optional
+;modules\rosapps\drivers\avtest\avtest.sys 1 optional
+;modules\rosapps\drivers\ramdrv\ramdrv.sys 1 optional
+;modules\rosapps\drivers\green\green.sys 1 optional
+;modules\rosapps\lib\dflat32\dflat32.dll 1 optional
+;modules\rosapps\templates\dialog.exe 1 optional
+;modules\rosapps\templates\mdi.exe 1 optional
+;modules\rostests\winetests\advapi32\advapi32_winetest.exe 7 optional
+;modules\rostests\winetests\advpack\advpack_winetest.exe 7 optional
+;modules\rostests\winetests\browseui\browseui_winetest.exe 7 optional
+;modules\rostests\winetests\cabinet\cabinet_winetest.exe 7 optional
+;modules\rostests\winetests\comcat\comcat_winetest.exe 7 optional
+;modules\rostests\winetests\comctl32\comctl32_winetest.exe 7 optional
+;modules\rostests\winetests\comdlg32\comdlg32_winetest.exe 7 optional
+;modules\rostests\winetests\gdi32\gdi32_winetest.exe 7 optional
+;modules\rostests\winetests\gdiplus\gdiplus_winetest.exe 7 optional
+;modules\rostests\winetests\hlink\hlink_winetest.exe 7 optional
+;modules\rostests\winetests\icmp\icmp_winetest.exe 7 optional
+;modules\rostests\winetests\kernel32\kernel32_winetest.exe 7 optional
+;modules\rostests\winetests\lz32\lz32_winetest.exe 7 optional
+;modules\rostests\winetests\mapi32\mapi32_winetest.exe 7 optional
+;modules\rostests\winetests\mlang\mlang_winetest.exe 7 optional
+;modules\rostests\winetests\mshtml\mshtml_winetest.exe 7 optional
+;modules\rostests\winetests\msi\msi_winetest.exe 7 optional
+;modules\rostests\winetests\msvcrt\msvcrt_winetest.exe 7 optional
+;modules\rostests\winetests\netapi32\netapi32_winetest.exe 7 optional
+;modules\rostests\winetests\ntdll\ntdll_winetest.exe 7 optional
+;modules\rostests\winetests\odbccp32\odbccp32_winetest.exe 7 optional
+;modules\rostests\winetests\ole32\ole32_winetest.exe 7 optional
+;modules\rostests\winetests\oleaut32\oleaut32_winetest.exe 7 optional
+;modules\rostests\winetests\powrprof\powrprof_winetest.exe 7 optional
+;modules\rostests\winetests\psapi\psapi_winetest.exe 7 optional
+;modules\rostests\winetests\riched20\riched20_winetest.exe 7 optional
+;modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe 7 optional
+;modules\rostests\winetests\rsabase\rsabase_winetest.exe 7 optional
+;modules\rostests\winetests\rsaenh\rsaenh_winetest.exe 7 optional
+;modules\rostests\winetests\schannel\schannel_winetest.exe 7 optional
+;modules\rostests\winetests\secur32\secur32_winetest.exe 7 optional
+;modules\rostests\winetests\setupapi\setupapi_winetest.exe 7 optional
+;modules\rostests\winetests\shdocvw\shdocvw_winetest.exe 7 optional
+;modules\rostests\winetests\shell32\shell32_winetest.exe 7 optional
+;modules\rostests\winetests\shlwapi\shlwapi_winetest.exe 7 optional
+;modules\rostests\winetests\urlmon\urlmon_winetest.exe 7 optional
+;modules\rostests\winetests\user32\user32_winetest.exe 7 optional
+;modules\rostests\winetests\usp10\usp10_winetest.exe 7 optional
+;modules\rostests\winetests\uxtheme\uxtheme_winetest.exe 7 optional
+;modules\rostests\winetests\version\version_winetest.exe 7 optional
+;modules\rostests\winetests\wininet\wininet_winetest.exe 7 optional
+;modules\wallpaper\lake.bmp 4 optional
; Native libraries
-modules\windows\mfc42.dll 1 optional
+;modules\windows\mfc42.dll 1 optional
--- /dev/null
+/* stuff needed for libgcc on win32. */
+.intel_syntax noprefix
+
+/*#ifdef L_chkstk*/
+#ifdef WIN32
+
+ .global ___chkstk
+ .global __alloca
+___chkstk:
+__alloca:
+ push rcx /* save temp */
+ mov rcx, rsp /* get sp */
+ add rcx, 8 /* and point to return addr */
+
+probe:
+ cmp rax, 0x1000 /* > 4k ?*/
+ jb done
+
+ sub rcx, 0x1000 /* yes, move pointer down 4k*/
+ or qword ptr [rcx], 0x0 /* probe there */
+ sub rax, 0x1000 /* decrement count */
+ jmp probe /* and do it again */
+
+done:
+ sub rcx, rax
+ or qword ptr [rcx], 0x0 /* less that 4k, just peek here */
+
+ mov rax, rsp
+ mov rsp, rcx /* decrement stack */
+
+ mov rcx, [rax] /* recover saved temp */
+ mov rax, [rax + 8]/* get return address */
+ jmp [rax]
+
+
+#endif
--- /dev/null
+.intel_syntax noprefix
+.text
+.code16
+
+#define ASM
+#include <arch.h>
+
+//.org 0x8000
+
+.global RealEntryPoint
+RealEntryPoint:
+
+ cli
+
+ /* Setup real mode segment registers */
+ xor ax, ax
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+
+ /* Setup a real mode stack */
+ mov sp, stack16
+
+ /* Zero BootDrive and BootPartition */
+ xor eax, eax
+ mov _BootDrive, eax
+ mov _BootPartition, eax
+
+ /* Store the boot drive */
+ mov _BootDrive, dl
+
+ /* Store the boot partition */
+ mov _BootPartition, dh
+
+ /* Load the GDT */
+ lgdt gdtptr
+ /* Load the IDT */
+// lidt idtptr
+
+ call x86_16_EnableA20
+
+ call x86_16_BuildPageTables
+
+ /* Switch to long mode */
+ call x86_16_SwitchToLong
+
+ .code64
+
+ /* GO! */
+ xor rcx, rcx
+ call _BootMain
+
+ /* Return into real mode */
+ call x86_64_SwitchToReal
+ .code16
+
+// int 0x19
+
+ /* We should never get here */
+stop:
+ jmp stop
+ nop
+ nop
+
+
+/** 16 Bit helper functions ***************************************************/
+.code16
+
+x86_16_Empty8042:
+ .word 0x00eb,0x00eb // jmp $+2, jmp $+2
+ in al, 0x64
+ cmp al, 0xff // legacy-free machine without keyboard
+ jz empty_8042_ret // controllers on Intel Macs read back 0xFF
+ test al, 0x02
+ jnz x86_16_Empty8042
+empty_8042_ret:
+ ret
+
+x86_16_EnableA20:
+ pusha
+ call x86_16_Empty8042
+ mov al, 0xD1 // command write
+ out 0x64, al
+ call x86_16_Empty8042
+ mov al, 0xDF // A20 on
+ out 0x60, al
+ call x86_16_Empty8042
+ popa
+ ret
+
+
+/*
+ * We define 512 2MB pages at the start of memory, so we can access the first
+ * 1 GB as if paging was disabled
+ */
+x86_16_BuildPageTables:
+ pusha
+ push es
+
+ mov ax, PML4_SEG
+ mov es, ax
+ cld
+ xor di, di
+
+ /* One entry in the PML4 pointing to PDP */
+ mov eax, (PDP_PAGENUM << 12) | 0x00f
+ stosd
+ xor eax, eax
+ mov cx, 0x03ff
+ rep stosd
+
+ /* One entry in the PDP pointing to PD */
+ mov eax, (PD_PAGENUM << 12) | 0x00f
+ stosd
+
+ xor eax, eax
+ mov ecx, 0x03ff
+ rep stosd
+
+ /* 512 entries in the PD defining a 2MB page each */
+ mov ecx, 512
+ mov eax, 0x008f
+
+Bpt2:
+ mov es: [di], eax
+ mov dword ptr es: [di + 4], 0
+ add eax, 512 << 12 // add 512 4k pages
+ add di, 8
+
+ /* Loop it */
+ dec cx
+ jnz Bpt2
+
+ /* Return */
+ pop es
+ popa
+ ret
+
+
+//.global x86_16_SwitchToLong
+x86_16_SwitchToLong:
+ cli
+
+ xor ax,ax
+ mov ds,ax
+ mov es,ax
+ mov fs,ax
+ mov gs,ax
+ mov ss,ax
+
+ /* Get the return address off the stack */
+ pop word ptr code64ret
+
+ /* Save 16-bit stack pointer */
+ mov stack16, sp
+
+ mov eax, 0x00a0 // Set PAE and PGE: 10100000b
+ mov cr4, eax
+
+ mov edx, PML4_ADDRESS // Point cr3 at PML4
+ mov cr3, edx
+
+ mov ecx, 0xC0000080 // Specify EFER MSR
+
+ rdmsr // Enable long mode
+ or eax, 0x00000100
+ wrmsr
+
+ mov ebx, cr0 // Activate long mode
+ or ebx, 0x80000001 // by enabling paging and protection simultaneously
+ mov cr0, ebx // skipping protected mode entirely
+
+ jmp LMODE_CS:offset LongCat //Load CS with 64 bit segment and flush the instruction cache
+
+.code64
+LongCat:
+ /* Set up 64 bit stack */
+ mov rsp, stack64
+
+ /* Put the return address back onto the stack */
+ push qword ptr code64ret
+
+ /* Now return in long mode! */
+ ret
+
+
+/** 64 But functions **********************************************************/
+.code64
+
+.global x86_64_SwitchToReal
+x86_64_SwitchToReal:
+
+ /* Get the return address off the stack */
+ pop qword ptr code64ret
+
+ /* Save 64-bit stack pointer */
+ mov stack64, rsp
+
+ /* Step 1 - deactivate long mode, by disabling paging */
+ mov rax, cr0
+ and rax, 0x000000007fffffff //~0x80000000
+ mov cr0, rax
+
+ /* Step 2 - disable long mode in EFER MSR */
+ mov rcx, 0xC0000080 // Specify EFER MSR
+ rdmsr
+ and eax, ~0x00000100 // Disable EFER.LME
+ wrmsr
+
+ .code32
+ /* jmp to 16-bit segment to set the limit correctly */
+ jmp RMODE_CS: offset SwitchToReal2
+
+SwitchToReal2:
+ .code16
+
+ /* Step 3 - Disable Protected Mode */
+ mov eax, cr0
+ and eax, ~0x00000001
+ mov cr0, eax
+
+ /* Clear prefetch queue & correct CS */
+ jmp 0:offset BeReal
+
+BeReal:
+ /* Restore segment registers */
+ mov ax, 0
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+
+ /* Rstore 16 bit stack */
+ mov sp, stack16
+
+// lidt rmode_idtptr /* Load IDTR with real mode value */
+
+// sti /* These are ok now */
+
+ /* Put the return address back onto the stack */
+ push word ptr code64ret
+
+ /* Now return in real mode! */
+ ret
+
+
+
+/** Some data *****************************************************************/
+
+.code64
+
+stack16:
+ .quad STACK16ADDR
+
+stack64:
+ .quad STACK64ADDR
+
+code64ret:
+ .quad 0
+
+gdt:
+ .quad 0x0000000000000000
+ .quad 0x0020980000000000
+ .quad 0x0000900000000000
+ .word 0xFFFF, 0x0000, 0x9E00, 0x0000 /* 16-bit real mode CS */
+ .word 0xFFFF, 0x0000, 0x9200, 0x0000 /* 16-bit real mode DS */
+
+/* GDT table pointer */
+gdtptr:
+ .word 0x27 /* Limit */
+ .long gdt /* Base Address */
+
+
+.global _BootDrive
+_BootDrive:
+ .long 0
+
+.global _BootPartition
+_BootPartition:
+ .long 0
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+/* Need to include them here, because of linking issues between 64 / 16 bit */
+//#include "debug16.S"
+#include "int386.S"
+#include "boot.S"
+#include "i386pnp.S"
+
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+
+
+EXTERN(_ChainLoadBiosBootSectorCode)
+ .code64
+
+ call x86_64_SwitchToReal
+ .code16
+
+ /* Set the boot drive */
+ mov dl, _BootDrive
+
+ /* Load segment registers */
+ cli
+ mov bx, 0x0000
+ mov ds, bx
+ mov es, bx
+ mov fs, bx
+ mov gs, bx
+ mov ss, bx
+ mov sp, 0x7C00
+
+// ljmpl $0x0000,$0x7C00
+ jmp 0x7c00:0x0000
+
+EXTERN(_SoftReboot)
+ .code64
+
+ call x86_64_SwitchToReal
+ .code16
+
+ mov ax, 0x40
+ mov ds, ax
+ mov si, 0x72
+
+ // Set the word at location 40:72 to 1234h
+ mov word ptr [si], 0x1234
+
+ // and jump to location FFFF:0 in ROM
+// ljmpl $0xFFFF,$0x0000
+ jmp 0xffff: 0x0000
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+
+
+EXTERN(_DriveMapInt13HandlerStart)
+Int13Handler:
+
+ pushw %bp
+ movw %sp,%bp
+ pushw %ax
+ pushw %cx
+ pushw %si
+
+ cld
+
+ /* Get callers flags from stack */
+ movw 0x06(%bp),%ax
+ movw %ax,%cs:(CallersFlags - Int13Handler)
+
+ /* Save the drive number they passed in */
+ movb %dl,%cs:(PassedInDriveNumber - Int13Handler)
+
+ /* Now we need to perform the mapping */
+ xorw %cx,%cx
+ movw $(Int13HandlerMapCount - Int13Handler),%si
+ /* Get the count of drives in the map list */
+ movb %cs:(%si),%cl
+ incw %si
+
+ /* If the map list is empty then just call the old int 13h handler */
+ cmpb $0,%cl
+ jz CallOldInt13Handler
+
+GetMappedDriveNumberLoop:
+
+ /* Get the next drive number in the list */
+ lodsw %cs:(%si),%ax
+ /* Check to see if it's the one they are calling int 13h for */
+ cmpb %al,%dl
+ /* If not get the next one */
+ jne GetMappedDriveNumberLoopNext
+
+ /* If we get here then we have found a mapped drive */
+ /* Send new drive number on to the old int 13h handler */
+ movb %ah,%dl
+ /* Call BIOS Int 13 Handler */
+ jmp CallOldInt13Handler
+
+GetMappedDriveNumberLoopNext:
+ loop GetMappedDriveNumberLoop
+
+CallOldInt13Handler:
+ /* Restore the registers we changed off the stack */
+ popw %si
+ popw %cx
+ popw %ax
+
+ /* Put flags onto stack */
+ pushw %cs:(CallersFlags - Int13Handler)
+
+ /* Call old int 13h handler with new drive number */
+ .byte 0x9a /* lcall */
+EXTERN(_DriveMapOldInt13HandlerAddress)
+ .word 0
+ .word 0
+
+ /* Update the callers flags with the values the BIOS returned */
+ pushw %ax
+ pushf
+ popw %ax
+ movw %ax,0x06(%bp)
+ popw %ax
+ /* Restore the callers drive number */
+ movb %cs:(PassedInDriveNumber - Int13Handler),%dl
+
+ popw %bp
+
+ iret
+
+CallersFlags:
+ .word 0
+
+PassedInDriveNumber:
+ .byte 0
+
+EXTERN(_DriveMapInt13HandlerMapList)
+Int13HandlerMapCount:
+ .byte 0
+
+Int13HandlerDrive1:
+ .byte 0
+Int13HandlerDriveNew1:
+ .byte 0
+
+Int13HandlerDrive2:
+ .byte 0
+Int13HandlerDriveNew2:
+ .byte 0
+
+Int13HandlerDrive3:
+ .byte 0
+Int13HandlerDriveNew3:
+ .byte 0
+
+Int13HandlerDrive4:
+ .byte 0
+Int13HandlerDriveNew4:
+ .byte 0
+
+EXTERN(_DriveMapInt13HandlerEnd)
--- /dev/null
+// fathelp.S
+// FAT12/16 Boot Sector Helper Code
+// Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer
+
+.intel_syntax noprefix
+
+.text
+
+.code16
+
+#define BootSectorStackTop 0x7bf2
+#define DataAreaStartHigh 0x2
+#define DataAreaStartLow 0x4
+#define BiosCHSDriveSizeHigh 0x6
+#define BiosCHSDriveSizeLow 0x8
+#define BiosCHSDriveSize 0x8
+#define ReadSectorsOffset 0xa
+#define ReadClusterOffset 0xc
+#define PutCharsOffset 0xe
+
+#define OEMName 3
+#define BytesPerSector 11
+#define SectsPerCluster 13
+#define ReservedSectors 14
+#define NumberOfFats 16
+#define MaxRootEntries 17
+#define TotalSectors 19
+#define MediaDescriptor 21
+#define SectorsPerFat 22
+#define SectorsPerTrack 24
+#define NumberOfHeads 26
+#define HiddenSectors 28
+#define TotalSectorsBig 32
+#define BootDrive 36
+#define Reserved 37
+#define ExtendSig 38
+#define SerialNumber 39
+#define VolumeLabel 43
+#define FileSystem 54
+
+
+// This code will be stored in the first 512 bytes
+// of freeldr.sys. The first 3 bytes will be a jmp
+// instruction to skip past the FAT helper code
+// that is stored in the rest of the 512 bytes.
+//
+// This code is loaded at 0000:8000 so we have to
+// encode a jmp instruction to jump to 0000:8200
+//.org 0x8000
+
+.global _mainCRTStartup // For Mingw32 builds where the linker looks for this symbol
+_mainCRTStartup:
+.global start
+start:
+ .byte 0xe9
+ .byte 0xfd
+ .byte 0x01
+
+// Now starts the extra boot code that we will store
+// in the first 512 bytes of freeldr.sys. This code
+// allows the FAT12/16 bootsector to navigate the
+// FAT table so that we can still load freeldr.sys
+// even if it is fragmented.
+
+
+FatHelperEntryPoint:
+
+ push ax // First save AX - the start cluster of freeldr.sys
+
+
+ // Display "Loading FreeLoader..." message
+ mov esi, offset msgLoading // Loading message
+ call [bp-PutCharsOffset] // Display it
+
+
+ call ReadFatIntoMemory
+
+ pop ax // Restore AX (start cluster)
+ // AX has start cluster of freeldr.sys
+
+ mov bx,0x800
+ mov es,bx
+
+LoadFile:
+ push ax
+ call IsFat12
+ pop ax
+ jnc LoadFile2
+ cmp ax,0x0ff8 // Check to see if this is the last cluster in the chain
+ jmp LoadFile3
+LoadFile2:
+ cmp ax,0x0fff8
+LoadFile3:
+ jae LoadFile_Done // If so continue, if not then read then next one
+ push ax
+ xor bx,bx // Load ROSLDR starting at 0000:8000h
+ push es
+ call [bp-ReadClusterOffset]
+ pop es
+
+ xor bx,bx
+ mov bl, [bp+SectsPerCluster]
+ shl bx,5 // BX = BX * 512 / 16
+ mov ax,es // Increment the load address by
+ add ax,bx // The size of a cluster
+ mov es,ax
+
+ call IsFat12
+ pop ax
+ push es
+ jnc LoadFile4
+ call GetFatEntry12 // Get the next entry
+ jmp LoadFile5
+LoadFile4:
+ call GetFatEntry16
+LoadFile5:
+ pop es
+
+ jmp LoadFile // Load the next cluster (if any)
+
+LoadFile_Done:
+ mov dl, [bp+BootDrive] // Load the boot drive into DL
+ mov dh, BootPartition // Load the boot partition into DH
+ push word ptr 0x0000
+ push word ptr 0x8000 // We will do a far return to 0000:8000h
+
+// retf // Transfer control to ROSLDR
+ .byte 0xcb // == retf
+
+
+// Reads the entire FAT into memory at 7000:0000
+ReadFatIntoMemory:
+ mov ax, [bp+HiddenSectors]
+ mov dx, [bp+HiddenSectors+2]
+ add ax, [bp+ReservedSectors]
+ adc dx, 0
+ mov cx, [bp+SectorsPerFat]
+ mov bx,0x7000
+ mov es,bx
+ xor bx,bx
+ call [bp-ReadSectorsOffset]
+ ret
+
+
+// Returns the FAT entry for a given cluster number for 16-bit FAT
+// On entry AX has cluster number
+// On return AX has FAT entry for that cluster
+GetFatEntry16:
+
+ mov cx,2 // AX = AX * 2 (since FAT16 entries are 2 bytes)
+ mul cx
+ shl dx,12
+
+ mov bx,0x7000
+ add bx,dx
+ mov es,bx
+ mov bx,ax // Restore FAT entry offset
+ mov ax, [es:bx] // Get FAT entry
+
+ ret
+
+
+// Returns the FAT entry for a given cluster number for 12-bit FAT
+// On entry AX has cluster number
+// On return AX has FAT entry for that cluster
+GetFatEntry12:
+
+ push ax
+ mov cx,ax
+ shr ax,1
+ add ax,cx // AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits)
+
+ mov bx,0x7000
+ mov es,bx
+ mov bx,ax // Put FAT entry offset into BX
+ mov ax, [es:bx] // Get FAT entry
+ pop cx // Get cluster number from stack
+ and cx,1
+ jz UseLow12Bits
+ and ax,0x0fff0
+ shr ax,4
+ jmp GetFatEntry12_Done
+
+UseLow12Bits:
+ and ax,0x0fff
+
+GetFatEntry12_Done:
+
+ ret
+
+
+// Returns CF = 1 if this is a FAT12 file system
+// Otherwise CF = 0 for FAT16
+IsFat12:
+
+ mov ebx, [bp-DataAreaStartLow]
+ // EBX now has the number of the starting sector of the data area
+ // starting from the beginning of the disk, so subtrace hidden sectors
+ sub ebx, [bp+HiddenSectors]
+
+
+ xor eax,eax
+ mov ax, [bp+TotalSectors]
+ cmp ax, 0
+ jnz IsFat12_2
+ mov eax, [bp+TotalSectorsBig]
+
+ // EAX now contains the number of sectors on the volume
+
+IsFat12_2:
+ sub eax,ebx // Subtract data area start sector
+ xor edx,edx // from total sectors of volume
+
+ // EDX:EAX now contains the number of data sectors on the volume
+ movzx ebx, byte ptr [bp+SectsPerCluster]
+ div ebx
+ // EAX now has the number of clusters on the volume
+ stc
+ cmp eax,4085
+ jb IsFat12_Done
+ clc
+
+IsFat12_Done:
+ ret
+
+
+
+msgLoading:
+ .ascii "Loading FreeLoader..."
+ .byte 0x0d,0x0a,0
+
+// times 510-($-$$) db 0 // Pad to 510 bytes
+.org 0x1fe
+ .word 0x0aa55 // BootSector signature
+
+
+// pseudo adresses
+//.org 0x7dfd
+BootPartition:
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2003, 2004 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define MILLISEC (10)
+#define PRECISION (8)
+
+#define HZ (100)
+#define CLOCK_TICK_RATE (1193182)
+#define LATCH (CLOCK_TICK_RATE / HZ)
+
+
+/* No Mouse */
+#define MOUSE_TYPE_NONE 0
+/* Microsoft Mouse with 2 buttons */
+#define MOUSE_TYPE_MICROSOFT 1
+/* Logitech Mouse with 3 buttons */
+#define MOUSE_TYPE_LOGITECH 2
+/* Microsoft Wheel Mouse (aka Z Mouse) */
+#define MOUSE_TYPE_WHEELZ 3
+/* Mouse Systems Mouse */
+#define MOUSE_TYPE_MOUSESYSTEMS 4
+
+
+/* PS2 stuff */
+
+/* Controller registers. */
+#define CONTROLLER_REGISTER_STATUS 0x64
+#define CONTROLLER_REGISTER_CONTROL 0x64
+#define CONTROLLER_REGISTER_DATA 0x60
+
+/* Controller commands. */
+#define CONTROLLER_COMMAND_READ_MODE 0x20
+#define CONTROLLER_COMMAND_WRITE_MODE 0x60
+#define CONTROLLER_COMMAND_GET_VERSION 0xA1
+#define CONTROLLER_COMMAND_MOUSE_DISABLE 0xA7
+#define CONTROLLER_COMMAND_MOUSE_ENABLE 0xA8
+#define CONTROLLER_COMMAND_TEST_MOUSE 0xA9
+#define CONTROLLER_COMMAND_SELF_TEST 0xAA
+#define CONTROLLER_COMMAND_KEYBOARD_TEST 0xAB
+#define CONTROLLER_COMMAND_KEYBOARD_DISABLE 0xAD
+#define CONTROLLER_COMMAND_KEYBOARD_ENABLE 0xAE
+#define CONTROLLER_COMMAND_WRITE_MOUSE_OUTPUT_BUFFER 0xD3
+#define CONTROLLER_COMMAND_WRITE_MOUSE 0xD4
+
+/* Controller status */
+#define CONTROLLER_STATUS_OUTPUT_BUFFER_FULL 0x01
+#define CONTROLLER_STATUS_INPUT_BUFFER_FULL 0x02
+#define CONTROLLER_STATUS_SELF_TEST 0x04
+#define CONTROLLER_STATUS_COMMAND 0x08
+#define CONTROLLER_STATUS_UNLOCKED 0x10
+#define CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL 0x20
+#define CONTROLLER_STATUS_GENERAL_TIMEOUT 0x40
+#define CONTROLLER_STATUS_PARITY_ERROR 0x80
+#define AUX_STATUS_OUTPUT_BUFFER_FULL (CONTROLLER_STATUS_OUTPUT_BUFFER_FULL | \
+ CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL)
+
+/* Timeout in ms for sending to keyboard controller. */
+#define CONTROLLER_TIMEOUT 250
+
+static CHAR Hex[] = "0123456789abcdef";
+static unsigned int delay_count = 1;
+
+extern ULONG reactos_disk_count;
+extern ARC_DISK_SIGNATURE reactos_arc_disk_info[];
+extern char reactos_arc_strings[32][256];
+
+/* FUNCTIONS ****************************************************************/
+
+
+static VOID
+__StallExecutionProcessor(ULONG Loops)
+{
+ volatile register unsigned int i;
+ for (i = 0; i < Loops; i++);
+}
+
+
+VOID StallExecutionProcessor(ULONG Microseconds)
+{
+ ULONGLONG LoopCount = ((ULONGLONG)delay_count * (ULONGLONG)Microseconds) / 1000ULL;
+ __StallExecutionProcessor((ULONG)LoopCount);
+}
+
+
+static ULONG
+Read8254Timer(VOID)
+{
+ ULONG Count;
+
+ WRITE_PORT_UCHAR((PUCHAR)0x43, 0x00);
+ Count = READ_PORT_UCHAR((PUCHAR)0x40);
+ Count |= READ_PORT_UCHAR((PUCHAR)0x40) << 8;
+
+ return Count;
+}
+
+
+static VOID
+WaitFor8254Wraparound(VOID)
+{
+ ULONG CurCount;
+ ULONG PrevCount = ~0;
+ LONG Delta;
+
+ CurCount = Read8254Timer();
+
+ do
+ {
+ PrevCount = CurCount;
+ CurCount = Read8254Timer();
+ Delta = CurCount - PrevCount;
+
+ /*
+ * This limit for delta seems arbitrary, but it isn't, it's
+ * slightly above the level of error a buggy Mercury/Neptune
+ * chipset timer can cause.
+ */
+ }
+ while (Delta < 300);
+}
+
+
+VOID
+HalpCalibrateStallExecution(VOID)
+{
+ ULONG i;
+ ULONG calib_bit;
+ ULONG CurCount;
+
+ /* Initialise timer interrupt with MILLISECOND ms interval */
+ WRITE_PORT_UCHAR((PUCHAR)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */
+ WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH & 0xff); /* LSB */
+ WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH >> 8); /* MSB */
+
+ /* Stage 1: Coarse calibration */
+
+ WaitFor8254Wraparound();
+
+ delay_count = 1;
+
+ do {
+ delay_count <<= 1; /* Next delay count to try */
+
+ WaitFor8254Wraparound();
+
+ __StallExecutionProcessor(delay_count); /* Do the delay */
+
+ CurCount = Read8254Timer();
+ } while (CurCount > LATCH / 2);
+
+ delay_count >>= 1; /* Get bottom value for delay */
+
+ /* Stage 2: Fine calibration */
+
+ calib_bit = delay_count; /* Which bit are we going to test */
+
+ for(i=0;i<PRECISION;i++) {
+ calib_bit >>= 1; /* Next bit to calibrate */
+ if(!calib_bit) break; /* If we have done all bits, stop */
+
+ delay_count |= calib_bit; /* Set the bit in delay_count */
+
+ WaitFor8254Wraparound();
+
+ __StallExecutionProcessor(delay_count); /* Do the delay */
+
+ CurCount = Read8254Timer();
+ if (CurCount <= LATCH / 2) /* If a tick has passed, turn the */
+ delay_count &= ~calib_bit; /* calibrated bit back off */
+ }
+
+ /* We're finished: Do the finishing touches */
+ delay_count /= (MILLISEC / 2); /* Calculate delay_count for 1ms */
+}
+
+static VOID
+DetectPnpBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PNP_BIOS_DEVICE_NODE DeviceNode;
+ PCM_PNP_BIOS_INSTALLATION_CHECK InstData;
+ PCONFIGURATION_COMPONENT_DATA BusKey;
+ ULONG x;
+ ULONG NodeSize = 0;
+ ULONG NodeCount = 0;
+ UCHAR NodeNumber;
+ ULONG FoundNodeCount;
+ int i;
+ ULONG PnpBufferSize;
+ ULONG Size;
+ char *Ptr;
+
+ InstData = (PCM_PNP_BIOS_INSTALLATION_CHECK)PnpBiosSupported();
+ if (InstData == NULL || strncmp((CHAR*)InstData->Signature, "$PnP", 4))
+ {
+ DbgPrint((DPRINT_HWDETECT, "PnP-BIOS not supported\n"));
+ return;
+ }
+ DbgPrint((DPRINT_HWDETECT, "Signature '%c%c%c%c'\n",
+ InstData->Signature[0], InstData->Signature[1],
+ InstData->Signature[2], InstData->Signature[3]));
+
+
+ x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount);
+ NodeCount &= 0xFF; // needed since some fscked up BIOSes return
+ // wrong info (e.g. Mac Virtual PC)
+ // e.g. look: http://my.execpc.com/~geezer/osd/pnp/pnp16.c
+ if (x != 0 || NodeSize == 0 || NodeCount == 0)
+ {
+ DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n"));
+ return;
+ }
+ DbgPrint((DPRINT_HWDETECT, "PnP-BIOS supported\n"));
+ DbgPrint((DPRINT_HWDETECT, "MaxNodeSize %u NodeCount %u\n", NodeSize, NodeCount));
+ DbgPrint((DPRINT_HWDETECT, "Estimated buffer size %u\n", NodeSize * NodeCount));
+
+ /* Create component key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BusKey);
+ (*BusNumber)++;
+
+ /* Set the component information */
+ FldrSetComponentInformation(BusKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Set the identifier */
+ FldrSetIdentifier(BusKey, "PNP BIOS");
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + (NodeSize * NodeCount);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+ memset(PartialResourceList, 0, Size);
+
+ /* Initialize resource descriptor */
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+ PartialResourceList->PartialDescriptors[0].Type =
+ CmResourceTypeDeviceSpecific;
+ PartialResourceList->PartialDescriptors[0].ShareDisposition =
+ CmResourceShareUndetermined;
+
+ Ptr = (char *)(((ULONG_PTR)&PartialResourceList->PartialDescriptors[0]) +
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
+
+ /* Set instalation check data */
+ memcpy (Ptr, InstData, sizeof(CM_PNP_BIOS_INSTALLATION_CHECK));
+ Ptr += sizeof(CM_PNP_BIOS_INSTALLATION_CHECK);
+
+ /* Copy device nodes */
+ FoundNodeCount = 0;
+ PnpBufferSize = sizeof(CM_PNP_BIOS_INSTALLATION_CHECK);
+ for (i = 0; i < 0xFF; i++)
+ {
+ NodeNumber = (UCHAR)i;
+
+ x = PnpBiosGetDeviceNode(&NodeNumber, (PVOID)DISKREADBUFFER);
+ if (x == 0)
+ {
+ DeviceNode = (PCM_PNP_BIOS_DEVICE_NODE)DISKREADBUFFER;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Node: %u Size %u (0x%x)\n",
+ DeviceNode->Node,
+ DeviceNode->Size,
+ DeviceNode->Size));
+
+ memcpy (Ptr,
+ DeviceNode,
+ DeviceNode->Size);
+
+ Ptr += DeviceNode->Size;
+ PnpBufferSize += DeviceNode->Size;
+
+ FoundNodeCount++;
+ if (FoundNodeCount >= NodeCount)
+ break;
+ }
+ }
+
+ /* Set real data size */
+ PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
+ PnpBufferSize;
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + PnpBufferSize;
+
+ DbgPrint((DPRINT_HWDETECT, "Real buffer size: %u\n", PnpBufferSize));
+ DbgPrint((DPRINT_HWDETECT, "Resource size: %u\n", Size));
+
+ FldrSetConfigurationData(BusKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+}
+
+
+
+static VOID
+SetHarddiskConfigurationData(PCONFIGURATION_COMPONENT_DATA DiskKey,
+ ULONG DriveNumber)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry;
+ EXTENDED_GEOMETRY ExtGeometry;
+ GEOMETRY Geometry;
+ ULONG Size;
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ sizeof(CM_DISK_GEOMETRY_DEVICE_DATA);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate a full resource descriptor\n"));
+ return;
+ }
+
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+ PartialResourceList->PartialDescriptors[0].Type =
+ CmResourceTypeDeviceSpecific;
+// PartialResourceList->PartialDescriptors[0].ShareDisposition =
+// PartialResourceList->PartialDescriptors[0].Flags =
+ PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
+ sizeof(CM_DISK_GEOMETRY_DEVICE_DATA);
+
+ /* Get pointer to geometry data */
+ DiskGeometry = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
+
+ /* Get the disk geometry */
+ ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY);
+ if (DiskGetExtendedDriveParameters(DriveNumber, &ExtGeometry, ExtGeometry.Size))
+ {
+ DiskGeometry->BytesPerSector = ExtGeometry.BytesPerSector;
+ DiskGeometry->NumberOfCylinders = ExtGeometry.Cylinders;
+ DiskGeometry->SectorsPerTrack = ExtGeometry.SectorsPerTrack;
+ DiskGeometry->NumberOfHeads = ExtGeometry.Heads;
+ }
+ else if(MachDiskGetDriveGeometry(DriveNumber, &Geometry))
+ {
+ DiskGeometry->BytesPerSector = Geometry.BytesPerSector;
+ DiskGeometry->NumberOfCylinders = Geometry.Cylinders;
+ DiskGeometry->SectorsPerTrack = Geometry.Sectors;
+ DiskGeometry->NumberOfHeads = Geometry.Heads;
+ }
+ else
+ {
+ DbgPrint((DPRINT_HWDETECT, "Reading disk geometry failed\n"));
+ MmHeapFree(PartialResourceList);
+ return;
+ }
+ DbgPrint((DPRINT_HWDETECT,
+ "Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
+ DriveNumber,
+ DiskGeometry->NumberOfCylinders,
+ DiskGeometry->NumberOfHeads,
+ DiskGeometry->SectorsPerTrack,
+ DiskGeometry->BytesPerSector));
+
+ FldrSetConfigurationData(DiskKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+}
+
+
+static VOID
+SetHarddiskIdentifier(PCONFIGURATION_COMPONENT_DATA DiskKey,
+ ULONG DriveNumber)
+{
+ PMASTER_BOOT_RECORD Mbr;
+ ULONG *Buffer;
+ ULONG i;
+ ULONG Checksum;
+ ULONG Signature;
+ CHAR Identifier[20];
+ CHAR ArcName[256];
+
+ /* Read the MBR */
+ if (!MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, (PVOID)DISKREADBUFFER))
+ {
+ DbgPrint((DPRINT_HWDETECT, "Reading MBR failed\n"));
+ return;
+ }
+
+ Buffer = (ULONG*)DISKREADBUFFER;
+ Mbr = (PMASTER_BOOT_RECORD)DISKREADBUFFER;
+
+ Signature = Mbr->Signature;
+ DbgPrint((DPRINT_HWDETECT, "Signature: %x\n", Signature));
+
+ /* Calculate the MBR checksum */
+ Checksum = 0;
+ for (i = 0; i < 128; i++)
+ {
+ Checksum += Buffer[i];
+ }
+ Checksum = ~Checksum + 1;
+ DbgPrint((DPRINT_HWDETECT, "Checksum: %x\n", Checksum));
+
+ /* Fill out the ARC disk block */
+ reactos_arc_disk_info[reactos_disk_count].Signature = Signature;
+ reactos_arc_disk_info[reactos_disk_count].CheckSum = Checksum;
+ sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)", reactos_disk_count);
+ strcpy(reactos_arc_strings[reactos_disk_count], ArcName);
+ reactos_arc_disk_info[reactos_disk_count].ArcName =
+ reactos_arc_strings[reactos_disk_count];
+ reactos_disk_count++;
+
+ /* Convert checksum and signature to identifier string */
+ Identifier[0] = Hex[(Checksum >> 28) & 0x0F];
+ Identifier[1] = Hex[(Checksum >> 24) & 0x0F];
+ Identifier[2] = Hex[(Checksum >> 20) & 0x0F];
+ Identifier[3] = Hex[(Checksum >> 16) & 0x0F];
+ Identifier[4] = Hex[(Checksum >> 12) & 0x0F];
+ Identifier[5] = Hex[(Checksum >> 8) & 0x0F];
+ Identifier[6] = Hex[(Checksum >> 4) & 0x0F];
+ Identifier[7] = Hex[Checksum & 0x0F];
+ Identifier[8] = '-';
+ Identifier[9] = Hex[(Signature >> 28) & 0x0F];
+ Identifier[10] = Hex[(Signature >> 24) & 0x0F];
+ Identifier[11] = Hex[(Signature >> 20) & 0x0F];
+ Identifier[12] = Hex[(Signature >> 16) & 0x0F];
+ Identifier[13] = Hex[(Signature >> 12) & 0x0F];
+ Identifier[14] = Hex[(Signature >> 8) & 0x0F];
+ Identifier[15] = Hex[(Signature >> 4) & 0x0F];
+ Identifier[16] = Hex[Signature & 0x0F];
+ Identifier[17] = '-';
+ Identifier[18] = 'A';
+ Identifier[19] = 0;
+ DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier));
+
+ /* Set identifier */
+ FldrSetIdentifier(DiskKey, Identifier);
+}
+
+static ULONG
+GetFloppyCount(VOID)
+{
+ UCHAR Data;
+
+ WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10);
+ Data = READ_PORT_UCHAR((PUCHAR)0x71);
+
+ return ((Data & 0xF0) ? 1 : 0) + ((Data & 0x0F) ? 1 : 0);
+}
+
+
+static UCHAR
+GetFloppyType(UCHAR DriveNumber)
+{
+ UCHAR Data;
+
+ WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10);
+ Data = READ_PORT_UCHAR((PUCHAR)0x71);
+
+ if (DriveNumber == 0)
+ return Data >> 4;
+ else if (DriveNumber == 1)
+ return Data & 0x0F;
+
+ return 0;
+}
+
+
+static PVOID
+GetInt1eTable(VOID)
+{
+ PUSHORT SegPtr = (PUSHORT)0x7A;
+ PUSHORT OfsPtr = (PUSHORT)0x78;
+
+ return (PVOID)((ULONG_PTR)(((ULONG)(*SegPtr)) << 4) + (ULONG)(*OfsPtr));
+}
+
+
+static VOID
+DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PCM_FLOPPY_DEVICE_DATA FloppyData;
+ CHAR Identifier[20];
+ PCONFIGURATION_COMPONENT_DATA PeripheralKey;
+ ULONG Size;
+ ULONG FloppyNumber;
+ UCHAR FloppyType;
+ ULONG MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880};
+ PUCHAR Ptr;
+
+ for (FloppyNumber = 0; FloppyNumber < 2; FloppyNumber++)
+ {
+ FloppyType = GetFloppyType(FloppyNumber);
+
+ if ((FloppyType > 5) || (FloppyType == 0))
+ continue;
+
+ DiskResetController(FloppyNumber);
+
+ Ptr = GetInt1eTable();
+
+ FldrCreateComponentKey(ControllerKey,
+ L"FloppyDiskPeripheral",
+ FloppyNumber,
+ PeripheralClass,
+ FloppyDiskPeripheral,
+ &PeripheralKey);
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(PeripheralKey,
+ Input | Output,
+ FloppyNumber,
+ 0xFFFFFFFF);
+
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ sizeof(CM_FLOPPY_DEVICE_DATA);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(CM_FLOPPY_DEVICE_DATA);
+
+ FloppyData = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
+ FloppyData->Version = 2;
+ FloppyData->Revision = 0;
+ FloppyData->MaxDensity = MaxDensity[FloppyType];
+ FloppyData->MountDensity = 0;
+ RtlCopyMemory(&FloppyData->StepRateHeadUnloadTime,
+ Ptr,
+ 11);
+ FloppyData->MaximumTrackValue = (FloppyType == 1) ? 39 : 79;
+ FloppyData->DataTransferRate = 0;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(PeripheralKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Set 'Identifier' value */
+ sprintf(Identifier, "FLOPPY%ld", FloppyNumber + 1);
+ FldrSetIdentifier(PeripheralKey, Identifier);
+ }
+}
+
+
+static VOID
+DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA BusKey,
+ PCONFIGURATION_COMPONENT_DATA ControllerKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ ULONG Size;
+ ULONG FloppyCount;
+
+ FloppyCount = GetFloppyCount();
+ DbgPrint((DPRINT_HWDETECT,
+ "Floppy count: %u\n",
+ FloppyCount));
+
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+ memset(PartialResourceList, 0, Size);
+
+ /* Initialize resource descriptor */
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 3;
+
+ /* Set IO Port */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypePort;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ PartialDescriptor->u.Port.Start.LowPart = 0x03F0;
+ PartialDescriptor->u.Port.Start.HighPart = 0x0;
+ PartialDescriptor->u.Port.Length = 8;
+
+ /* Set Interrupt */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
+ PartialDescriptor->Type = CmResourceTypeInterrupt;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
+ PartialDescriptor->u.Interrupt.Level = 6;
+ PartialDescriptor->u.Interrupt.Vector = 6;
+ PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
+
+ /* Set DMA channel */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[2];
+ PartialDescriptor->Type = CmResourceTypeDma;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = 0;
+ PartialDescriptor->u.Dma.Channel = 2;
+ PartialDescriptor->u.Dma.Port = 0;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(ControllerKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ if (FloppyCount) DetectBiosFloppyPeripheral(ControllerKey);
+}
+
+static VOID
+DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
+ PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_INT13_DRIVE_PARAMETER Int13Drives;
+ GEOMETRY Geometry;
+ PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey;
+ ULONG DiskCount;
+ ULONG Size;
+ ULONG i;
+ BOOLEAN Changed;
+
+ /* Count the number of visible drives */
+ DiskReportError(FALSE);
+ DiskCount = 0;
+
+ /* There are some really broken BIOSes out there. There are even BIOSes
+ * that happily report success when you ask them to read from non-existent
+ * harddisks. So, we set the buffer to known contents first, then try to
+ * read. If the BIOS reports success but the buffer contents haven't
+ * changed then we fail anyway */
+ memset((PVOID) DISKREADBUFFER, 0xcd, 512);
+ while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER))
+ {
+ Changed = FALSE;
+ for (i = 0; ! Changed && i < 512; i++)
+ {
+ Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd;
+ }
+ if (! Changed)
+ {
+ DbgPrint((DPRINT_HWDETECT, "BIOS reports success for disk %d but data didn't change\n",
+ (int)DiskCount));
+ break;
+ }
+ DiskCount++;
+ memset((PVOID) DISKREADBUFFER, 0xcd, 512);
+ }
+ DiskReportError(TRUE);
+ DbgPrint((DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n",
+ (int)DiskCount, (DiskCount == 1) ? "": "s"));
+
+ FldrCreateComponentKey(BusKey,
+ L"DiskController",
+ 0,
+ ControllerClass,
+ DiskController,
+ &ControllerKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: DiskController\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ Output | Input | Removable,
+ 0,
+ 0xFFFFFFFF);
+
+ DetectBiosFloppyController(BusKey, ControllerKey);
+
+ /* Allocate resource descriptor */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+ PartialResourceList->PartialDescriptors[0].Type = CmResourceTypeDeviceSpecific;
+ PartialResourceList->PartialDescriptors[0].ShareDisposition = 0;
+ PartialResourceList->PartialDescriptors[0].Flags = 0;
+ PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
+ sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
+
+ /* Get harddisk Int13 geometry data */
+ Int13Drives = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
+ for (i = 0; i < DiskCount; i++)
+ {
+ if (MachDiskGetDriveGeometry(0x80 + i, &Geometry))
+ {
+ Int13Drives[i].DriveSelect = 0x80 + i;
+ Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
+ Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
+ Int13Drives[i].MaxHeads = Geometry.Heads - 1;
+ Int13Drives[i].NumberDrives = DiskCount;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
+ 0x80 + i,
+ Geometry.Cylinders - 1,
+ Geometry.Heads -1,
+ Geometry.Sectors,
+ Geometry.BytesPerSector));
+ }
+ }
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(SystemKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Create and fill subkey for each harddisk */
+ for (i = 0; i < DiskCount; i++)
+ {
+ /* Create disk key */
+ FldrCreateComponentKey(ControllerKey,
+ L"DiskPeripheral",
+ i,
+ PeripheralClass,
+ DiskPeripheral,
+ &DiskKey);
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(DiskKey,
+ Output | Input,
+ 0,
+ 0xFFFFFFFF);
+
+ /* Set disk values */
+ SetHarddiskConfigurationData(DiskKey, 0x80 + i);
+ SetHarddiskIdentifier(DiskKey, 0x80 + i);
+ }
+}
+
+static VOID
+InitializeSerialPort(ULONG Port,
+ ULONG LineControl)
+{
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 3, 0x80); /* set DLAB on */
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port, 0x60); /* speed LO byte */
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 1, 0); /* speed HI byte */
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 3, LineControl);
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 1, 0); /* set comm and DLAB to 0 */
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4, 0x09); /* DR int enable */
+ READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 5); /* clear error bits */
+}
+
+
+static ULONG
+DetectSerialMouse(ULONG Port)
+{
+ CHAR Buffer[4];
+ ULONG i;
+ ULONG TimeOut;
+ UCHAR LineControl;
+
+ /* Shutdown mouse or something like that */
+ LineControl = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4);
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4, (LineControl & ~0x02) | 0x01);
+ StallExecutionProcessor(100000);
+
+ /*
+ * Clear buffer
+ * Maybe there is no serial port although BIOS reported one (this
+ * is the case on Apple hardware), or the serial port is misbehaving,
+ * therefore we must give up after some time.
+ */
+ TimeOut = 200;
+ while (READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 5) & 0x01)
+ {
+ if (--TimeOut == 0)
+ return MOUSE_TYPE_NONE;
+ READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port);
+ }
+
+ /*
+ * Send modem control with 'Data Terminal Ready', 'Request To Send' and
+ * 'Output Line 2' message. This enables mouse to identify.
+ */
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4, 0x0b);
+
+ /* Wait 10 milliseconds for the mouse getting ready */
+ StallExecutionProcessor(10000);
+
+ /* Read first four bytes, which contains Microsoft Mouse signs */
+ TimeOut = 200;
+ for (i = 0; i < 4; i++)
+ {
+ while (((READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 5) & 1) == 0) && (TimeOut > 0))
+ {
+ StallExecutionProcessor(1000);
+ --TimeOut;
+ if (TimeOut == 0)
+ return MOUSE_TYPE_NONE;
+ }
+ Buffer[i] = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port);
+ }
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Mouse data: %x %x %x %x\n",
+ Buffer[0],Buffer[1],Buffer[2],Buffer[3]));
+
+ /* Check that four bytes for signs */
+ for (i = 0; i < 4; ++i)
+ {
+ if (Buffer[i] == 'B')
+ {
+ /* Sign for Microsoft Ballpoint */
+// DbgPrint("Microsoft Ballpoint device detected\n");
+// DbgPrint("THIS DEVICE IS NOT SUPPORTED, YET\n");
+ return MOUSE_TYPE_NONE;
+ }
+ else if (Buffer[i] == 'M')
+ {
+ /* Sign for Microsoft Mouse protocol followed by button specifier */
+ if (i == 3)
+ {
+ /* Overflow Error */
+ return MOUSE_TYPE_NONE;
+ }
+
+ switch (Buffer[i + 1])
+ {
+ case '3':
+ DbgPrint((DPRINT_HWDETECT,
+ "Microsoft Mouse with 3-buttons detected\n"));
+ return MOUSE_TYPE_LOGITECH;
+
+ case 'Z':
+ DbgPrint((DPRINT_HWDETECT,
+ "Microsoft Wheel Mouse detected\n"));
+ return MOUSE_TYPE_WHEELZ;
+
+ /* case '2': */
+ default:
+ DbgPrint((DPRINT_HWDETECT,
+ "Microsoft Mouse with 2-buttons detected\n"));
+ return MOUSE_TYPE_MICROSOFT;
+ }
+ }
+ }
+
+ return MOUSE_TYPE_NONE;
+}
+
+
+static ULONG
+GetSerialMousePnpId(ULONG Port, char *Buffer)
+{
+ ULONG TimeOut;
+ ULONG i = 0;
+ char c;
+ char x;
+
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4, 0x09);
+
+ /* Wait 10 milliseconds for the mouse getting ready */
+ StallExecutionProcessor(10000);
+
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 4, 0x0b);
+
+ StallExecutionProcessor(10000);
+
+ for (;;)
+ {
+ TimeOut = 200;
+ while (((READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 5) & 1) == 0) && (TimeOut > 0))
+ {
+ StallExecutionProcessor(1000);
+ --TimeOut;
+ if (TimeOut == 0)
+ {
+ return 0;
+ }
+ }
+
+ c = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port);
+ if (c == 0x08 || c == 0x28)
+ break;
+ }
+
+ Buffer[i++] = c;
+ x = c + 1;
+
+ for (;;)
+ {
+ TimeOut = 200;
+ while (((READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port + 5) & 1) == 0) && (TimeOut > 0))
+ {
+ StallExecutionProcessor(1000);
+ --TimeOut;
+ if (TimeOut == 0)
+ return 0;
+ }
+ c = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Port);
+ Buffer[i++] = c;
+ if (c == x)
+ break;
+ if (i >= 256)
+ break;
+ }
+
+ return i;
+}
+
+
+static VOID
+DetectSerialPointerPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey,
+ ULONG Base)
+{
+ CM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ char Buffer[256];
+ CHAR Identifier[256];
+ PCONFIGURATION_COMPONENT_DATA PeripheralKey;
+ ULONG MouseType;
+ ULONG Length;
+ ULONG i;
+ ULONG j;
+ ULONG k;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "DetectSerialPointerPeripheral()\n"));
+
+ Identifier[0] = 0;
+
+ InitializeSerialPort(Base, 2);
+ MouseType = DetectSerialMouse(Base);
+
+ if (MouseType != MOUSE_TYPE_NONE)
+ {
+ Length = GetSerialMousePnpId(Base, Buffer);
+ DbgPrint((DPRINT_HWDETECT,
+ "PnP ID length: %u\n",
+ Length));
+
+ if (Length != 0)
+ {
+ /* Convert PnP sting to ASCII */
+ if (Buffer[0] == 0x08)
+ {
+ for (i = 0; i < Length; i++)
+ Buffer[i] += 0x20;
+ }
+ Buffer[Length] = 0;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "PnP ID string: %s\n",
+ Buffer));
+
+ /* Copy PnpId string */
+ for (i = 0; i < 7; i++)
+ {
+ Identifier[i] = Buffer[3+i];
+ }
+ memcpy(&Identifier[7],
+ L" - ",
+ 3 * sizeof(WCHAR));
+
+ /* Skip device serial number */
+ i = 10;
+ if (Buffer[i] == '\\')
+ {
+ for (j = ++i; i < Length; ++i)
+ {
+ if (Buffer[i] == '\\')
+ break;
+ }
+ if (i >= Length)
+ i -= 3;
+ }
+
+ /* Skip PnP class */
+ if (Buffer[i] == '\\')
+ {
+ for (j = ++i; i < Length; ++i)
+ {
+ if (Buffer[i] == '\\')
+ break;
+ }
+
+ if (i >= Length)
+ i -= 3;
+ }
+
+ /* Skip compatible PnP Id */
+ if (Buffer[i] == '\\')
+ {
+ for (j = ++i; i < Length; ++i)
+ {
+ if (Buffer[i] == '\\')
+ break;
+ }
+ if (Buffer[j] == '*')
+ ++j;
+ if (i >= Length)
+ i -= 3;
+ }
+
+ /* Get product description */
+ if (Buffer[i] == '\\')
+ {
+ for (j = ++i; i < Length; ++i)
+ {
+ if (Buffer[i] == ';')
+ break;
+ }
+ if (i >= Length)
+ i -= 3;
+ if (i > j + 1)
+ {
+ for (k = 0; k < i - j; k++)
+ {
+ Identifier[k + 10] = Buffer[k + j];
+ }
+ Identifier[10 + (i-j)] = 0;
+ }
+ }
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Identifier string: %s\n",
+ Identifier));
+ }
+
+ if (Length == 0 || strlen(Identifier) < 11)
+ {
+ switch (MouseType)
+ {
+ case MOUSE_TYPE_LOGITECH:
+ strcpy (Identifier,
+ "LOGITECH SERIAL MOUSE");
+ break;
+
+ case MOUSE_TYPE_WHEELZ:
+ strcpy (Identifier,
+ "MICROSOFT SERIAL MOUSE WITH WHEEL");
+ break;
+
+ case MOUSE_TYPE_MICROSOFT:
+ default:
+ strcpy (Identifier,
+ "MICROSOFT SERIAL MOUSE");
+ break;
+ }
+ }
+
+ /* Create 'PointerPeripheral' key */
+ FldrCreateComponentKey(ControllerKey,
+ L"PointerPeripheral",
+ 0,
+ PeripheralClass,
+ PointerPeripheral,
+ &PeripheralKey);
+ DbgPrint((DPRINT_HWDETECT,
+ "Created key: PointerPeripheral\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(PeripheralKey,
+ Input,
+ 0,
+ 0xFFFFFFFF);
+
+ /* Set 'Configuration Data' value */
+ memset(&PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST));
+ PartialResourceList.Version = 1;
+ PartialResourceList.Revision = 1;
+ PartialResourceList.Count = 0;
+
+ FldrSetConfigurationData(PeripheralKey,
+ &PartialResourceList,
+ sizeof(CM_PARTIAL_RESOURCE_LIST) -
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(PeripheralKey, Identifier);
+ }
+}
+
+
+static VOID
+DetectSerialPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PCM_SERIAL_DEVICE_DATA SerialDeviceData;
+ ULONG Irq[4] = {4, 3, 4, 3};
+ ULONG Base;
+ CHAR Buffer[80];
+ PUSHORT BasePtr;
+ ULONG ControllerNumber = 0;
+ PCONFIGURATION_COMPONENT_DATA ControllerKey;
+ ULONG i;
+ ULONG Size;
+
+ DbgPrint((DPRINT_HWDETECT, "DetectSerialPorts()\n"));
+
+ ControllerNumber = 0;
+ BasePtr = (PUSHORT)0x400;
+ for (i = 0; i < 4; i++, BasePtr++)
+ {
+ Base = (ULONG)*BasePtr;
+ if (Base == 0)
+ continue;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Found COM%u port at 0x%x\n",
+ i + 1,
+ Base));
+
+ /* Create controller key */
+ FldrCreateComponentKey(BusKey,
+ L"SerialController",
+ ControllerNumber,
+ ControllerClass,
+ SerialController,
+ &ControllerKey);
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ Output | Input | ConsoleIn | ConsoleOut,
+ ControllerNumber,
+ 0xFFFFFFFF);
+
+ /* Build full device descriptor */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) +
+ sizeof(CM_SERIAL_DEVICE_DATA);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ continue;
+ }
+ memset(PartialResourceList, 0, Size);
+
+ /* Initialize resource descriptor */
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 3;
+
+ /* Set IO Port */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypePort;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ PartialDescriptor->u.Port.Start.LowPart = Base;
+ PartialDescriptor->u.Port.Start.HighPart = 0x0;
+ PartialDescriptor->u.Port.Length = 7;
+
+ /* Set Interrupt */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
+ PartialDescriptor->Type = CmResourceTypeInterrupt;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
+ PartialDescriptor->u.Interrupt.Level = Irq[i];
+ PartialDescriptor->u.Interrupt.Vector = 0;
+ PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
+
+ /* Set serial data (device specific) */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[2];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = 0;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(CM_SERIAL_DEVICE_DATA);
+
+ SerialDeviceData =
+ (PCM_SERIAL_DEVICE_DATA)&PartialResourceList->PartialDescriptors[3];
+ SerialDeviceData->BaudClock = 1843200; /* UART Clock frequency (Hertz) */
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(ControllerKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Set 'Identifier' value */
+ sprintf(Buffer, "COM%ld", i + 1);
+ FldrSetIdentifier(ControllerKey, Buffer);
+ DbgPrint((DPRINT_HWDETECT,
+ "Created value: Identifier %s\n",
+ Buffer));
+
+ if (!Rs232PortInUse(Base))
+ {
+ /* Detect serial mouse */
+ DetectSerialPointerPeripheral(ControllerKey, Base);
+ }
+
+ ControllerNumber++;
+ }
+}
+
+
+static VOID
+DetectParallelPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ ULONG Irq[3] = {7, 5, (ULONG)-1};
+ CHAR Buffer[80];
+ PCONFIGURATION_COMPONENT_DATA ControllerKey;
+ PUSHORT BasePtr;
+ ULONG Base;
+ ULONG ControllerNumber;
+ ULONG i;
+ ULONG Size;
+
+ DbgPrint((DPRINT_HWDETECT, "DetectParallelPorts() called\n"));
+
+ ControllerNumber = 0;
+ BasePtr = (PUSHORT)0x408;
+ for (i = 0; i < 3; i++, BasePtr++)
+ {
+ Base = (ULONG)*BasePtr;
+ if (Base == 0)
+ continue;
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Parallel port %u: %x\n",
+ ControllerNumber,
+ Base));
+
+ /* Create controller key */
+ FldrCreateComponentKey(BusKey,
+ L"ParallelController",
+ ControllerNumber,
+ ControllerClass,
+ ParallelController,
+ &ControllerKey);
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ Output,
+ ControllerNumber,
+ 0xFFFFFFFF);
+
+ /* Build full device descriptor */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST);
+ if (Irq[i] != (ULONG)-1)
+ Size += sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
+
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ continue;
+ }
+ memset(PartialResourceList, 0, Size);
+
+ /* Initialize resource descriptor */
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = (Irq[i] != (ULONG)-1) ? 2 : 1;
+
+ /* Set IO Port */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypePort;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ PartialDescriptor->u.Port.Start.LowPart = Base;
+ PartialDescriptor->u.Port.Start.HighPart = 0x0;
+ PartialDescriptor->u.Port.Length = 3;
+
+ /* Set Interrupt */
+ if (Irq[i] != (ULONG)-1)
+ {
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
+ PartialDescriptor->Type = CmResourceTypeInterrupt;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
+ PartialDescriptor->u.Interrupt.Level = Irq[i];
+ PartialDescriptor->u.Interrupt.Vector = 0;
+ PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
+ }
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(ControllerKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Set 'Identifier' value */
+ sprintf(Buffer, "PARALLEL%ld", i + 1);
+ FldrSetIdentifier(ControllerKey, Buffer);
+ DbgPrint((DPRINT_HWDETECT,
+ "Created value: Identifier %s\n",
+ Buffer));
+
+ ControllerNumber++;
+ }
+
+ DbgPrint((DPRINT_HWDETECT, "DetectParallelPorts() done\n"));
+}
+
+
+static BOOLEAN
+DetectKeyboardDevice(VOID)
+{
+ UCHAR Status;
+ UCHAR Scancode;
+ ULONG Loops;
+ BOOLEAN Result = TRUE;
+
+ /* Identify device */
+ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA,
+ 0xF2);
+
+ /* Wait for reply */
+ for (Loops = 0; Loops < 100; Loops++)
+ {
+ StallExecutionProcessor(10000);
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) != 0)
+ break;
+ }
+
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0)
+ {
+ /* PC/XT keyboard or no keyboard */
+ Result = FALSE;
+ }
+
+ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+ if (Scancode != 0xFA)
+ {
+ /* No ACK received */
+ Result = FALSE;
+ }
+
+ StallExecutionProcessor(10000);
+
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0)
+ {
+ /* Found AT keyboard */
+ return Result;
+ }
+
+ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+ if (Scancode != 0xAB)
+ {
+ /* No 0xAB received */
+ Result = FALSE;
+ }
+
+ StallExecutionProcessor(10000);
+
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0)
+ {
+ /* No byte in buffer */
+ Result = FALSE;
+ }
+
+ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+ if (Scancode != 0x41)
+ {
+ /* No 0x41 received */
+ Result = FALSE;
+ }
+
+ /* Found MF-II keyboard */
+ return Result;
+}
+
+
+static VOID
+DetectKeyboardPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PCM_KEYBOARD_DEVICE_DATA KeyboardData;
+ PCONFIGURATION_COMPONENT_DATA PeripheralKey;
+ ULONG Size;
+
+ /* HACK: don't call DetectKeyboardDevice() as it fails in Qemu 0.8.2 */
+ if (TRUE || DetectKeyboardDevice())
+ {
+ /* Create controller key */
+ FldrCreateComponentKey(ControllerKey,
+ L"KeyboardPeripheral",
+ 0,
+ PeripheralClass,
+ KeyboardPeripheral,
+ &PeripheralKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: KeyboardPeripheral\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(PeripheralKey,
+ Input | ConsoleIn,
+ 0,
+ 0xFFFFFFFF);
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ sizeof(CM_KEYBOARD_DEVICE_DATA);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(CM_KEYBOARD_DEVICE_DATA);
+
+ KeyboardData = (PCM_KEYBOARD_DEVICE_DATA)(PartialDescriptor + 1);
+ KeyboardData->Version = 1;
+ KeyboardData->Revision = 1;
+ KeyboardData->Type = 4;
+ KeyboardData->Subtype = 0;
+ KeyboardData->KeyboardFlags = 0x20;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(PeripheralKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(PeripheralKey, "PCAT_ENHANCED");
+ }
+}
+
+
+static VOID
+DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PCONFIGURATION_COMPONENT_DATA ControllerKey;
+ ULONG Size;
+
+ /* Create controller key */
+ FldrCreateComponentKey(BusKey,
+ L"KeyboardController",
+ 0,
+ ControllerClass,
+ KeyboardController,
+ &ControllerKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: KeyboardController\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ Input | ConsoleIn,
+ 0,
+ 0xFFFFFFFF);
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
+ 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 3;
+
+ /* Set Interrupt */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeInterrupt;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
+ PartialDescriptor->u.Interrupt.Level = 1;
+ PartialDescriptor->u.Interrupt.Vector = 0;
+ PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
+
+ /* Set IO Port 0x60 */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
+ PartialDescriptor->Type = CmResourceTypePort;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ PartialDescriptor->u.Port.Start.LowPart = 0x60;
+ PartialDescriptor->u.Port.Start.HighPart = 0x0;
+ PartialDescriptor->u.Port.Length = 1;
+
+ /* Set IO Port 0x64 */
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[2];
+ PartialDescriptor->Type = CmResourceTypePort;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ PartialDescriptor->u.Port.Start.LowPart = 0x64;
+ PartialDescriptor->u.Port.Start.HighPart = 0x0;
+ PartialDescriptor->u.Port.Length = 1;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(ControllerKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ DetectKeyboardPeripheral(ControllerKey);
+}
+
+
+static VOID
+PS2ControllerWait(VOID)
+{
+ ULONG Timeout;
+ UCHAR Status;
+
+ for (Timeout = 0; Timeout < CONTROLLER_TIMEOUT; Timeout++)
+ {
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_INPUT_BUFFER_FULL) == 0)
+ return;
+
+ /* Sleep for one millisecond */
+ StallExecutionProcessor(1000);
+ }
+}
+
+
+static BOOLEAN
+DetectPS2AuxPort(VOID)
+{
+#if 1
+ /* Current detection is too unreliable. Just do as if
+ * the PS/2 aux port is always present
+ */
+ return TRUE;
+#else
+ ULONG Loops;
+ UCHAR Status;
+
+ /* Put the value 0x5A in the output buffer using the
+ * "WriteAuxiliary Device Output Buffer" command (0xD3).
+ * Poll the Status Register for a while to see if the value really turns up
+ * in the Data Register. If the KEYBOARD_STATUS_MOUSE_OBF bit is also set
+ * to 1 in the Status Register, we assume this controller has an
+ * Auxiliary Port (a.k.a. Mouse Port).
+ */
+ PS2ControllerWait();
+ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_CONTROL,
+ CONTROLLER_COMMAND_WRITE_MOUSE_OUTPUT_BUFFER);
+ PS2ControllerWait();
+
+ /* 0x5A is a random dummy value */
+ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA,
+ 0x5A);
+
+ for (Loops = 0; Loops < 10; Loops++)
+ {
+ StallExecutionProcessor(10000);
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) != 0)
+ break;
+ }
+
+ READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+
+ return (Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL);
+#endif
+}
+
+
+static BOOLEAN
+DetectPS2AuxDevice(VOID)
+{
+ UCHAR Scancode;
+ UCHAR Status;
+ ULONG Loops;
+ BOOLEAN Result = TRUE;
+
+ PS2ControllerWait();
+ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_CONTROL,
+ CONTROLLER_COMMAND_WRITE_MOUSE);
+ PS2ControllerWait();
+
+ /* Identify device */
+ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA,
+ 0xF2);
+
+ /* Wait for reply */
+ for (Loops = 0; Loops < 100; Loops++)
+ {
+ StallExecutionProcessor(10000);
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) != 0)
+ break;
+ }
+
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL) == 0)
+ Result = FALSE;
+
+ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+ if (Scancode != 0xFA)
+ Result = FALSE;
+
+ StallExecutionProcessor(10000);
+
+ Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS);
+ if ((Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL) == 0)
+ Result = FALSE;
+
+ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA);
+ if (Scancode != 0x00)
+ Result = FALSE;
+
+ return Result;
+}
+
+
+static VOID
+DetectPS2Mouse(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ CM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCONFIGURATION_COMPONENT_DATA ControllerKey;
+ PCONFIGURATION_COMPONENT_DATA PeripheralKey;
+
+ if (DetectPS2AuxPort())
+ {
+ DbgPrint((DPRINT_HWDETECT, "Detected PS2 port\n"));
+
+ /* Create controller key */
+ FldrCreateComponentKey(BusKey,
+ L"PointerController",
+ 0,
+ ControllerClass,
+ PointerController,
+ &ControllerKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: PointerController\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ Input,
+ 0,
+ 0xFFFFFFFF);
+
+ memset(&PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST));
+
+ /* Initialize resource descriptor */
+ PartialResourceList.Version = 1;
+ PartialResourceList.Revision = 1;
+ PartialResourceList.Count = 1;
+
+ /* Set Interrupt */
+ PartialResourceList.PartialDescriptors[0].Type = CmResourceTypeInterrupt;
+ PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareUndetermined;
+ PartialResourceList.PartialDescriptors[0].Flags = CM_RESOURCE_INTERRUPT_LATCHED;
+ PartialResourceList.PartialDescriptors[0].u.Interrupt.Level = 12;
+ PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 0;
+ PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(ControllerKey,
+ &PartialResourceList,
+ sizeof(CM_PARTIAL_RESOURCE_LIST));
+
+ if (DetectPS2AuxDevice())
+ {
+ DbgPrint((DPRINT_HWDETECT, "Detected PS2 mouse\n"));
+
+ /* Create peripheral key */
+ FldrCreateComponentKey(ControllerKey,
+ L"PointerPeripheral",
+ 0,
+ ControllerClass,
+ PointerPeripheral,
+ &PeripheralKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: PointerPeripheral\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(PeripheralKey,
+ Input,
+ 0,
+ 0xFFFFFFFF);
+
+ /* Initialize resource descriptor */
+ memset(&PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST));
+ PartialResourceList.Version = 1;
+ PartialResourceList.Revision = 1;
+ PartialResourceList.Count = 0;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(PeripheralKey,
+ &PartialResourceList,
+ sizeof(CM_PARTIAL_RESOURCE_LIST) -
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(PeripheralKey, "MICROSOFT PS2 MOUSE");
+ }
+ }
+}
+
+
+static VOID
+DetectDisplayController(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ CHAR Buffer[80];
+ PCONFIGURATION_COMPONENT_DATA ControllerKey;
+ USHORT VesaVersion;
+
+ FldrCreateComponentKey(BusKey,
+ L"DisplayController",
+ 0,
+ ControllerClass,
+ DisplayController,
+ &ControllerKey);
+ DbgPrint((DPRINT_HWDETECT, "Created key: DisplayController\\0\n"));
+
+ /* Set 'ComponentInformation' value */
+ FldrSetComponentInformation(ControllerKey,
+ 0x00,
+ 0,
+ 0xFFFFFFFF);
+
+ /* FIXME: Set 'ComponentInformation' value */
+
+ VesaVersion = BiosIsVesaSupported();
+ if (VesaVersion != 0)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "VESA version %c.%c\n",
+ (VesaVersion >> 8) + '0',
+ (VesaVersion & 0xFF) + '0'));
+ }
+ else
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "VESA not supported\n"));
+ }
+
+ if (VesaVersion >= 0x0200)
+ {
+ strcpy(Buffer,
+ "VBE Display");
+ }
+ else
+ {
+ strcpy(Buffer,
+ "VGA Display");
+ }
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(ControllerKey, Buffer);
+
+ /* FIXME: Add display peripheral (monitor) data */
+}
+
+
+static VOID
+DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCONFIGURATION_COMPONENT_DATA BusKey;
+ ULONG Size;
+
+ /* Create new bus key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BusKey);
+
+ /* Set 'Component Information' value similar to my NT4 box */
+ FldrSetComponentInformation(BusKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(BusKey, "ISA");
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) -
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 0;
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(BusKey, PartialResourceList, Size);
+ MmHeapFree(PartialResourceList);
+
+ /* Detect ISA/BIOS devices */
+ DetectBiosDisks(SystemKey, BusKey);
+
+ DetectSerialPorts(BusKey);
+
+ DetectParallelPorts(BusKey);
+
+ DetectKeyboardController(BusKey);
+
+ DetectPS2Mouse(BusKey);
+
+ DetectDisplayController(BusKey);
+
+ /* FIXME: Detect more ISA devices */
+}
+
+
+PCONFIGURATION_COMPONENT_DATA
+PcHwDetect(VOID)
+{
+ PCONFIGURATION_COMPONENT_DATA SystemKey;
+ ULONG BusNumber = 0;
+
+ DbgPrint((DPRINT_HWDETECT, "DetectHardware()\n"));
+
+ /* Create the 'System' key */
+ FldrCreateSystemKey(&SystemKey);
+
+ /* Set empty component information */
+ FldrSetComponentInformation(SystemKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Detect buses */
+ DetectPciBios(SystemKey, &BusNumber);
+ DetectApmBios(SystemKey, &BusNumber);
+ DetectPnpBios(SystemKey, &BusNumber);
+ DetectIsaBios(SystemKey, &BusNumber);
+ DetectAcpiBios(SystemKey, &BusNumber);
+
+ DbgPrint((DPRINT_HWDETECT, "DetectHardware() Done\n"));
+
+ return SystemKey;
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2004 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+#include <debug.h>
+
+BOOLEAN AcpiPresent = FALSE;
+
+static PRSDP_DESCRIPTOR
+FindAcpiBios(VOID)
+{
+ PUCHAR Ptr;
+
+ /* Find the 'Root System Descriptor Table Pointer' */
+ Ptr = (PUCHAR)0xE0000;
+ while ((ULONG_PTR)Ptr < 0x100000)
+ {
+ if (!memcmp(Ptr, "RSD PTR ", 8))
+ {
+ DbgPrint((DPRINT_HWDETECT, "ACPI supported\n"));
+
+ return (PRSDP_DESCRIPTOR)Ptr;
+ }
+
+ Ptr = (PUCHAR)((ULONG_PTR)Ptr + 0x10);
+ }
+
+ DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n"));
+
+ return NULL;
+}
+
+
+VOID
+DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCONFIGURATION_COMPONENT_DATA BiosKey;
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PRSDP_DESCRIPTOR Rsdp;
+ PACPI_BIOS_DATA AcpiBiosData;
+ BIOS_MEMORY_MAP BiosMemoryMap[32];
+ ULONG BiosMemoryMapEntryCount, TableSize;
+
+ Rsdp = FindAcpiBios();
+
+ if (Rsdp)
+ {
+ /* Set up the flag in the loader block */
+ AcpiPresent = TRUE;
+ LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE;
+
+ /* Create new bus key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BiosKey);
+
+ /* Set 'Component Information' */
+ FldrSetComponentInformation(BiosKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Get BIOS memory map */
+ RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
+ BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap,
+ sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP));
+
+ /* Calculate the table size */
+ TableSize = BiosMemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP) +
+ sizeof(ACPI_BIOS_DATA) - sizeof(BIOS_MEMORY_MAP);
+
+ /* Set 'Configuration Data' value */
+ PartialResourceList =
+ MmHeapAlloc(sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize);
+ memset(PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize);
+ PartialResourceList->Version = 0;
+ PartialResourceList->Revision = 0;
+ PartialResourceList->Count = 1;
+
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = TableSize;
+
+ /* Fill the table */
+ AcpiBiosData = (PACPI_BIOS_DATA)&PartialResourceList->PartialDescriptors[1];
+ AcpiBiosData->RSDTAddress.LowPart = Rsdp->rsdt_physical_address;
+ AcpiBiosData->Count = BiosMemoryMapEntryCount;
+ memcpy(AcpiBiosData->MemoryMap, BiosMemoryMap,
+ BiosMemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP));
+
+ DbgPrint((DPRINT_HWDETECT, "RSDT %p, data size %x\n", Rsdp->rsdt_physical_address,
+ TableSize));
+
+ FldrSetConfigurationData(BiosKey,
+ PartialResourceList,
+ sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize
+ );
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(BiosKey, "ACPI BIOS");
+ MmFreeMemory(PartialResourceList);
+ }
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2004 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+static BOOLEAN
+FindApmBios(VOID)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+
+ RegsIn.b.ah = 0x53;
+ RegsIn.b.al = 0x00;
+ RegsIn.w.bx = 0x0000;
+
+ Int386(0x15, &RegsIn, &RegsOut);
+
+ if (INT386_SUCCESS(RegsOut))
+ {
+ DbgPrint((DPRINT_HWDETECT, "Found APM BIOS\n"));
+ DbgPrint((DPRINT_HWDETECT, "AH: %x\n", RegsOut.b.ah));
+ DbgPrint((DPRINT_HWDETECT, "AL: %x\n", RegsOut.b.al));
+ DbgPrint((DPRINT_HWDETECT, "BH: %x\n", RegsOut.b.bh));
+ DbgPrint((DPRINT_HWDETECT, "BL: %x\n", RegsOut.b.bl));
+ DbgPrint((DPRINT_HWDETECT, "CX: %x\n", RegsOut.w.cx));
+
+ return TRUE;
+ }
+
+ DbgPrint((DPRINT_HWDETECT, "No APM BIOS found\n"));
+
+ return FALSE;
+}
+
+
+VOID
+DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCONFIGURATION_COMPONENT_DATA BiosKey;
+ CM_PARTIAL_RESOURCE_LIST PartialResourceList;
+
+ if (FindApmBios())
+ {
+ /* Create new bus key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BiosKey);
+
+ /* Set 'Component Information' */
+ FldrSetComponentInformation(BiosKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Set 'Configuration Data' value */
+ memset(&PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST));
+ PartialResourceList.Version = 0;
+ PartialResourceList.Revision = 0;
+ PartialResourceList.Count = 0;
+ FldrSetConfigurationData(BiosKey,
+ &PartialResourceList,
+ sizeof(CM_PARTIAL_RESOURCE_LIST) -
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(BiosKey, "APM");
+ }
+
+ /* FIXME: Add configuration data */
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2004 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+typedef struct _ROUTING_SLOT
+{
+ UCHAR BusNumber;
+ UCHAR DeviceNumber;
+ UCHAR LinkA;
+ USHORT BitmapA;
+ UCHAR LinkB;
+ USHORT BitmapB;
+ UCHAR LinkC;
+ USHORT BitmapC;
+ UCHAR LinkD;
+ USHORT BitmapD;
+ UCHAR SlotNumber;
+ UCHAR Reserved;
+} __attribute__((packed)) ROUTING_SLOT, *PROUTING_SLOT;
+
+typedef struct _PCI_IRQ_ROUTING_TABLE
+{
+ ULONG Signature;
+ USHORT Version;
+ USHORT Size;
+ UCHAR RouterBus;
+ UCHAR RouterSlot;
+ USHORT ExclusiveIRQs;
+ ULONG CompatibleRouter;
+ ULONG MiniportData;
+ UCHAR Reserved[11];
+ UCHAR Checksum;
+ ROUTING_SLOT Slot[1];
+} __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE;
+
+typedef struct _PCI_REGISTRY_INFO
+{
+ UCHAR MajorRevision;
+ UCHAR MinorRevision;
+ UCHAR NoBuses;
+ UCHAR HardwareMechanism;
+} PCI_REGISTRY_INFO, *PPCI_REGISTRY_INFO;
+
+static PPCI_IRQ_ROUTING_TABLE
+GetPciIrqRoutingTable(VOID)
+{
+ PPCI_IRQ_ROUTING_TABLE Table;
+ PUCHAR Ptr;
+ ULONG Sum;
+ ULONG i;
+
+ Table = (PPCI_IRQ_ROUTING_TABLE)0xF0000;
+ while ((ULONG_PTR)Table < 0x100000)
+ {
+ if (Table->Signature == 0x52495024)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Found signature\n"));
+
+ Ptr = (PUCHAR)Table;
+ Sum = 0;
+ for (i = 0; i < Table->Size; i++)
+ {
+ Sum += Ptr[i];
+ }
+
+ if ((Sum & 0xFF) != 0)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Invalid routing table\n"));
+ return NULL;
+ }
+
+ DbgPrint((DPRINT_HWDETECT,
+ "Valid checksum\n"));
+
+ return Table;
+ }
+
+ Table = (PPCI_IRQ_ROUTING_TABLE)((ULONG_PTR)Table + 0x10);
+ }
+
+ return NULL;
+}
+
+
+static BOOLEAN
+FindPciBios(PPCI_REGISTRY_INFO BusData)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+
+ RegsIn.b.ah = 0xB1; /* Subfunction B1h */
+ RegsIn.b.al = 0x01; /* PCI BIOS present */
+
+ Int386(0x1A, &RegsIn, &RegsOut);
+
+ if (INT386_SUCCESS(RegsOut) && RegsOut.d.edx == 0x20494350 && RegsOut.b.ah == 0)
+ {
+ DbgPrint((DPRINT_HWDETECT, "Found PCI bios\n"));
+
+ DbgPrint((DPRINT_HWDETECT, "AL: %x\n", RegsOut.b.al));
+ DbgPrint((DPRINT_HWDETECT, "BH: %x\n", RegsOut.b.bh));
+ DbgPrint((DPRINT_HWDETECT, "BL: %x\n", RegsOut.b.bl));
+ DbgPrint((DPRINT_HWDETECT, "CL: %x\n", RegsOut.b.cl));
+
+ BusData->NoBuses = RegsOut.b.cl + 1;
+ BusData->MajorRevision = RegsOut.b.bh;
+ BusData->MinorRevision = RegsOut.b.bl;
+ BusData->HardwareMechanism = RegsOut.b.cl;
+
+ return TRUE;
+ }
+
+
+ DbgPrint((DPRINT_HWDETECT, "No PCI bios found\n"));
+
+ return FALSE;
+}
+
+
+static VOID
+DetectPciIrqRoutingTable(PCONFIGURATION_COMPONENT_DATA BusKey)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PPCI_IRQ_ROUTING_TABLE Table;
+ PCONFIGURATION_COMPONENT_DATA TableKey;
+ ULONG Size;
+
+ Table = GetPciIrqRoutingTable();
+ if (Table != NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT, "Table size: %u\n", Table->Size));
+
+ FldrCreateComponentKey(BusKey,
+ L"RealModeIrqRoutingTable",
+ 0,
+ PeripheralClass,
+ RealModeIrqRoutingTable,
+ &TableKey);
+
+ /* Set 'Component Information' */
+ FldrSetComponentInformation(TableKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(TableKey, "PCI Real-mode IRQ Routing Table");
+
+ /* Set 'Configuration Data' value */
+ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors) +
+ 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + Table->Size;
+ PartialResourceList = MmAllocateMemory(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 2;
+
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeBusNumber;
+ PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ PartialDescriptor->u.BusNumber.Start = 0;
+ PartialDescriptor->u.BusNumber.Length = 1;
+
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = Table->Size;
+
+ memcpy(&PartialResourceList->PartialDescriptors[2],
+ Table, Table->Size);
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(TableKey, PartialResourceList, Size);
+ MmFreeMemory(PartialResourceList);
+ }
+}
+
+
+VOID
+DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
+ PCI_REGISTRY_INFO BusData;
+ PCONFIGURATION_COMPONENT_DATA BiosKey;
+ ULONG Size;
+ PCONFIGURATION_COMPONENT_DATA BusKey;
+ ULONG i;
+ CHAR szPci[] = "PCI";
+
+ /* Report the PCI BIOS */
+ if (FindPciBios(&BusData))
+ {
+ /* Create new bus key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BiosKey);
+
+ /* Set 'Component Information' */
+ FldrSetComponentInformation(BiosKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(BiosKey, "PCI BIOS");
+
+ /* Set 'Configuration Data' value */
+ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST,
+ PartialDescriptors);
+ PartialResourceList = MmAllocateMemory(Size);
+ if (PartialResourceList == NULL)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(BiosKey, PartialResourceList, Size);
+ MmFreeMemory(PartialResourceList);
+
+ DetectPciIrqRoutingTable(BiosKey);
+
+ /* Report PCI buses */
+ for (i = 0; i < (ULONG)BusData.NoBuses; i++)
+ {
+ /* Create the bus key */
+ FldrCreateComponentKey(SystemKey,
+ L"MultifunctionAdapter",
+ *BusNumber,
+ AdapterClass,
+ MultiFunctionAdapter,
+ &BusKey);
+
+ /* Set 'Component Information' */
+ FldrSetComponentInformation(BusKey,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF);
+
+ /* Check if this is the first bus */
+ if (i == 0)
+ {
+ /* Set 'Configuration Data' value */
+ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST,
+ PartialDescriptors) +
+ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) +
+ sizeof(PCI_REGISTRY_INFO);
+ PartialResourceList = MmAllocateMemory(Size);
+ if (!PartialResourceList)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 1;
+ PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
+ PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
+ PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
+ PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(PCI_REGISTRY_INFO);
+ memcpy(&PartialResourceList->PartialDescriptors[1],
+ &BusData,
+ sizeof(PCI_REGISTRY_INFO));
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(BusKey, PartialResourceList, Size);
+ MmFreeMemory(PartialResourceList);
+ }
+ else
+ {
+ /* Set 'Configuration Data' value */
+ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST,
+ PartialDescriptors);
+ PartialResourceList = MmAllocateMemory(Size);
+ if (!PartialResourceList)
+ {
+ DbgPrint((DPRINT_HWDETECT,
+ "Failed to allocate resource descriptor\n"));
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+
+ /* Set 'Configuration Data' value */
+ FldrSetConfigurationData(BusKey, PartialResourceList, Size);
+ MmFreeMemory(PartialResourceList);
+ }
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Identifier' value */
+ FldrSetIdentifier(BusKey, szPci);
+ }
+ }
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 2003 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+
+#include <arch.h>
+
+/*
+ * U32 CpuidSupported(VOID);
+ *
+ * RETURNS:
+ * 0x00000001: CPU supports the CPUID instruction
+ * 0x00000300: Found 80386 CPU
+ * 0x00000400: Found 80486 CPU without CPUID support
+ */
+
+EXTERN(_CpuidSupported)
+ .code32
+
+ pushl %ecx /* save ECX */
+
+ pushfl /* push original EFLAGS */
+ popl %eax /* get original EFLAGS */
+ movl %eax,%ecx /* save original EFLAGS */
+ xorl $0x40000,%eax /* flip AC bit in EFLAGS */
+ pushl %eax /* save new EFLAGS value on stack */
+ popfl /* replace current EFLAGS value */
+
+ pushfl /* get new EFLAGS */
+ popl %eax /* store new EFLAGS in EAX */
+ xorl %ecx, %eax /* can't toggle AC bit, processor=80386 */
+
+ movl $0x300,%eax /* return processor id */
+ jz NoCpuid /* jump if 80386 processor */
+
+ pushl %ecx
+ popfl /* restore AC bit in EFLAGS first */
+
+ movl %ecx,%eax /* get original EFLAGS */
+ xorl $0x200000,%eax /* flip ID bit in EFLAGS */
+ pushl %eax /* save new EFLAGS value on stack */
+ popfl /* replace current EFLAGS value */
+ pushfl /* get new EFLAGS */
+ popl %eax /* store new EFLAGS in EAX */
+ xorl %ecx,%eax /* can't toggle ID bit, */
+
+ movl $0x400,%eax /* return processor id */
+ je NoCpuid /* processor=80486 */
+
+ movl $1,%eax /* CPUID supported */
+
+NoCpuid:
+ pushl %ecx
+ popfl /* restore EFLAGS */
+ popl %ecx /* retore ECX */
+
+ ret
+
+
+/*
+ * VOID GetCpuid(U32 Level, U32 *eax, U32 *ebx, U32 *ecx, U32 *edx);
+ */
+
+EXTERN(_GetCpuid)
+ .code32
+
+ pushl %ebp
+ movl %esp,%ebp
+
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ pushl %esi
+
+ movl 0x08(%ebp),%eax
+
+ cpuid
+
+ movl 0x0C(%ebp),%esi
+ movl %eax,(%esi)
+
+ movl 0x10(%ebp),%esi
+ movl %ebx,(%esi)
+
+ movl 0x14(%ebp),%esi
+ movl %ecx,(%esi)
+
+ movl 0x18(%ebp),%esi
+ movl %edx,(%esi)
+
+ popl %esi
+ popl %edx
+ popl %ecx
+ popl %ebx
+ popl %eax
+
+ movl %ebp,%esp
+ popl %ebp
+ ret
+
+
+/*
+ * U64 RDTSC(VOID);
+ */
+
+EXTERN(_RDTSC)
+ .code32
+ rdtsc
+ ret
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+/////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOLEAN DiskResetController(ULONG DriveNumber)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+
+ DbgPrint((DPRINT_DISK, "DiskResetController(0x%x) DISK OPERATION FAILED -- RESETTING CONTROLLER\n", DriveNumber));
+
+ // BIOS Int 13h, function 0 - Reset disk system
+ // AH = 00h
+ // DL = drive (if bit 7 is set both hard disks and floppy disks reset)
+ // Return:
+ // AH = status
+ // CF clear if successful
+ // CF set on error
+ RegsIn.b.ah = 0x00;
+ RegsIn.b.dl = DriveNumber;
+
+ // Reset the disk controller
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ return INT386_SUCCESS(RegsOut);
+}
+
+BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+
+ DbgPrint((DPRINT_DISK, "DiskInt13ExtensionsSupported()\n"));
+
+ // IBM/MS INT 13 Extensions - INSTALLATION CHECK
+ // AH = 41h
+ // BX = 55AAh
+ // DL = drive (80h-FFh)
+ // Return:
+ // CF set on error (extensions not supported)
+ // AH = 01h (invalid function)
+ // CF clear if successful
+ // BX = AA55h if installed
+ // AH = major version of extensions
+ // 01h = 1.x
+ // 20h = 2.0 / EDD-1.0
+ // 21h = 2.1 / EDD-1.1
+ // 30h = EDD-3.0
+ // AL = internal use
+ // CX = API subset support bitmap
+ // DH = extension version (v2.0+ ??? -- not present in 1.x)
+ //
+ // Bitfields for IBM/MS INT 13 Extensions API support bitmap
+ // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
+ // Bit 1, removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h) supported
+ // Bit 2, enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
+ // extended drive parameter table is valid
+ // Bits 3-15 reserved
+ RegsIn.b.ah = 0x41;
+ RegsIn.w.bx = 0x55AA;
+ RegsIn.b.dl = DriveNumber;
+
+ // Reset the disk controller
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ if (!INT386_SUCCESS(RegsOut))
+ {
+ // CF set on error (extensions not supported)
+ return FALSE;
+ }
+
+ if (RegsOut.w.bx != 0xAA55)
+ {
+ // BX = AA55h if installed
+ return FALSE;
+ }
+
+ // Note:
+ // The original check is too strict because some BIOSes report that
+ // extended disk access functions are not suported when booting
+ // from a CD (e.g. Phoenix BIOS v6.00PG). Argh!
+#if 0
+ if (!(RegsOut.w.cx & 0x0001))
+ {
+ // CX = API subset support bitmap
+ // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
+ return FALSE;
+ }
+#endif
+
+ // Use this relaxed check instead
+ if (RegsOut.w.cx == 0x0000)
+ {
+ // CX = API subset support bitmap
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+VOID DiskStopFloppyMotor(VOID)
+{
+ WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0);
+}
+
+BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+ PUSHORT Ptr = (PUSHORT)(BIOSCALLBUFFER);
+
+ DbgPrint((DPRINT_DISK, "DiskGetExtendedDriveParameters()\n"));
+
+ // Initialize transfer buffer
+ *Ptr = BufferSize;
+
+ // BIOS Int 13h, function 48h - Get drive parameters
+ // AH = 48h
+ // DL = drive (bit 7 set for hard disk)
+ // DS:SI = result buffer
+ // Return:
+ // CF set on error
+ // AH = status (07h)
+ // CF clear if successful
+ // AH = 00h
+ // DS:SI -> result buffer
+ RegsIn.b.ah = 0x48;
+ RegsIn.b.dl = DriveNumber;
+ RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> result buffer
+ RegsIn.w.si = BIOSCALLBUFOFFSET;
+
+ // Get drive parameters
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ if (!INT386_SUCCESS(RegsOut))
+ {
+ return FALSE;
+ }
+
+ memcpy(Buffer, Ptr, BufferSize);
+
+ DbgPrint((DPRINT_DISK, "size of buffer: %x\n", Ptr[0]));
+ DbgPrint((DPRINT_DISK, "information flags: %x\n", Ptr[1]));
+ DbgPrint((DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2]));
+ DbgPrint((DPRINT_DISK, "number of physical heads on drive: %u\n", *(PULONG)&Ptr[4]));
+ DbgPrint((DPRINT_DISK, "number of physical sectors per track: %u\n", *(PULONG)&Ptr[6]));
+ DbgPrint((DPRINT_DISK, "total number of sectors on drive: %I64u\n", *(unsigned long long*)&Ptr[8]));
+ DbgPrint((DPRINT_DISK, "bytes per sector: %u\n", Ptr[12]));
+ if (Ptr[0] >= 0x1e)
+ {
+ DbgPrint((DPRINT_DISK, "EED configuration parameters: %x:%x\n", Ptr[13], Ptr[14]));
+ if (Ptr[13] != 0xffff && Ptr[14] != 0xffff)
+ {
+ PUCHAR SpecPtr = (PUCHAR)(ULONG_PTR)((Ptr[13] << 4) + Ptr[14]);
+ DbgPrint((DPRINT_DISK, "SpecPtr: %x\n", SpecPtr));
+ DbgPrint((DPRINT_DISK, "physical I/O port base address: %x\n", *(PUSHORT)&SpecPtr[0]));
+ DbgPrint((DPRINT_DISK, "disk-drive control port address: %x\n", *(PUSHORT)&SpecPtr[2]));
+ DbgPrint((DPRINT_DISK, "drive flags: %x\n", SpecPtr[4]));
+ DbgPrint((DPRINT_DISK, "proprietary information: %x\n", SpecPtr[5]));
+ DbgPrint((DPRINT_DISK, "IRQ for drive: %u\n", SpecPtr[6]));
+ DbgPrint((DPRINT_DISK, "sector count for multi-sector transfers: %u\n", SpecPtr[7]));
+ DbgPrint((DPRINT_DISK, "DMA control: %x\n", SpecPtr[8]));
+ DbgPrint((DPRINT_DISK, "programmed I/O control: %x\n", SpecPtr[9]));
+ DbgPrint((DPRINT_DISK, "drive options: %x\n", *(PUSHORT)&SpecPtr[10]));
+ }
+ }
+ if (Ptr[0] >= 0x42)
+ {
+ DbgPrint((DPRINT_DISK, "signature: %x\n", Ptr[15]));
+ }
+
+ return TRUE;
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+
+
+ .p2align 2 /* force 4-byte alignment */
+EXTERN(i386idt)
+ /* Exception 0 - Divide By Zero */
+ .word i386DivideByZero /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Flags, Zero Byte */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 1 - Debug Exception */
+ .word i386DebugException /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 2 - NMI */
+ .word i386NMIException /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 3 - Breakpoint (INT 3) */
+ .word i386Breakpoint /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 4 - Overflow (INTO with EFLAGS[OF] set) */
+ .word i386Overflow /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 5 - Bound Exception */
+ .word i386BoundException /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 6 - Invalid Opcode */
+ .word i386InvalidOpcode /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 7 - FPU Not Available */
+ .word i386FPUNotAvailable /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 8 - Double Fault */
+ .word i386DoubleFault /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 9 - Coprocessor Segment Overrun */
+ .word i386CoprocessorSegment /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 10 (0x0A) - Invalid TSS */
+ .word i386InvalidTSS /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 11 (0x0B) - Segment Not Present */
+ .word i386SegmentNotPresent /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 12 (0x0C) - Stack Exception */
+ .word i386StackException /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 13 (0x0D) - General Protection Fault */
+ .word i386GeneralProtectionFault /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 14 (0x0E) - Page Fault */
+ .word i386PageFault /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 15 (0x0F) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 16 (0x10) - Coprocessor Error */
+ .word i386CoprocessorError /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 17 (0x11) - Alignment Check */
+ .word i386AlignmentCheck /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 18 (0x12) - Machine Check */
+ .word i386MachineCheck /* Offset 0 - 15 */
+ .word 0x0008 /* Selector */
+ .word 0x8e00 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 19 (0x13) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 20 (0x14) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 21 (0x15) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 22 (0x16) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 23 (0x17) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 24 (0x18) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 25 (0x19) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 26 (0x1A) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 27 (0x1B) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 28 (0x1C) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 29 (0x1D) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 30 (0x1E) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+ /* Exception 31 (0x1F) - Reserved */
+ .word 0x0000 /* Offset 0 - 15 */
+ .word 0x0000 /* Selector */
+ .word 0x0000 /* Zero byte, flags */
+ .word 0x0000 /* Offset 16 - 31 */
+
+/* IDT table pointer */
+EXTERN(i386idtptr)
+ .word (i386idtptr-i386idt) /* Limit */
+ .long i386idt /* Base Address */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 2003 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+
+#include <arch.h>
+
+
+/*
+ * U32 PnpBiosSupported(VOID);
+ *
+ * RETURNS:
+ */
+_pnp_bios_entry_point:
+ .long 0
+_pnp_bios_data_segment:
+ .word 0
+
+EXTERN(_PnpBiosSupported)
+ .code64
+
+ push rdi
+ push rsi
+ push rcx
+ push rdx
+
+ xor edi, edi
+
+ /* init esi */
+ mov esi, 0xF0000
+
+pnp_again:
+ mov eax, [%esi]
+ cmp eax, 0x506E5024 /* "$PnP" */
+ je pnp_found
+
+ cmp esi, 0xFFFF0
+ je pnp_not_found
+
+pnp_add:
+ add esi, 0x10
+ jmp pnp_again
+
+pnp_found:
+ /* first calculate the checksum */
+ push rsi
+
+ push 0x21
+ pop rcx
+ xor edx, edx
+
+pnp_loop:
+ lodsb
+ add dl, al
+ loop pnp_loop
+
+ test dl, dl
+ pop rsi
+ jnz pnp_add
+
+ mov edi, esi
+
+ /* Calculate the bios entry point (far pointer) */
+ xor eax, eax
+ mov ax, [esi + 0x0F]
+ shl eax, 16
+ mov ax, [esi + 0x0D]
+ mov _pnp_bios_entry_point, eax
+
+ /* Store bios data segment */
+ mov ax, [esi + 0x1B]
+ mov _pnp_bios_data_segment, ax
+
+pnp_not_found:
+ mov eax, edi
+
+ pop rdx
+ pop rcx
+ pop rsi
+ pop rdi
+
+ ret
+
+
+/*
+ * U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, U32 *NodeCount);
+ *
+ * RETURNS:
+ */
+_pnp_result:
+ .long 0
+_pnp_node_size:
+ .word 0
+_pnp_node_count:
+ .word 0
+
+EXTERN(_PnpBiosGetDeviceNodeCount)
+ .code64
+
+ push rbp
+ mov rbp, rsp
+
+// pushal FIXME
+// push es
+
+ call x86_64_SwitchToReal
+ .code16
+
+ mov ax, _pnp_bios_data_segment
+ push ax
+
+ push cs
+ mov ax, _pnp_node_size
+ push ax
+
+ push cs
+ mov ax, _pnp_node_count
+ push ax
+
+ push 0
+
+ call [_pnp_bios_entry_point]
+ add sp, 12
+
+ movzx ecx, ax
+ mov _pnp_result, ecx
+
+ call x86_16_SwitchToLong
+ .code64
+
+ mov esi, [rbp + 0x08]
+ mov ax, _pnp_node_size
+ movzx ecx, ax
+ mov [rsi], ecx
+
+ mov rsi, [ebp + 0x0C]
+ mov ax, _pnp_node_count
+ movzx ecx, ax
+ mov [rsi], eax
+
+// pop es
+// popal
+
+ mov rsp, rbp
+ pop rbp
+
+ xor rax, rax
+ mov eax, _pnp_result
+
+ ret
+
+
+/*
+ * U32 PnpBiosGetDeviceNode(U8 *NodeId, U8 *NodeBuffer);
+ *
+ * RETURNS:
+ */
+_pnp_buffer_segment:
+ .word 0
+_pnp_buffer_offset:
+ .word 0
+
+_pnp_node_number:
+ .byte 0
+
+EXTERN(_PnpBiosGetDeviceNode)
+ .code64
+
+ push rbp
+ mov rbp, rsp
+
+// pushal
+// push es
+
+ /* get current node number */
+ mov rsi, [rbp + 0x08]
+ mov al, [rsi]
+ mov _pnp_node_number, al
+
+ /* convert pointer to node buffer to segment/offset */
+ mov eax, [rbp + 0x0C]
+ shr eax, 4
+ and eax, 0xf000
+ mov _pnp_buffer_segment , ax
+ mov eax, [rbp + 0x0C]
+ and eax, 0xffff
+ mov _pnp_buffer_offset, ax
+
+ call x86_64_SwitchToReal
+ .code16
+
+ /* push bios segment */
+ mov ax, _pnp_bios_data_segment
+ push ax
+
+ /* push control flag */
+ push 0x0001
+
+ /* push pointer to node buffer (segment/offset) */
+ mov ax, _pnp_buffer_segment
+ push ax
+ mov ax, _pnp_buffer_offset
+ push ax
+
+ /* push pointer to node number (segment/offset) */
+ push cs
+ mov ax, _pnp_node_number
+ push ax
+
+ /* push function number */
+ push 1
+
+ /* call entry point */
+ call [_pnp_bios_entry_point]
+ add sp, 14
+
+ movzx ecx, ax
+ mov _pnp_result, ecx
+
+ call x86_16_SwitchToLong
+ .code64
+
+ /* update node number */
+ mov rsi, [rbp + 0x08]
+ mov al, _pnp_node_number
+ mov [rsi], al
+
+// pop es
+// popal
+
+ mov rsp, rbp
+ pop rbp
+
+ xor rax, rax
+ mov eax, _pnp_result
+
+ ret
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+void PcBeep(void)
+{
+ sound(700);
+ delay(200);
+ sound(0);
+}
+
+void delay(unsigned msec)
+{
+ REGS Regs;
+ unsigned usec;
+ unsigned msec_this;
+
+ // Int 15h AH=86h
+ // BIOS - WAIT (AT,PS)
+ //
+ // AH = 86h
+ // CX:DX = interval in microseconds
+ // Return:
+ // CF clear if successful (wait interval elapsed)
+ // CF set on error or AH=83h wait already in progress
+ // AH = status (see #00496)
+
+ // Note: The resolution of the wait period is 977 microseconds on
+ // many systems because many BIOSes use the 1/1024 second fast
+ // interrupt from the AT real-time clock chip which is available on INT 70;
+ // because newer BIOSes may have much more precise timers available, it is
+ // not possible to use this function accurately for very short delays unless
+ // the precise behavior of the BIOS is known (or found through testing)
+
+ while (msec)
+ {
+ msec_this = msec;
+
+ if (msec_this > 4000)
+ {
+ msec_this = 4000;
+ }
+
+ usec = msec_this * 1000;
+
+ Regs.b.ah = 0x86;
+ Regs.w.cx = usec >> 16;
+ Regs.w.dx = usec & 0xffff;
+ Int386(0x15, &Regs, &Regs);
+
+ msec -= msec_this;
+ }
+}
+
+void sound(int freq)
+{
+ int scale;
+
+ if (freq == 0)
+ {
+ WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) & ~3);
+ return;
+ }
+
+ scale = 1193046 / freq;
+ WRITE_PORT_UCHAR((PUCHAR)0x43, 0xb6);
+ WRITE_PORT_UCHAR((PUCHAR)0x42, scale & 0xff);
+ WRITE_PORT_UCHAR((PUCHAR)0x42, scale >> 8);
+ WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) | 3);
+}
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+#include <ver.h>
+
+#define SCREEN_ATTR 0x1f /* Bright white on blue background */
+
+.macro SAVE_CPU_REGS
+ movl %eax,i386_EAX
+ movl %ebx,i386_EBX
+ movl %ecx,i386_ECX
+ movl %edx,i386_EDX
+ movl %esp,i386_ESP
+ movl %ebp,i386_EBP
+ movl %esi,i386_ESI
+ movl %edi,i386_EDI
+ movw %ds,%ax
+ movw %ax,i386_DS
+ movw %es,%ax
+ movw %ax,i386_ES
+ movw %fs,%ax
+ movw %ax,i386_FS
+ movw %gs,%ax
+ movw %ax,i386_GS
+ movw %ss,%ax
+ movw %ax,i386_SS
+ popl %eax
+ movl %eax,i386_EIP
+ popl %eax
+ movw %ax,i386_CS
+ popl %eax
+ movl %eax,i386_EFLAGS
+ movl %cr0,%eax
+ movl %eax,i386_CR0
+ //movl %cr1,%eax
+ //movl %eax,i386_CR1
+ movl %cr2,%eax
+ movl %eax,i386_CR2
+ movl %cr3,%eax
+ movl %eax,i386_CR3
+ movl %dr0,%eax
+ movl %eax,i386_DR0
+ movl %dr1,%eax
+ movl %eax,i386_DR1
+ movl %dr2,%eax
+ movl %eax,i386_DR2
+ movl %dr3,%eax
+ movl %eax,i386_DR3
+ movl %dr6,%eax
+ movl %eax,i386_DR6
+ movl %dr7,%eax
+ movl %eax,i386_DR7
+ sgdt i386_GDTR
+ sidt i386_IDTR
+ sldt i386_LDTR
+ str i386_TR
+.endm
+
+
+
+i386ExceptionHandlerText:
+ .ascii "An error occured in FreeLoader\n"
+ .ascii VERSION
+ .ascii "\n"
+ .asciz "Report this error to the ReactOS Development mailing list <ros-dev@reactos.org>\n\n"
+
+i386DivideByZeroText:
+ .asciz "Exception 00: DIVIDE BY ZERO\n\n"
+i386DebugExceptionText:
+ .asciz "Exception 01: DEBUG EXCEPTION\n\n"
+i386NMIExceptionText:
+ .asciz "Exception 02: NON-MASKABLE INTERRUPT EXCEPTION\n\n"
+i386BreakpointText:
+ .asciz "Exception 03: BREAKPOINT (INT 3)\n\n"
+i386OverflowText:
+ .asciz "Exception 04: OVERFLOW\n\n"
+i386BoundExceptionText:
+ .asciz "Exception 05: BOUND EXCEPTION\n\n"
+i386InvalidOpcodeText:
+ .asciz "Exception 06: INVALID OPCODE\n\n"
+i386FPUNotAvailableText:
+ .asciz "Exception 07: FPU NOT AVAILABLE\n\n"
+i386DoubleFaultText:
+ .asciz "Exception 08: DOUBLE FAULT\n\n"
+i386CoprocessorSegmentText:
+ .asciz "Exception 09: COPROCESSOR SEGMENT OVERRUN\n\n"
+i386InvalidTSSText:
+ .asciz "Exception 0A: INVALID TSS\n\n"
+i386SegmentNotPresentText:
+ .asciz "Exception 0B: SEGMENT NOT PRESENT\n\n"
+i386StackExceptionText:
+ .asciz "Exception 0C: STACK EXCEPTION\n\n"
+i386GeneralProtectionFaultText:
+ .asciz "Exception 0D: GENERAL PROTECTION FAULT\n\n"
+i386PageFaultText:
+ .asciz "Exception 0E: PAGE FAULT\n\n"
+i386CoprocessorErrorText:
+ .asciz "Exception 10: COPROCESSOR ERROR\n\n"
+i386AlignmentCheckText:
+ .asciz "Exception 11: ALIGNMENT CHECK\n\n"
+i386MachineCheckText:
+ .asciz "Exception 12: MACHINE CHECK\n\n"
+
+i386_EAX_Text:
+ .asciz "EAX: "
+i386_EBX_Text:
+ .asciz "EBX: "
+i386_ECX_Text:
+ .asciz "ECX: "
+i386_EDX_Text:
+ .asciz "EDX: "
+i386_ESP_Text:
+ .asciz " ESP: "
+i386_EBP_Text:
+ .asciz " EBP: "
+i386_ESI_Text:
+ .asciz " ESI: "
+i386_EDI_Text:
+ .asciz " EDI: "
+i386_CS_Text:
+ .asciz "CS: "
+i386_DS_Text:
+ .asciz "DS: "
+i386_ES_Text:
+ .asciz "ES: "
+i386_FS_Text:
+ .asciz "FS: "
+i386_GS_Text:
+ .asciz "GS: "
+i386_SS_Text:
+ .asciz "SS: "
+i386_EFLAGS_Text:
+ .asciz " EFLAGS: "
+i386_EIP_Text:
+ .asciz " EIP: "
+i386_ERROR_CODE_Text:
+ .asciz " ERROR CODE: "
+i386_CR0_Text:
+ .asciz " CR0: "
+i386_CR1_Text:
+ .asciz " CR1: "
+i386_CR2_Text:
+ .asciz " CR2: "
+i386_CR3_Text:
+ .asciz " CR3: "
+i386_DR0_Text:
+ .asciz " DR0: "
+i386_DR1_Text:
+ .asciz " DR1: "
+i386_DR2_Text:
+ .asciz " DR2: "
+i386_DR3_Text:
+ .asciz " DR3: "
+i386_DR6_Text:
+ .asciz " DR6: "
+i386_DR7_Text:
+ .asciz " DR7: "
+i386_GDTR_Text:
+ .asciz " GDTR Base: "
+i386_IDTR_Text:
+ .asciz " IDTR Base: "
+i386_Limit_Text:
+ .asciz " Limit: "
+i386_LDTR_Text:
+ .asciz " LDTR: "
+i386_TR_Text:
+ .asciz " TR: "
+
+i386FramesText:
+ .asciz "Frames:\n"
+
+/* Set by each exception handler to the address of the description text */
+i386ExceptionDescriptionText:
+ .long 0
+
+/* Used to store the contents of all the registers when an exception occurs */
+i386_EAX:
+ .long 0
+i386_EBX:
+ .long 0
+i386_ECX:
+ .long 0
+i386_EDX:
+ .long 0
+i386_ESP:
+ .long 0
+i386_EBP:
+ .long 0
+i386_ESI:
+ .long 0
+i386_EDI:
+ .long 0
+i386_CS:
+ .word 0
+i386_DS:
+ .word 0
+i386_ES:
+ .word 0
+i386_FS:
+ .word 0
+i386_GS:
+ .word 0
+i386_SS:
+ .word 0
+i386_EFLAGS:
+ .long 0
+i386_EIP:
+ .long 0
+i386_ERROR_CODE:
+ .long 0
+i386_CR0:
+ .long 0
+i386_CR1:
+ .long 0
+i386_CR2:
+ .long 0
+i386_CR3:
+ .long 0
+i386_DR0:
+ .long 0
+i386_DR1:
+ .long 0
+i386_DR2:
+ .long 0
+i386_DR3:
+ .long 0
+i386_DR6:
+ .long 0
+i386_DR7:
+ .long 0
+i386_GDTR:
+ .word 0
+ .long 0
+i386_IDTR:
+ .word 0
+ .long 0
+i386_LDTR:
+ .word 0
+i386_TR:
+ .word 0
+
+/* Used to store the current X and Y position on the screen */
+i386_ScreenPosX:
+ .long 0
+i386_ScreenPosY:
+ .long 0
+
+/************************************************************************/
+i386CommonExceptionHandler:
+ .code32
+
+ SAVE_CPU_REGS
+
+ pushl $SCREEN_ATTR
+ call _MachVideoClearScreen
+ add $4,%esp
+
+ movl $i386ExceptionHandlerText,%esi
+ call i386PrintText
+
+ movl i386ExceptionDescriptionText,%esi
+ call i386PrintText
+
+ movl $i386_EAX_Text,%esi
+ call i386PrintText
+ movl i386_EAX,%eax
+ call i386PrintHexDword // Display EAX
+ movl $i386_ESP_Text,%esi
+ call i386PrintText
+ movl i386_ESP,%eax
+ call i386PrintHexDword // Display ESP
+ movl $i386_CR0_Text,%esi
+ call i386PrintText
+ movl i386_CR0,%eax
+ call i386PrintHexDword // Display CR0
+ movl $i386_DR0_Text,%esi
+ call i386PrintText
+ movl i386_DR0,%eax
+ call i386PrintHexDword // Display DR0
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_EBX_Text,%esi
+ call i386PrintText
+ movl i386_EBX,%eax
+ call i386PrintHexDword // Display EBX
+ movl $i386_EBP_Text,%esi
+ call i386PrintText
+ movl i386_EBP,%eax
+ call i386PrintHexDword // Display EBP
+ movl $i386_CR1_Text,%esi
+ call i386PrintText
+ movl i386_CR1,%eax
+ call i386PrintHexDword // Display CR1
+ movl $i386_DR1_Text,%esi
+ call i386PrintText
+ movl i386_DR1,%eax
+ call i386PrintHexDword // Display DR1
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_ECX_Text,%esi
+ call i386PrintText
+ movl i386_ECX,%eax
+ call i386PrintHexDword // Display ECX
+ movl $i386_ESI_Text,%esi
+ call i386PrintText
+ movl i386_ESI,%eax
+ call i386PrintHexDword // Display ESI
+ movl $i386_CR2_Text,%esi
+ call i386PrintText
+ movl i386_CR2,%eax
+ call i386PrintHexDword // Display CR2
+ movl $i386_DR2_Text,%esi
+ call i386PrintText
+ movl i386_DR2,%eax
+ call i386PrintHexDword // Display DR2
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_EDX_Text,%esi
+ call i386PrintText
+ movl i386_EDX,%eax
+ call i386PrintHexDword // Display EDX
+ movl $i386_EDI_Text,%esi
+ call i386PrintText
+ movl i386_EDI,%eax
+ call i386PrintHexDword // Display EDI
+ movl $i386_CR3_Text,%esi
+ call i386PrintText
+ movl i386_CR3,%eax
+ call i386PrintHexDword // Display CR3
+ movl $i386_DR3_Text,%esi
+ call i386PrintText
+ movl i386_DR3,%eax
+ call i386PrintHexDword // Display DR3
+ incl i386_ScreenPosY
+ movl $55,i386_ScreenPosX
+ movl $i386_DR6_Text,%esi
+ call i386PrintText
+ movl i386_DR6,%eax
+ call i386PrintHexDword // Display DR6
+ incl i386_ScreenPosY
+ movl $55,i386_ScreenPosX
+ movl $i386_DR7_Text,%esi
+ call i386PrintText
+ movl i386_DR7,%eax
+ call i386PrintHexDword // Display DR7
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ incl i386_ScreenPosY
+ movl $i386_CS_Text,%esi
+ call i386PrintText
+ movw i386_CS,%ax
+ call i386PrintHexWord // Display CS
+ movl $i386_EIP_Text,%esi
+ call i386PrintText
+ movl i386_EIP,%eax
+ call i386PrintHexDword // Display EIP
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_DS_Text,%esi
+ call i386PrintText
+ movw i386_DS,%ax
+ call i386PrintHexWord // Display DS
+ movl $i386_ERROR_CODE_Text,%esi
+ call i386PrintText
+ movl i386_ERROR_CODE,%eax
+ call i386PrintHexDword // Display ERROR CODE
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_ES_Text,%esi
+ call i386PrintText
+ movw i386_ES,%ax
+ call i386PrintHexWord // Display ES
+ movl $i386_EFLAGS_Text,%esi
+ call i386PrintText
+ movl i386_EFLAGS,%eax
+ call i386PrintHexDword // Display EFLAGS
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_FS_Text,%esi
+ call i386PrintText
+ movw i386_FS,%ax
+ call i386PrintHexWord // Display FS
+ movl $i386_GDTR_Text,%esi
+ call i386PrintText
+ movl i386_GDTR+2,%eax
+ call i386PrintHexDword // Display GDTR Base
+ movl $i386_Limit_Text,%esi
+ call i386PrintText
+ movw i386_GDTR,%ax
+ call i386PrintHexWord // Display GDTR Limit
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_GS_Text,%esi
+ call i386PrintText
+ movw i386_GS,%ax
+ call i386PrintHexWord // Display GS
+ movl $i386_IDTR_Text,%esi
+ call i386PrintText
+ movl i386_IDTR+2,%eax
+ call i386PrintHexDword // Display IDTR Base
+ movl $i386_Limit_Text,%esi
+ call i386PrintText
+ movw i386_IDTR,%ax
+ call i386PrintHexWord // Display IDTR Limit
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ movl $i386_SS_Text,%esi
+ call i386PrintText
+ movw i386_SS,%ax
+ call i386PrintHexWord // Display SS
+ movl $i386_LDTR_Text,%esi
+ call i386PrintText
+ movw i386_LDTR,%ax
+ call i386PrintHexWord // Display LDTR
+ movl $i386_TR_Text,%esi
+ call i386PrintText
+ movw i386_TR,%ax
+ call i386PrintHexWord // Display TR
+ movl $0,i386_ScreenPosX
+ incl i386_ScreenPosY
+ incl i386_ScreenPosY
+ call i386PrintFrames // Display frames
+ incl i386_ScreenPosY
+ incl i386_ScreenPosY
+
+ cli
+i386ExceptionHandlerHang:
+ hlt
+ jmp i386ExceptionHandlerHang
+
+ iret
+
+i386PrintFrames:
+ movl $0,i386_ScreenPosX
+ movl $i386FramesText,%esi
+ call i386PrintText
+
+ movl i386_EBP,%edi
+printnextframe:
+ test %edi,%edi
+ je nomoreframes
+ movl $STACK32ADDR,%eax
+ cmpl %edi,%eax
+ jbe nomoreframes
+ movl 4(%edi),%eax
+ pushl %edi
+ call i386PrintHexDword // Display frame
+ popl %edi
+ incl i386_ScreenPosX
+ incl i386_ScreenPosX
+ movl 0(%edi),%edi
+ jmp printnextframe
+nomoreframes:
+ ret
+
+/************************************************************************/
+/* AL = Char to display */
+/************************************************************************/
+i386PrintChar:
+ .code32
+
+ pushl i386_ScreenPosY
+ pushl i386_ScreenPosX
+ pushl $SCREEN_ATTR
+ andl $0xff,%eax
+ pushl %eax
+ call _MachVideoPutChar
+ addl $16,%esp
+
+ ret
+
+/************************************************************************/
+/* ESI = Address of text to display */
+/************************************************************************/
+i386PrintText:
+ .code32
+
+i386PrintTextLoop:
+ lodsb
+
+ // Check for end of string char
+ cmp $0,%al
+ je i386PrintTextDone
+
+ // Check for newline char
+ cmp $0x0a,%al
+ jne i386PrintTextLoop2
+ incl i386_ScreenPosY
+ movl $0,i386_ScreenPosX
+ jmp i386PrintTextLoop
+
+i386PrintTextLoop2:
+ call i386PrintChar
+ incl i386_ScreenPosX
+
+ jmp i386PrintTextLoop
+
+i386PrintTextDone:
+
+ ret
+
+/************************************************************************/
+/* Prints the value in EAX on the screen in hex */
+/************************************************************************/
+i386PrintHexDword:
+ .code32
+
+ call i386PrintHex1
+
+i386PrintHex1:
+ call i386PrintHex2
+i386PrintHex2:
+ call i386PrintHex3
+i386PrintHex3:
+ movb $4,%cl
+ rol %cl,%eax
+ push %eax
+ andb $0x0f,%al
+ movl $i386PrintHexTable,%ebx
+ xlat /*$i386PrintHexTable*/
+ call i386PrintChar
+ incl i386_ScreenPosX
+ pop %eax
+
+ ret
+
+i386PrintHexTable:
+ .ascii "0123456789ABCDEF"
+
+/************************************************************************/
+/* Prints the value in AX on the screen in hex */
+/************************************************************************/
+i386PrintHexWord:
+ .code32
+
+ call i386PrintHexWord1
+i386PrintHexWord1:
+ call i386PrintHexWord2
+i386PrintHexWord2:
+ movb $4,%cl
+ rol %cl,%ax
+ push %eax
+ andb $0x0f,%al
+ movl $i386PrintHexTable,%ebx
+ xlat /*$i386PrintHexTable*/
+ call i386PrintChar
+ incl i386_ScreenPosX
+ pop %eax
+
+ ret
+
+/************************************************************************/
+/* Prints the value in AL on the screen in hex */
+/************************************************************************/
+i386PrintHexByte:
+ .code32
+
+ call i386PrintHexByte1
+i386PrintHexByte1:
+ movb $4,%cl
+ rol %cl,%al
+ push %eax
+ andb $0x0f,%al
+ movl $i386PrintHexTable,%ebx
+ xlat /*$i386PrintHexTable*/
+ call i386PrintChar
+ incl i386_ScreenPosX
+ pop %eax
+
+ ret
+
+/************************************************************************/
+EXTERN(i386DivideByZero)
+ .code32
+
+ movl $i386DivideByZeroText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386DebugException)
+ .code32
+
+ movl $i386DebugExceptionText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386NMIException)
+ .code32
+
+ movl $i386NMIExceptionText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386Breakpoint)
+ .code32
+
+ movl $i386BreakpointText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386Overflow)
+ .code32
+
+ movl $i386OverflowText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386BoundException)
+ .code32
+
+ movl $i386BoundExceptionText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386InvalidOpcode)
+ .code32
+
+ movl $i386InvalidOpcodeText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386FPUNotAvailable)
+ .code32
+
+ movl $i386FPUNotAvailableText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386DoubleFault)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386DoubleFaultText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386CoprocessorSegment)
+ .code32
+
+ movl $i386CoprocessorSegmentText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386InvalidTSS)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386InvalidTSSText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386SegmentNotPresent)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386SegmentNotPresentText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386StackException)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386StackExceptionText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386GeneralProtectionFault)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386GeneralProtectionFaultText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386PageFault)
+ .code32
+
+ popl %eax
+ movl %eax,i386_ERROR_CODE
+
+ movl $i386PageFaultText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386CoprocessorError)
+ .code32
+
+ movl $i386CoprocessorErrorText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386AlignmentCheck)
+ .code32
+
+ movl $i386AlignmentCheckText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************/
+EXTERN(i386MachineCheck)
+ .code32
+
+ movl $i386MachineCheckText,i386ExceptionDescriptionText
+ jmp i386CommonExceptionHandler
+
+/************************************************************************
+ * DEBUGGING SUPPORT FUNCTIONS
+ ************************************************************************/
+EXTERN(_INSTRUCTION_BREAKPOINT1)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr0
+ movl %dr7,%eax
+ andl $0xfff0ffff,%eax
+ orl $0x00000303,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_READWRITE_BREAKPOINT1)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr0
+ movl %dr7,%eax
+ andl $0xfff0ffff,%eax
+ orl $0x00030303,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_WRITE_BREAKPOINT1)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr0
+ movl %dr7,%eax
+ andl $0xfff0ffff,%eax
+ orl $0x00010303,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_INSTRUCTION_BREAKPOINT2)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr1
+ movl %dr7,%eax
+ andl $0xff0fffff,%eax
+ orl $0x0000030c,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_READWRITE_BREAKPOINT2)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr1
+ movl %dr7,%eax
+ andl $0xff0fffff,%eax
+ orl $0x0030030c,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_WRITE_BREAKPOINT2)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr1
+ movl %dr7,%eax
+ andl $0xff0fffff,%eax
+ orl $0x0010030c,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_INSTRUCTION_BREAKPOINT3)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr2
+ movl %dr7,%eax
+ andl $0xf0ffffff,%eax
+ orl $0x00000330,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_READWRITE_BREAKPOINT3)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr2
+ movl %dr7,%eax
+ andl $0xf0ffffff,%eax
+ orl $0x03000330,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_WRITE_BREAKPOINT3)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr2
+ movl %dr7,%eax
+ andl $0xf0ffffff,%eax
+ orl $0x01000330,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_INSTRUCTION_BREAKPOINT4)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr3
+ movl %dr7,%eax
+ andl $0x0fffffff,%eax
+ orl $0x000003c0,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_READWRITE_BREAKPOINT4)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr3
+ movl %dr7,%eax
+ andl $0x0fffffff,%eax
+ orl $0x300003c0,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
+
+EXTERN(_MEMORY_WRITE_BREAKPOINT4)
+ .code32
+
+ pushl %eax
+
+ movl 8(%esp),%eax
+
+ movl %eax,%dr3
+ movl %dr7,%eax
+ andl $0x0fffffff,%eax
+ orl $0x100003c0,%eax
+ movl %eax,%dr7
+
+ popl %eax
+
+ ret
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ * Portions from Linux video.S - Display adapter & video mode setup, version 2.13 (14-May-99)
+ * Copyright (C) 1995 -- 1999 Martin Mares <mj@ucw.cz>
+ * Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+typedef struct
+{
+ UCHAR Signature[4]; // (ret) signature ("VESA")
+ // (call) VESA 2.0 request signature ("VBE2"), required to receive
+ // version 2.0 info
+ USHORT VesaVersion; // VESA version number (one-digit minor version -- 0102h = v1.2)
+ ULONG OemNamePtr; // pointer to OEM name
+ // "761295520" for ATI
+ ULONG Capabilities; // capabilities flags (see #00078)
+ ULONG SupportedModeListPtr; // pointer to list of supported VESA and OEM video modes
+ // (list of words terminated with FFFFh)
+ USHORT TotalVideoMemory; // total amount of video memory in 64K blocks
+
+ // ---VBE v1.x ---
+ //UCHAR Reserved[236];
+
+ // ---VBE v2.0 ---
+ USHORT OemSoftwareVersion; // OEM software version (BCD, high byte = major, low byte = minor)
+ ULONG VendorNamePtr; // pointer to vendor name
+ ULONG ProductNamePtr; // pointer to product name
+ ULONG ProductRevisionStringPtr; // pointer to product revision string
+ USHORT VBE_AF_Version; // (if capabilities bit 3 set) VBE/AF version (BCD)
+ // 0100h for v1.0P
+ ULONG AcceleratedModeListPtr; // (if capabilities bit 3 set) pointer to list of supported
+ // accelerated video modes (list of words terminated with FFFFh)
+ UCHAR Reserved[216]; // reserved for VBE implementation
+ UCHAR ScratchPad[256]; // OEM scratchpad (for OEM strings, etc.)
+} PACKED VESA_SVGA_INFO, *PVESA_SVGA_INFO;
+
+// Bitfields for VESA capabilities:
+//
+// Bit(s) Description (Table 00078)
+// 0 DAC can be switched into 8-bit mode
+// 1 non-VGA controller
+// 2 programmed DAC with blank bit (i.e. only during blanking interval)
+// 3 (VBE v3.0) controller supports hardware stereoscopic signalling
+// 3 controller supports VBE/AF v1.0P extensions
+// 4 (VBE v3.0) if bit 3 set:
+// =0 stereo signalling via external VESA stereo connector
+// =1 stereo signalling via VESA EVC connector
+// 4 (VBE/AF v1.0P) must call EnableDirectAccess to access framebuffer
+// 5 (VBE/AF v1.0P) controller supports hardware mouse cursor
+// 6 (VBE/AF v1.0P) controller supports hardware clipping
+// 7 (VBE/AF v1.0P) controller supports transparent BitBLT
+// 8-31 reserved (0)
+
+// Notes: The list of supported video modes is stored in the reserved
+// portion of the SuperVGA information record by some implementations,
+// and it may thus be necessary to either copy the mode list or use a
+// different buffer for all subsequent VESA calls. Not all of the video
+// modes in the list of mode numbers may be supported, e.g. if they require
+// more memory than currently installed or are not supported by the
+// attached monitor. Check any mode you intend to use through AX=4F01h first..
+// The 1.1 VESA document specifies 242 reserved bytes at the end, so the
+// buffer should be 262 bytes to ensure that it is not overrun; for v2.0,
+// the buffer should be 512 bytes. The S3 specific video modes will most
+// likely follow the FFFFh terminator at the end of the standard modes.
+// A search must then be made to find them, FFFFh will also terminate this
+// second list. In some cases, only a "stub" VBE may be present, supporting
+// only AX=4F00h; this case may be assumed if the list of supported video modes
+// is empty (consisting of a single word of FFFFh)
+#if 0
+static VOID BiosSetVideoFont8x16(VOID)
+{
+ REGS Regs;
+
+ // Int 10h AX=1114h
+ // VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x16 CHARACTER SET (VGA)
+ //
+ // AX = 1114h
+ // BL = block to load
+ // Return:
+ // Nothing
+ Regs.w.ax = 0x1114;
+ Regs.b.bl = 0;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID VideoSetTextCursorPosition(ULONG X, ULONG Y)
+{
+}
+
+static ULONG VideoGetTextCursorPositionX(VOID)
+{
+ REGS Regs;
+
+ // Int 10h AH=03h
+ // VIDEO - GET CURSOR POSITION AND SIZE
+ //
+ // AH = 03h
+ // BH = page number
+ // 0-3 in modes 2&3
+ // 0-7 in modes 0&1
+ // 0 in graphics modes
+ // Return:
+ // AX = 0000h (Phoenix BIOS)
+ // CH = start scan line
+ // CL = end scan line
+ // DH = row (00h is top)
+ // DL = column (00h is left)
+ Regs.b.ah = 0x03;
+ Regs.b.bh = 0x00;
+ Int386(0x10, &Regs, &Regs);
+
+ return Regs.b.dl;
+}
+
+static ULONG VideoGetTextCursorPositionY(VOID)
+{
+ REGS Regs;
+
+ // Int 10h AH=03h
+ // VIDEO - GET CURSOR POSITION AND SIZE
+ //
+ // AH = 03h
+ // BH = page number
+ // 0-3 in modes 2&3
+ // 0-7 in modes 0&1
+ // 0 in graphics modes
+ // Return:
+ // AX = 0000h (Phoenix BIOS)
+ // CH = start scan line
+ // CL = end scan line
+ // DH = row (00h is top)
+ // DL = column (00h is left)
+ Regs.b.ah = 0x03;
+ Regs.b.bh = 0x00;
+ Int386(0x10, &Regs, &Regs);
+
+ return Regs.b.dh;
+}
+#endif
+
+USHORT BiosIsVesaSupported(VOID)
+{
+ REGS Regs;
+ PVESA_SVGA_INFO SvgaInfo = (PVESA_SVGA_INFO)BIOSCALLBUFFER;
+ //USHORT* VideoModes;
+ //USHORT Index;
+
+ DbgPrint((DPRINT_UI, "BiosIsVesaSupported()\n"));
+
+ RtlZeroMemory(SvgaInfo, sizeof(VESA_SVGA_INFO));
+
+ // Make sure we receive version 2.0 info
+ SvgaInfo->Signature[0] = 'V';
+ SvgaInfo->Signature[1] = 'B';
+ SvgaInfo->Signature[2] = 'E';
+ SvgaInfo->Signature[3] = '2';
+
+ // Int 10h AX=4F00h
+ // VESA SuperVGA BIOS (VBE) - GET SuperVGA INFORMATION
+ //
+ // AX = 4F00h
+ // ES:DI -> buffer for SuperVGA information (see #00077)
+ // Return:
+ // AL = 4Fh if function supported
+ // AH = status
+ // 00h successful
+ // ES:DI buffer filled
+ // 01h failed
+ // ---VBE v2.0---
+ // 02h function not supported by current hardware configuration
+ // 03h function invalid in current video mode
+ //
+ // Determine whether VESA BIOS extensions are present and the
+ // capabilities supported by the display adapter
+ //
+ // Installation check;VESA SuperVGA
+ Regs.w.ax = 0x4F00;
+ Regs.w.es = BIOSCALLBUFSEGMENT;
+ Regs.w.di = BIOSCALLBUFOFFSET;
+ Int386(0x10, &Regs, &Regs);
+
+ DbgPrint((DPRINT_UI, "AL = 0x%x\n", Regs.b.al));
+ DbgPrint((DPRINT_UI, "AH = 0x%x\n", Regs.b.ah));
+
+ if (Regs.w.ax != 0x004F)
+ {
+ DbgPrint((DPRINT_UI, "Failed.\n"));
+ return 0x0000;
+ }
+
+ DbgPrint((DPRINT_UI, "Supported.\n"));
+ DbgPrint((DPRINT_UI, "SvgaInfo->Signature[4] = %c%c%c%c\n", SvgaInfo->Signature[0], SvgaInfo->Signature[1], SvgaInfo->Signature[2], SvgaInfo->Signature[3]));
+ DbgPrint((DPRINT_UI, "SvgaInfo->VesaVersion = v%d.%d\n", ((SvgaInfo->VesaVersion >> 8) & 0xFF), (SvgaInfo->VesaVersion & 0xFF)));
+ DbgPrint((DPRINT_UI, "SvgaInfo->OemNamePtr = 0x%x\n", SvgaInfo->OemNamePtr));
+ DbgPrint((DPRINT_UI, "SvgaInfo->Capabilities = 0x%x\n", SvgaInfo->Capabilities));
+ DbgPrint((DPRINT_UI, "SvgaInfo->VideoMemory = %dK\n", SvgaInfo->TotalVideoMemory * 64));
+ DbgPrint((DPRINT_UI, "---VBE v2.0 ---\n"));
+ DbgPrint((DPRINT_UI, "SvgaInfo->OemSoftwareVersion = v%d.%d\n", ((SvgaInfo->OemSoftwareVersion >> 8) & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 12) & 0x0F) * 10), (SvgaInfo->OemSoftwareVersion & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 4) & 0x0F) * 10)));
+ DbgPrint((DPRINT_UI, "SvgaInfo->VendorNamePtr = 0x%x\n", SvgaInfo->VendorNamePtr));
+ DbgPrint((DPRINT_UI, "SvgaInfo->ProductNamePtr = 0x%x\n", SvgaInfo->ProductNamePtr));
+ DbgPrint((DPRINT_UI, "SvgaInfo->ProductRevisionStringPtr = 0x%x\n", SvgaInfo->ProductRevisionStringPtr));
+ DbgPrint((DPRINT_UI, "SvgaInfo->VBE/AF Version = 0x%x (BCD WORD)\n", SvgaInfo->VBE_AF_Version));
+
+ //DbgPrint((DPRINT_UI, "\nSupported VESA and OEM video modes:\n"));
+ //VideoModes = (USHORT*)SvgaInfo->SupportedModeListPtr;
+ //for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
+ //{
+ // DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
+ //}
+
+ //if (SvgaInfo->VesaVersion >= 0x0200)
+ //{
+ // DbgPrint((DPRINT_UI, "\nSupported accelerated video modes (VESA v2.0):\n"));
+ // VideoModes = (USHORT*)SvgaInfo->AcceleratedModeListPtr;
+ // for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
+ // {
+ // DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
+ // }
+ //}
+
+ DbgPrint((DPRINT_UI, "\n"));
+
+ return SvgaInfo->VesaVersion;
+}
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .intel_syntax noprefix
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+
+
+Int386_REGS:
+
+Int386_eax:
+ .long 0
+Int386_ebx:
+ .long 0
+Int386_ecx:
+ .long 0
+Int386_edx:
+ .long 0
+
+Int386_esi:
+ .long 0
+Int386_edi:
+ .long 0
+
+Int386_ds:
+ .word 0
+Int386_es:
+ .word 0
+Int386_fs:
+ .word 0
+Int386_gs:
+ .word 0
+
+Int386_eflags:
+ .long 0
+
+Int386_vector:
+ .quad 0
+Int386_regsin:
+ .quad 0
+Int386_regsout:
+ .quad 0
+
+/*
+ * int Int386(int ivec, REGS* in, REGS* out);
+ */
+EXTERN(_Int386)
+ .code64
+
+ /* Get the function parameters */
+ mov Int386_vector, rcx
+ mov Int386_vector_opcode, cl
+ mov Int386_regsin, rdx
+ mov Int386_regsout, r8
+
+ /* Save all registers + segment registers */
+// push ds
+// push es
+ push fs
+ push gs
+ push rbx
+ push rcx
+ push rdx
+ push rsi
+ push rdi
+
+ /* Copy the input regs to our variables */
+ lea rdi, Int386_REGS
+ mov esi, Int386_regsin
+ mov ecx, 0x24
+ rep movsb
+
+ call x86_64_SwitchToReal
+ .code16
+
+ /* Setup the registers */
+ mov ax, cs:Int386_ds
+ mov ds, ax /* DS register */
+ mov ax, cs:Int386_es
+ mov es, ax /* ES register */
+ mov ax, cs:Int386_fs
+ mov fs, ax /* FS register */
+ mov ax, cs:Int386_gs
+ mov gs, ax /* GS register */
+
+ mov eax, cs:Int386_eax /* EAX register */
+ mov ebx, cs:Int386_ebx /* EBX register */
+ mov ecx, cs:Int386_ecx /* ECX register */
+ mov edx, cs:Int386_edx /* EDX register */
+
+ mov esi, cs:Int386_esi /* ESI register */
+ mov edi, cs:Int386_edi /* EDI register */
+
+ /* Do not set the flags register */
+ /* only return its value in regsout */
+ //pushl Int386_eflags
+ //popfl /* EFLAGS register */
+
+ /* Call the interrupt vector */
+ /*int Int386_vector*/
+Int386_int_opcode:
+ .byte 0xcd
+Int386_vector_opcode:
+ .byte 0x00
+
+ /* Save the registers */
+ mov cs:Int386_eax, eax /* EAX register */
+ mov cs:Int386_ebx, ebx /* EBX register */
+ mov cs:Int386_ecx, ecx /* ECX register */
+ mov cs:Int386_edx, edx /* EDX register */
+
+ mov cs:Int386_esi, esi /* ESI register */
+ mov cs:Int386_edi, edi /* EDI register */
+
+ mov ax, ds /* DS register */
+ mov cs:Int386_ds, ax
+ mov ax, es /* ES register */
+ mov cs:Int386_es, ax
+ mov ax, fs /* FS register */
+ mov cs:Int386_fs, ax
+ mov ax, gs /* GS register */
+ mov cs:Int386_gs, ax
+
+ pushf
+ pop cs:Int386_eflags /* EFLAGS register */
+
+ call x86_16_SwitchToLong
+ .code64
+
+ /* Copy the variables to the output regs */
+ lea rsi, Int386_REGS
+ mov rdi, Int386_regsout
+ mov rcx, 0x24
+ rep movsb
+
+ /* Restore segment and all other registers */
+ pop rdi
+ pop rsi
+ pop rdx
+ pop rcx
+ pop rbx
+ pop gs
+ pop fs
+// pop es
+// pop ds
+
+ /* Get return value */
+ xor rax, rax
+ mov eax, Int386_eax
+
+ ret
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ * Copyright (C) 2005 Alex Ionescu <alex@relsoft.net>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define _NTSYSTEM_
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+#undef DbgPrint
+
+/* Page Directory and Tables for non-PAE Systems */
+extern PAGE_DIRECTORY_X86 startup_pagedirectory;
+extern PAGE_DIRECTORY_X86 lowmem_pagetable;
+extern PAGE_DIRECTORY_X86 kernel_pagetable;
+extern PAGE_DIRECTORY_X86 hyperspace_pagetable;
+extern PAGE_DIRECTORY_X86 apic_pagetable;
+extern PAGE_DIRECTORY_X86 kpcr_pagetable;
+extern PAGE_DIRECTORY_X86 kuser_pagetable;
+extern ULONG_PTR KernelBase;
+extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
+/* FUNCTIONS *****************************************************************/
+
+/*++
+ * FrLdrStartup
+ * INTERNAL
+ *
+ * Prepares the system for loading the Kernel.
+ *
+ * Params:
+ * Magic - Multiboot Magic
+ *
+ * Returns:
+ * None.
+ *
+ * Remarks:
+ * None.
+ *
+ *--*/
+VOID
+NTAPI
+FrLdrStartup(ULONG Magic)
+{
+ ASSERT(FALSE);
+#if 0
+ /* Disable Interrupts */
+ _disable();
+
+ /* Re-initalize EFLAGS */
+ Ke386EraseFlags();
+
+ /* Initialize the page directory */
+ FrLdrSetupPageDirectory();
+
+ /* Initialize Paging, Write-Protection and Load NTOSKRNL */
+ FrLdrSetupPae(Magic);
+#endif
+}
+
+/*++
+ * FrLdrSetupPae
+ * INTERNAL
+ *
+ * Configures PAE on a MP System, and sets the PDBR if it's supported, or if
+ * the system is UP.
+ *
+ * Params:
+ * Magic - Multiboot Magic
+ *
+ * Returns:
+ * None.
+ *
+ * Remarks:
+ * None.
+ *
+ *--*/
+VOID
+FASTCALL
+FrLdrSetupPae(ULONG Magic)
+{
+#if 0
+ ULONG_PTR PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectory;
+
+ /* Set the PDBR */
+ __writecr3(PageDirectoryBaseAddress);
+
+ /* Enable Paging and Write Protect*/
+ __writecr0(__readcr0() | X86_CR0_PG | X86_CR0_WP);
+
+ /* Jump to Kernel */
+ (*KernelEntryPoint)(Magic, &LoaderBlock);
+#endif
+}
+
+/*++
+ * FrLdrSetupPageDirectory
+ * INTERNAL
+ *
+ * Sets up the ReactOS Startup Page Directory.
+ *
+ * Params:
+ * None.
+ *
+ * Returns:
+ * None.
+ *
+ * Remarks:
+ * We are setting PDEs, but using the equvivalent (for our purpose) PTE structure.
+ * As such, please note that PageFrameNumber == PageEntryNumber.
+ *
+ *--*/
+VOID
+FASTCALL
+FrLdrSetupPageDirectory(VOID)
+{
+#if 0
+ PPAGE_DIRECTORY_X86 PageDir;
+ ULONG KernelPageTableIndex;
+ ULONG i;
+
+ /* Get the Kernel Table Index */
+ KernelPageTableIndex = KernelBase >> PDE_SHIFT;
+
+ /* Get the Startup Page Directory */
+ PageDir = (PPAGE_DIRECTORY_X86)&startup_pagedirectory;
+
+ /* Set up the Low Memory PDE */
+ PageDir->Pde[LowMemPageTableIndex].Valid = 1;
+ PageDir->Pde[LowMemPageTableIndex].Write = 1;
+ PageDir->Pde[LowMemPageTableIndex].PageFrameNumber = PaPtrToPfn(lowmem_pagetable);
+
+ /* Set up the Kernel PDEs */
+ PageDir->Pde[KernelPageTableIndex].Valid = 1;
+ PageDir->Pde[KernelPageTableIndex].Write = 1;
+ PageDir->Pde[KernelPageTableIndex].PageFrameNumber = PaPtrToPfn(kernel_pagetable);
+ PageDir->Pde[KernelPageTableIndex + 1].Valid = 1;
+ PageDir->Pde[KernelPageTableIndex + 1].Write = 1;
+ PageDir->Pde[KernelPageTableIndex + 1].PageFrameNumber = PaPtrToPfn(kernel_pagetable + 4096);
+
+ /* Set up the Startup PDE */
+ PageDir->Pde[StartupPageTableIndex].Valid = 1;
+ PageDir->Pde[StartupPageTableIndex].Write = 1;
+ PageDir->Pde[StartupPageTableIndex].PageFrameNumber = PaPtrToPfn(startup_pagedirectory);
+
+ /* Set up the Hyperspace PDE */
+ PageDir->Pde[HyperspacePageTableIndex].Valid = 1;
+ PageDir->Pde[HyperspacePageTableIndex].Write = 1;
+ PageDir->Pde[HyperspacePageTableIndex].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable);
+
+ /* Set up the HAL PDE */
+ PageDir->Pde[HalPageTableIndex].Valid = 1;
+ PageDir->Pde[HalPageTableIndex].Write = 1;
+ PageDir->Pde[HalPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable);
+
+ /* Set up Low Memory PTEs */
+ PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable;
+ for (i=0; i<1024; i++)
+ {
+ PageDir->Pde[i].Valid = 1;
+ PageDir->Pde[i].Write = 1;
+ PageDir->Pde[i].Owner = 1;
+ PageDir->Pde[i].PageFrameNumber = PaToPfn(i * PAGE_SIZE);
+ }
+
+ /* Set up Kernel PTEs */
+ PageDir = (PPAGE_DIRECTORY_X86)&kernel_pagetable;
+ for (i=0; i<1536; i++)
+ {
+ PageDir->Pde[i].Valid = 1;
+ PageDir->Pde[i].Write = 1;
+ PageDir->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS + i * PAGE_SIZE);
+ }
+
+ /* Setup APIC Base */
+ PageDir = (PPAGE_DIRECTORY_X86)&apic_pagetable;
+ PageDir->Pde[0].Valid = 1;
+ PageDir->Pde[0].Write = 1;
+ PageDir->Pde[0].CacheDisable = 1;
+ PageDir->Pde[0].WriteThrough = 1;
+ PageDir->Pde[0].PageFrameNumber = PaToPfn(HAL_BASE);
+ PageDir->Pde[0x200].Valid = 1;
+ PageDir->Pde[0x200].Write = 1;
+ PageDir->Pde[0x200].CacheDisable = 1;
+ PageDir->Pde[0x200].WriteThrough = 1;
+ PageDir->Pde[0x200].PageFrameNumber = PaToPfn(HAL_BASE + KERNEL_BASE_PHYS);
+
+ /* Setup KUSER_SHARED_DATA Base */
+ PageDir->Pde[0x1F0].Valid = 1;
+ PageDir->Pde[0x1F0].Write = 1;
+ PageDir->Pde[0x1F0].PageFrameNumber = 2;
+
+ /* Setup KPCR Base*/
+ PageDir->Pde[0x1FF].Valid = 1;
+ PageDir->Pde[0x1FF].Write = 1;
+ PageDir->Pde[0x1FF].PageFrameNumber = 1;
+
+ /* Zero shared data */
+ RtlZeroMemory((PVOID)(2 << MM_PAGE_SHIFT), PAGE_SIZE);
+#endif
+}
+
--- /dev/null
+/* $Id: machpc.c 32173 2008-02-07 00:43:09Z ros-arm-bringup $
+ *
+ * FreeLoader
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+VOID
+MachInit(const char *CmdLine)
+{
+// EnableA20();
+//DbgPrint((DPRINT_MEMORY, "MachInit.\n"));
+ /* Setup vtbl */
+ MachVtbl.ConsPutChar = PcConsPutChar;
+ MachVtbl.ConsKbHit = PcConsKbHit;
+ MachVtbl.ConsGetCh = PcConsGetCh;
+ MachVtbl.VideoClearScreen = PcVideoClearScreen;
+ MachVtbl.VideoSetDisplayMode = PcVideoSetDisplayMode;
+ MachVtbl.VideoGetDisplaySize = PcVideoGetDisplaySize;
+ MachVtbl.VideoGetBufferSize = PcVideoGetBufferSize;
+ MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition;
+ MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition;
+ MachVtbl.VideoHideShowTextCursor = PcVideoHideShowTextCursor;
+ MachVtbl.VideoPutChar = PcVideoPutChar;
+ MachVtbl.VideoCopyOffScreenBufferToVRAM = PcVideoCopyOffScreenBufferToVRAM;
+ MachVtbl.VideoIsPaletteFixed = PcVideoIsPaletteFixed;
+ MachVtbl.VideoSetPaletteColor = PcVideoSetPaletteColor;
+ MachVtbl.VideoGetPaletteColor = PcVideoGetPaletteColor;
+ MachVtbl.VideoSync = PcVideoSync;
+ MachVtbl.Beep = PcBeep;
+ MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
+ MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
+ MachVtbl.DiskGetBootVolume = DiskGetBootVolume;
+ MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume;
+ MachVtbl.DiskGetBootPath = DiskGetBootPath;
+ MachVtbl.DiskGetBootDevice = DiskGetBootDevice;
+ MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy;
+ MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
+ MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
+ MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
+ MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
+ MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
+ MachVtbl.RTCGetCurrentDateTime = PcRTCGetCurrentDateTime;
+ MachVtbl.HwDetect = PcHwDetect;
+}
+
+VOID
+PcPrepareForReactOS(IN BOOLEAN Setup)
+{
+ //
+ // On PC, prepare video and turn off the floppy motor
+ //
+// PcVideoPrepareForReactOS(Setup);
+// DiskStopFloppyMotor();
+}
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+#include <arch.h>
+#include <multiboot.h>
+
+ /*
+ * Here we assume the kernel is loaded at 1mb
+ * This boots the kernel
+ */
+ .code32
+ .globl _PageDirectoryStart
+
+ .globl _startup_pagedirectory
+ .globl _lowmem_pagetable
+ .globl _kernel_pagetable
+ .globl _hyperspace_pagetable
+ .globl _apic_pagetable
+ .globl _kpcr_pagetable
+ .globl _kuser_pagetable
+
+ .globl _PageDirectoryEnd
+
+ //
+ // Boot information structure
+ //
+
+EXTERN(_reactos_memory_map_descriptor_size)
+ .long 0
+
+EXTERN(_reactos_memory_map)
+ .rept (32 * /*sizeof(memory_map_t)*/24)
+ .byte 0
+ .endr
+
+.bss
+_PageDirectoryStart:
+_startup_pagedirectory:
+ .fill 4096, 1, 0
+
+_lowmem_pagetable:
+ .fill 4096, 1, 0
+
+_kernel_pagetable:
+ .fill 2*4096, 1, 0
+
+_hyperspace_pagetable:
+ .fill 4096, 1, 0
+
+_apic_pagetable:
+ .fill 4096, 1, 0
+
+_kpcr_pagetable:
+ .fill 4096, 1, 0
+
+_kuser_pagetable:
+ .fill 4096, 1, 0
+
+_PageDirectoryEnd:
--- /dev/null
+/* $Id: pccons.c 21917 2006-05-16 23:09:41Z hpoussin $
+ *
+ * FreeLoader
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define TEXTMODE_BUFFER 0xb8000
+#define TEXTMODE_BUFFER_SIZE 0x8000
+
+#define TEXT_COLS 80
+#define TEXT_LINES 25
+
+VOID
+PcConsPutChar(int Ch)
+{
+ REGS Regs;
+
+ /* If we are displaying a CR '\n' then do a LF also */
+ if ('\n' == Ch)
+ {
+ /* Display the LF */
+ PcConsPutChar('\r');
+ }
+
+ /* If we are displaying a TAB '\t' then display 8 spaces ' ' */
+ if ('\t' == Ch)
+ {
+ /* Display the 8 spaces ' ' */
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ PcConsPutChar(' ');
+ return;
+ }
+
+ /* Int 10h AH=0Eh
+ * VIDEO - TELETYPE OUTPUT
+ *
+ * AH = 0Eh
+ * AL = character to write
+ * BH = page number
+ * BL = foreground color (graphics modes only)
+ */
+ Regs.b.ah = 0x0E;
+ Regs.b.al = Ch;
+ Regs.w.bx = 1;
+ Int386(0x10, &Regs, &Regs);
+}
+
+BOOLEAN
+PcConsKbHit(VOID)
+{
+ REGS Regs;
+
+ /* Int 16h AH=01h
+ * KEYBOARD - CHECK FOR KEYSTROKE
+ *
+ * AH = 01h
+ * Return:
+ * ZF set if no keystroke available
+ * ZF clear if keystroke available
+ * AH = BIOS scan code
+ * AL = ASCII character
+ */
+ Regs.b.ah = 0x01;
+ Int386(0x16, &Regs, &Regs);
+
+ return 0 == (Regs.x.eflags & I386FLAG_ZF);
+}
+
+int
+PcConsGetCh(void)
+{
+ REGS Regs;
+ static BOOLEAN ExtendedKey = FALSE;
+ static char ExtendedScanCode = 0;
+
+ /* If the last time we were called an
+ * extended key was pressed then return
+ * that keys scan code. */
+ if (ExtendedKey)
+ {
+ ExtendedKey = FALSE;
+ return ExtendedScanCode;
+ }
+
+ /* Int 16h AH=00h
+ * KEYBOARD - GET KEYSTROKE
+ *
+ * AH = 00h
+ * Return:
+ * AH = BIOS scan code
+ * AL = ASCII character
+ */
+ Regs.b.ah = 0x00;
+ Int386(0x16, &Regs, &Regs);
+
+ /* Check for an extended keystroke */
+ if (0 == Regs.b.al)
+ {
+ ExtendedKey = TRUE;
+ ExtendedScanCode = Regs.b.ah;
+ }
+
+ /* Return keystroke */
+ return Regs.b.al;
+}
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+typedef struct
+{
+ UCHAR PacketSize; // 00h - Size of packet (10h or 18h)
+ UCHAR Reserved; // 01h - Reserved (0)
+ USHORT LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD)
+ USHORT TransferBufferOffset; // 04h - Transfer buffer offset (seg:off)
+ USHORT TransferBufferSegment; // Transfer buffer segment (seg:off)
+ ULONGLONG LBAStartBlock; // 08h - Starting absolute block number
+ //ULONGLONG TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer
+ // used if DWORD at 04h is FFFFh:FFFFh
+ // Commented since some earlier BIOSes refuse to work with
+ // such extended structure
+} PACKED I386_DISK_ADDRESS_PACKET, *PI386_DISK_ADDRESS_PACKET;
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+/////////////////////////////////////////////////////////////////////////////////////////////
+
+static BOOLEAN PcDiskResetController(ULONG DriveNumber)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+
+ DbgPrint((DPRINT_DISK, "PcDiskResetController(0x%x) DISK OPERATION FAILED -- RESETTING CONTROLLER\n", DriveNumber));
+
+ // BIOS Int 13h, function 0 - Reset disk system
+ // AH = 00h
+ // DL = drive (if bit 7 is set both hard disks and floppy disks reset)
+ // Return:
+ // AH = status
+ // CF clear if successful
+ // CF set on error
+ RegsIn.b.ah = 0x00;
+ RegsIn.b.dl = DriveNumber;
+
+ // Reset the disk controller
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ return INT386_SUCCESS(RegsOut);
+}
+
+static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+ ULONG RetryCount;
+ PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER);
+
+ DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer));
+
+ // BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
+ RegsIn.b.ah = 0x42; // Subfunction 42h
+ RegsIn.b.dl = DriveNumber; // Drive number in DL (0 - floppy, 0x80 - harddisk)
+ RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> disk address packet
+ RegsIn.w.si = BIOSCALLBUFOFFSET;
+
+ // Setup disk address packet
+ RtlZeroMemory(Packet, sizeof(I386_DISK_ADDRESS_PACKET));
+ Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET);
+ Packet->Reserved = 0;
+ Packet->LBABlockCount = SectorCount;
+ Packet->TransferBufferOffset = ((ULONG_PTR)Buffer) & 0x0F;
+ Packet->TransferBufferSegment = ((ULONG_PTR)Buffer) >> 4;
+ Packet->LBAStartBlock = SectorNumber;
+
+ // BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
+ // Return:
+ // CF clear if successful
+ // AH = 00h
+ // CF set on error
+ // AH = error code
+ // disk address packet's block count field set to the
+ // number of blocks successfully transferred
+
+ // Retry 3 times
+ for (RetryCount=0; RetryCount<3; RetryCount++)
+ {
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ // If it worked return TRUE
+ if (INT386_SUCCESS(RegsOut))
+ {
+ return TRUE;
+ }
+ // If it was a corrected ECC error then the data is still good
+ else if (RegsOut.b.ah == 0x11)
+ {
+ return TRUE;
+ }
+ // If it failed the do the next retry
+ else
+ {
+ PcDiskResetController(DriveNumber);
+
+ continue;
+ }
+ }
+
+ // If we get here then the read failed
+ DiskError("Disk Read Failed in LBA mode", RegsOut.b.ah);
+
+ return FALSE;
+}
+
+static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
+{
+ ULONG PhysicalSector;
+ ULONG PhysicalHead;
+ ULONG PhysicalTrack;
+ GEOMETRY DriveGeometry;
+ ULONG NumberOfSectorsToRead;
+ REGS RegsIn;
+ REGS RegsOut;
+ ULONG RetryCount;
+
+ DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectorsCHS()\n"));
+
+ //
+ // Get the drive geometry
+ //
+ if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry) ||
+ DriveGeometry.Sectors == 0 ||
+ DriveGeometry.Heads == 0)
+ {
+ return FALSE;
+ }
+
+ while (SectorCount)
+ {
+
+ //
+ // Calculate the physical disk offsets
+ //
+ PhysicalSector = 1 + (SectorNumber % DriveGeometry.Sectors);
+ PhysicalHead = (SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads;
+ PhysicalTrack = (SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads;
+
+ //
+ // Calculate how many sectors we need to read this round
+ //
+ if (PhysicalSector > 1)
+ {
+ if (SectorCount >= (DriveGeometry.Sectors - (PhysicalSector - 1)))
+ NumberOfSectorsToRead = (DriveGeometry.Sectors - (PhysicalSector - 1));
+ else
+ NumberOfSectorsToRead = SectorCount;
+ }
+ else
+ {
+ if (SectorCount >= DriveGeometry.Sectors)
+ NumberOfSectorsToRead = DriveGeometry.Sectors;
+ else
+ NumberOfSectorsToRead = SectorCount;
+ }
+
+ //
+ // Make sure the read is within the geometry boundaries
+ //
+ if ((PhysicalHead >= DriveGeometry.Heads) ||
+ (PhysicalTrack >= DriveGeometry.Cylinders) ||
+ ((NumberOfSectorsToRead + PhysicalSector) > (DriveGeometry.Sectors + 1)) ||
+ (PhysicalSector > DriveGeometry.Sectors))
+ {
+ DiskError("Disk read exceeds drive geometry limits.", 0);
+ return FALSE;
+ }
+
+ // BIOS Int 13h, function 2 - Read Disk Sectors
+ // AH = 02h
+ // AL = number of sectors to read (must be nonzero)
+ // CH = low eight bits of cylinder number
+ // CL = sector number 1-63 (bits 0-5)
+ // high two bits of cylinder (bits 6-7, hard disk only)
+ // DH = head number
+ // DL = drive number (bit 7 set for hard disk)
+ // ES:BX -> data buffer
+ // Return:
+ // CF set on error
+ // if AH = 11h (corrected ECC error), AL = burst length
+ // CF clear if successful
+ // AH = status
+ // AL = number of sectors transferred
+ // (only valid if CF set for some BIOSes)
+ RegsIn.b.ah = 0x02;
+ RegsIn.b.al = NumberOfSectorsToRead;
+ RegsIn.b.ch = (PhysicalTrack & 0xFF);
+ RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
+ RegsIn.b.dh = PhysicalHead;
+ RegsIn.b.dl = DriveNumber;
+ RegsIn.w.es = ((ULONG_PTR)Buffer) >> 4;
+ RegsIn.w.bx = ((ULONG_PTR)Buffer) & 0x0F;
+
+ //
+ // Perform the read
+ // Retry 3 times
+ //
+ for (RetryCount=0; RetryCount<3; RetryCount++)
+ {
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ // If it worked break out
+ if (INT386_SUCCESS(RegsOut))
+ {
+ break;
+ }
+ // If it was a corrected ECC error then the data is still good
+ else if (RegsOut.b.ah == 0x11)
+ {
+ break;
+ }
+ // If it failed the do the next retry
+ else
+ {
+ PcDiskResetController(DriveNumber);
+
+ continue;
+ }
+ }
+
+ // If we retried 3 times then fail
+ if (RetryCount >= 3)
+ {
+ DiskError("Disk Read Failed in CHS mode, after retrying 3 times", RegsOut.b.ah);
+ return FALSE;
+ }
+
+ // I have learned that not all bioses return
+ // the sector read count in the AL register (at least mine doesn't)
+ // even if the sectors were read correctly. So instead
+ // of checking the sector read count we will rely solely
+ // on the carry flag being set on error
+
+ Buffer = (PVOID)((ULONG_PTR)Buffer + (NumberOfSectorsToRead * DriveGeometry.BytesPerSector));
+ SectorCount -= NumberOfSectorsToRead;
+ SectorNumber += NumberOfSectorsToRead;
+ }
+
+ return TRUE;
+}
+
+static BOOLEAN PcDiskInt13ExtensionsSupported(ULONG DriveNumber)
+{
+ static ULONG LastDriveNumber = 0xffffffff;
+ static BOOLEAN LastSupported;
+ REGS RegsIn;
+ REGS RegsOut;
+
+ DbgPrint((DPRINT_DISK, "PcDiskInt13ExtensionsSupported()\n"));
+
+ if (DriveNumber == LastDriveNumber)
+ {
+ DbgPrint((DPRINT_DISK, "Using cached value %s for drive 0x%x\n", LastSupported ? "TRUE" : "FALSE", DriveNumber));
+ return LastSupported;
+ }
+
+ // Some BIOSes report that extended disk access functions are not supported
+ // when booting from a CD (e.g. Phoenix BIOS v6.00PG and Insyde BIOS shipping
+ // with Intel Macs). Therefore we just return TRUE if we're booting from a CD -
+ // we can assume that all El Torito capable BIOSes support INT 13 extensions.
+ // We simply detect whether we're booting from CD by checking whether the drive
+ // number is >= 0x90. It's 0x90 on the Insyde BIOS, and 0x9F on most other BIOSes.
+ if (DriveNumber >= 0x90)
+ {
+ LastSupported = TRUE;
+ return TRUE;
+ }
+
+ LastDriveNumber = DriveNumber;
+
+ // IBM/MS INT 13 Extensions - INSTALLATION CHECK
+ // AH = 41h
+ // BX = 55AAh
+ // DL = drive (80h-FFh)
+ // Return:
+ // CF set on error (extensions not supported)
+ // AH = 01h (invalid function)
+ // CF clear if successful
+ // BX = AA55h if installed
+ // AH = major version of extensions
+ // 01h = 1.x
+ // 20h = 2.0 / EDD-1.0
+ // 21h = 2.1 / EDD-1.1
+ // 30h = EDD-3.0
+ // AL = internal use
+ // CX = API subset support bitmap
+ // DH = extension version (v2.0+ ??? -- not present in 1.x)
+ //
+ // Bitfields for IBM/MS INT 13 Extensions API support bitmap
+ // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
+ // Bit 1, removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h) supported
+ // Bit 2, enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
+ // extended drive parameter table is valid
+ // Bits 3-15 reserved
+ RegsIn.b.ah = 0x41;
+ RegsIn.w.bx = 0x55AA;
+ RegsIn.b.dl = DriveNumber;
+
+ // Reset the disk controller
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ if (!INT386_SUCCESS(RegsOut))
+ {
+ // CF set on error (extensions not supported)
+ LastSupported = FALSE;
+ return FALSE;
+ }
+
+ if (RegsOut.w.bx != 0xAA55)
+ {
+ // BX = AA55h if installed
+ LastSupported = FALSE;
+ return FALSE;
+ }
+
+ if (!(RegsOut.w.cx & 0x0001))
+ {
+ // CX = API subset support bitmap
+ // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
+ printf("Suspicious API subset support bitmap 0x%x on device 0x%lx\n", RegsOut.w.cx, DriveNumber);
+ LastSupported = FALSE;
+ return FALSE;
+ }
+
+ LastSupported = TRUE;
+ return TRUE;
+}
+
+BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
+{
+
+ DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer));
+
+ //
+ // Check to see if it is a fixed disk drive
+ // If so then check to see if Int13 extensions work
+ // If they do then use them, otherwise default back to BIOS calls
+ //
+ if ((DriveNumber >= 0x80) && PcDiskInt13ExtensionsSupported(DriveNumber))
+ {
+ DbgPrint((DPRINT_DISK, "Using Int 13 Extensions for read. PcDiskInt13ExtensionsSupported(%d) = %s\n", DriveNumber, PcDiskInt13ExtensionsSupported(DriveNumber) ? "TRUE" : "FALSE"));
+
+ //
+ // LBA is easy, nothing to calculate
+ // Just do the read
+ //
+ return PcDiskReadLogicalSectorsLBA(DriveNumber, SectorNumber, SectorCount, Buffer);
+ }
+ else
+ {
+ // LBA is not supported default to the CHS calls
+ return PcDiskReadLogicalSectorsCHS(DriveNumber, SectorNumber, SectorCount, Buffer);
+ }
+
+ return TRUE;
+}
+
+BOOLEAN
+PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+ ULONG Cylinders;
+
+ DbgPrint((DPRINT_DISK, "DiskGetDriveGeometry()\n"));
+
+ /* BIOS Int 13h, function 08h - Get drive parameters
+ * AH = 08h
+ * DL = drive (bit 7 set for hard disk)
+ * ES:DI = 0000h:0000h to guard against BIOS bugs
+ * Return:
+ * CF set on error
+ * AH = status (07h)
+ * CF clear if successful
+ * AH = 00h
+ * AL = 00h on at least some BIOSes
+ * BL = drive type (AT/PS2 floppies only)
+ * CH = low eight bits of maximum cylinder number
+ * CL = maximum sector number (bits 5-0)
+ * high two bits of maximum cylinder number (bits 7-6)
+ * DH = maximum head number
+ * DL = number of drives
+ * ES:DI -> drive parameter table (floppies only)
+ */
+ RegsIn.b.ah = 0x08;
+ RegsIn.b.dl = DriveNumber;
+ RegsIn.w.es = 0x0000;
+ RegsIn.w.di = 0x0000;
+
+ /* Get drive parameters */
+ Int386(0x13, &RegsIn, &RegsOut);
+
+ if (! INT386_SUCCESS(RegsOut))
+ {
+ return FALSE;
+ }
+
+ Cylinders = (RegsOut.b.cl & 0xC0) << 2;
+ Cylinders += RegsOut.b.ch;
+ Cylinders++;
+ Geometry->Cylinders = Cylinders;
+ Geometry->Heads = RegsOut.b.dh + 1;
+ Geometry->Sectors = RegsOut.b.cl & 0x3F;
+ Geometry->BytesPerSector = 512; /* Just assume 512 bytes per sector */
+
+ return TRUE;
+}
+
+ULONG
+PcDiskGetCacheableBlockCount(ULONG DriveNumber)
+{
+ GEOMETRY Geometry;
+
+ /* If LBA is supported then the block size will be 64 sectors (32k)
+ * If not then the block size is the size of one track */
+ if (DiskInt13ExtensionsSupported(DriveNumber))
+ {
+ return 64;
+ }
+ /* Get the disk geometry
+ * If this fails then we will just return 1 sector to be safe */
+ else if (! PcDiskGetDriveGeometry(DriveNumber, &Geometry))
+ {
+ return 1;
+ }
+ else
+ {
+ return Geometry.Sectors;
+ }
+}
+
+/* EOF */
--- /dev/null
+/* $Id: pcmem.c 24238 2006-09-23 16:50:39Z fireball $
+ *
+ * FreeLoader
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Note: Most of this code comes from the old file "i386mem.c", which
+ * was Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+static ULONG
+PcMemGetExtendedMemorySize(VOID)
+{
+ REGS RegsIn;
+ REGS RegsOut;
+ ULONG MemorySize;
+
+ DbgPrint((DPRINT_MEMORY, "GetExtendedMemorySize()\n"));
+
+ /* Int 15h AX=E801h
+ * Phoenix BIOS v4.0 - GET MEMORY SIZE FOR >64M CONFIGURATIONS
+ *
+ * AX = E801h
+ * Return:
+ * CF clear if successful
+ * AX = extended memory between 1M and 16M, in K (max 3C00h = 15MB)
+ * BX = extended memory above 16M, in 64K blocks
+ * CX = configured memory 1M to 16M, in K
+ * DX = configured memory above 16M, in 64K blocks
+ * CF set on error
+ */
+ RegsIn.w.ax = 0xE801;
+ Int386(0x15, &RegsIn, &RegsOut);
+
+ DbgPrint((DPRINT_MEMORY, "Int15h AX=E801h\n"));
+ DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
+ DbgPrint((DPRINT_MEMORY, "BX = 0x%x\n", RegsOut.w.bx));
+ DbgPrint((DPRINT_MEMORY, "CX = 0x%x\n", RegsOut.w.cx));
+ DbgPrint((DPRINT_MEMORY, "DX = 0x%x\n", RegsOut.w.dx));
+ DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
+
+ if (INT386_SUCCESS(RegsOut))
+ {
+ /* If AX=BX=0000h the use CX and DX */
+ if (RegsOut.w.ax == 0)
+ {
+ /* Return extended memory size in K */
+ MemorySize = RegsOut.w.dx * 64;
+ MemorySize += RegsOut.w.cx;
+ return MemorySize;
+ }
+ else
+ {
+ /* Return extended memory size in K */
+ MemorySize = RegsOut.w.bx * 64;
+ MemorySize += RegsOut.w.ax;
+ return MemorySize;
+ }
+ }
+
+ /* If we get here then Int15 Func E801h didn't work */
+ /* So try Int15 Func 88h */
+
+ /* Int 15h AH=88h
+ * SYSTEM - GET EXTENDED MEMORY SIZE (286+)
+ *
+ * AH = 88h
+ * Return:
+ * CF clear if successful
+ * AX = number of contiguous KB starting at absolute address 100000h
+ * CF set on error
+ * AH = status
+ * 80h invalid command (PC,PCjr)
+ * 86h unsupported function (XT,PS30)
+ */
+ RegsIn.b.ah = 0x88;
+ Int386(0x15, &RegsIn, &RegsOut);
+
+ DbgPrint((DPRINT_MEMORY, "Int15h AH=88h\n"));
+ DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
+ DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
+
+ if (INT386_SUCCESS(RegsOut) && RegsOut.w.ax != 0)
+ {
+ MemorySize = RegsOut.w.ax;
+ return MemorySize;
+ }
+
+ /* If we get here then Int15 Func 88h didn't work */
+ /* So try reading the CMOS */
+ WRITE_PORT_UCHAR((PUCHAR)0x70, 0x31);
+ MemorySize = READ_PORT_UCHAR((PUCHAR)0x71);
+ MemorySize = (MemorySize & 0xFFFF);
+ MemorySize = (MemorySize << 8);
+
+ DbgPrint((DPRINT_MEMORY, "Int15h Failed\n"));
+ DbgPrint((DPRINT_MEMORY, "CMOS reports: 0x%x\n", MemorySize));
+
+ return MemorySize;
+}
+
+static ULONG
+PcMemGetConventionalMemorySize(VOID)
+{
+ REGS Regs;
+
+ DbgPrint((DPRINT_MEMORY, "GetConventionalMemorySize()\n"));
+
+ /* Int 12h
+ * BIOS - GET MEMORY SIZE
+ *
+ * Return:
+ * AX = kilobytes of contiguous memory starting at absolute address 00000h
+ *
+ * This call returns the contents of the word at 0040h:0013h;
+ * in PC and XT, this value is set from the switches on the motherboard
+ */
+ Regs.w.ax = 0;
+ Int386(0x12, &Regs, &Regs);
+
+ DbgPrint((DPRINT_MEMORY, "Int12h\n"));
+ DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n\n", Regs.w.ax));
+
+ return (ULONG)Regs.w.ax;
+}
+
+static ULONG
+PcMemGetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize)
+{
+ REGS Regs;
+ ULONG MapCount;
+
+ DbgPrint((DPRINT_MEMORY, "GetBiosMemoryMap()\n"));
+
+ /* Int 15h AX=E820h
+ * Newer BIOSes - GET SYSTEM MEMORY MAP
+ *
+ * AX = E820h
+ * EAX = 0000E820h
+ * EDX = 534D4150h ('SMAP')
+ * EBX = continuation value or 00000000h to start at beginning of map
+ * ECX = size of buffer for result, in bytes (should be >= 20 bytes)
+ * ES:DI -> buffer for result
+ * Return:
+ * CF clear if successful
+ * EAX = 534D4150h ('SMAP')
+ * ES:DI buffer filled
+ * EBX = next offset from which to copy or 00000000h if all done
+ * ECX = actual length returned in bytes
+ * CF set on error
+ * AH = error code (86h)
+ */
+ Regs.x.eax = 0x0000E820;
+ Regs.x.edx = 0x534D4150; /* ('SMAP') */
+ Regs.x.ebx = 0x00000000;
+ Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
+ Regs.w.es = BIOSCALLBUFSEGMENT;
+ Regs.w.di = BIOSCALLBUFOFFSET;
+ for (MapCount = 0; MapCount < MaxMemoryMapSize; MapCount++)
+ {
+ Int386(0x15, &Regs, &Regs);
+
+ DbgPrint((DPRINT_MEMORY, "Memory Map Entry %d\n", MapCount));
+ DbgPrint((DPRINT_MEMORY, "Int15h AX=E820h\n"));
+ DbgPrint((DPRINT_MEMORY, "EAX = 0x%x\n", Regs.x.eax));
+ DbgPrint((DPRINT_MEMORY, "EBX = 0x%x\n", Regs.x.ebx));
+ DbgPrint((DPRINT_MEMORY, "ECX = 0x%x\n", Regs.x.ecx));
+ DbgPrint((DPRINT_MEMORY, "CF set = %s\n", (Regs.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
+
+ /* If the BIOS didn't return 'SMAP' in EAX then
+ * it doesn't support this call */
+ if (Regs.x.eax != 0x534D4150)
+ {
+ break;
+ }
+
+ /* Copy data to caller's buffer */
+ RtlCopyMemory(&BiosMemoryMap[MapCount], (PVOID)BIOSCALLBUFFER, Regs.x.ecx);
+
+ DbgPrint((DPRINT_MEMORY, "BaseAddress: 0x%p\n", (PVOID)BiosMemoryMap[MapCount].BaseAddress));
+ DbgPrint((DPRINT_MEMORY, "Length: 0x%p\n", (PVOID)BiosMemoryMap[MapCount].Length));
+ DbgPrint((DPRINT_MEMORY, "Type: 0x%x\n", BiosMemoryMap[MapCount].Type));
+ DbgPrint((DPRINT_MEMORY, "Reserved: 0x%x\n", BiosMemoryMap[MapCount].Reserved));
+ DbgPrint((DPRINT_MEMORY, "\n"));
+
+ /* If the continuation value is zero or the
+ * carry flag is set then this was
+ * the last entry so we're done */
+ if (Regs.x.ebx == 0x00000000 || !INT386_SUCCESS(Regs))
+ {
+ MapCount++;
+ DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
+ break;
+ }
+
+ /* Setup the registers for the next call */
+ Regs.x.eax = 0x0000E820;
+ Regs.x.edx = 0x534D4150; /* ('SMAP') */
+ /* Regs.x.ebx = 0x00000001; Continuation value already set by the BIOS */
+ Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
+ Regs.w.es = BIOSCALLBUFSEGMENT;
+ Regs.w.di = BIOSCALLBUFOFFSET;
+ }
+
+ return MapCount;
+}
+
+ULONG
+PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize)
+{
+ ULONG EntryCount;
+
+ EntryCount = PcMemGetBiosMemoryMap(BiosMemoryMap, MaxMemoryMapSize);
+
+ /* If the BIOS didn't provide a memory map, synthesize one */
+ if (0 == EntryCount && 2 <= MaxMemoryMapSize)
+ {
+ /* Conventional memory */
+ BiosMemoryMap[0].BaseAddress = 0;
+ BiosMemoryMap[0].Length = PcMemGetConventionalMemorySize() * 1024;
+ BiosMemoryMap[0].Type = BiosMemoryUsable;
+ /* Extended memory */
+ BiosMemoryMap[1].BaseAddress = 1024 * 1024;
+ BiosMemoryMap[1].Length = PcMemGetExtendedMemorySize() * 1024;
+ BiosMemoryMap[1].Type = BiosMemoryUsable;
+ EntryCount = 2;
+ }
+
+ return EntryCount;
+}
+
+/* EOF */
--- /dev/null
+/* $Id: pcrtc.c 21339 2006-03-18 22:09:16Z peterw $
+ *
+ * FreeLoader
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
+
+VOID
+PcRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second)
+{
+ REGS Regs;
+
+ if (NULL != Year || NULL != Month || NULL != Day)
+ {
+ /* Some BIOSes, such es the 1998/07/25 system ROM
+ * in the Compaq Deskpro EP/SB, leave CF unchanged
+ * if successful, so CF should be cleared before
+ * calling this function. */
+ __asm__ ("clc");
+
+ /* Int 1Ah AH=04h
+ * TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
+ *
+ * AH = 04h
+ * CF clear to avoid bug
+ * Return:
+ * CF clear if successful
+ * CH = century (BCD)
+ * CL = year (BCD)
+ * DH = month (BCD)
+ * DL = day (BCD)
+ * CF set on error
+ */
+ Regs.b.ah = 0x04;
+ Int386(0x1A, &Regs, &Regs);
+
+ if (NULL != Year)
+ {
+ *Year = 100 * BCD_INT(Regs.b.ch) + BCD_INT(Regs.b.cl);
+ }
+ if (NULL != Month)
+ {
+ *Month = BCD_INT(Regs.b.dh);
+ }
+ if (NULL != Day)
+ {
+ *Day = BCD_INT(Regs.b.dl);
+ }
+ }
+
+ if (NULL != Hour || NULL != Minute || NULL != Second)
+ {
+ /* Some BIOSes leave CF unchanged if successful,
+ * so CF should be cleared before calling this function. */
+ __asm__ ("clc");
+
+ /* Int 1Ah AH=02h
+ * TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
+ *
+ * AH = 02h
+ * CF clear to avoid bug
+ * Return:
+ * CF clear if successful
+ * CH = hour (BCD)
+ * CL = minutes (BCD)
+ * DH = seconds (BCD)
+ * DL = daylight savings flag (00h standard time, 01h daylight time)
+ * CF set on error (i.e. clock not running or in middle of update)
+ */
+ Regs.b.ah = 0x02;
+ Int386(0x1A, &Regs, &Regs);
+
+ if (NULL != Hour)
+ {
+ *Hour = BCD_INT(Regs.b.ch);
+ }
+ if (NULL != Minute)
+ {
+ *Minute = BCD_INT(Regs.b.cl);
+ }
+ if (NULL != Second)
+ {
+ *Second = BCD_INT(Regs.b.dh);
+ }
+ }
+}
+
+/* EOF */
--- /dev/null
+/* $Id: pcvideo.c 31712 2008-01-11 11:35:09Z hpoussin $
+ *
+ * FreeLoader
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define VIDEOPORT_PALETTE_READ 0x03C7
+#define VIDEOPORT_PALETTE_WRITE 0x03C8
+#define VIDEOPORT_PALETTE_DATA 0x03C9
+#define VIDEOPORT_VERTICAL_RETRACE 0x03DA
+
+#define VIDEOVGA_MEM_ADDRESS 0xA0000
+#define VIDEOTEXT_MEM_ADDRESS 0xB8000
+#define VIDEOTEXT_MEM_SIZE 0x8000
+
+#define VIDEOCARD_CGA_OR_OTHER 0
+#define VIDEOCARD_EGA 1
+#define VIDEOCARD_VGA 2
+
+#define VIDEOMODE_NORMAL_TEXT 0
+#define VIDEOMODE_EXTENDED_TEXT 1
+#define VIDEOMODE_80X28 0x501C
+#define VIDEOMODE_80X30 0x501E
+#define VIDEOMODE_80X34 0x5022
+#define VIDEOMODE_80X43 0x502B
+#define VIDEOMODE_80X60 0x503C
+#define VIDEOMODE_132X25 0x8419
+#define VIDEOMODE_132X43 0x842B
+#define VIDEOMODE_132X50 0x8432
+#define VIDEOMODE_132X60 0x843C
+
+#define VERTRES_200_SCANLINES 0x00
+#define VERTRES_350_SCANLINES 0x01
+#define VERTRES_400_SCANLINES 0x02
+
+typedef struct
+{
+ USHORT ModeAttributes; /* mode attributes (see #00080) */
+ UCHAR WindowAttributesA; /* window attributes, window A (see #00081) */
+ UCHAR WindowsAttributesB; /* window attributes, window B (see #00081) */
+ USHORT WindowGranularity; /* window granularity in KB */
+ USHORT WindowSize; /* window size in KB */
+ USHORT WindowAStartSegment; /* start segment of window A (0000h if not supported) */
+ USHORT WindowBStartSegment; /* start segment of window B (0000h if not supported) */
+ ULONG WindowPositioningFunction; /* -> FAR window positioning function (equivalent to AX=4F05h) */
+ USHORT BytesPerScanLine; /* bytes per scan line */
+ /* ---remainder is optional for VESA modes in v1.0/1.1, needed for OEM modes--- */
+ USHORT WidthInPixels; /* width in pixels (graphics) or characters (text) */
+ USHORT HeightInPixels; /* height in pixels (graphics) or characters (text) */
+ UCHAR CharacterWidthInPixels; /* width of character cell in pixels */
+ UCHAR CharacterHeightInPixels; /* height of character cell in pixels */
+ UCHAR NumberOfMemoryPlanes; /* number of memory planes */
+ UCHAR BitsPerPixel; /* number of bits per pixel */
+ UCHAR NumberOfBanks; /* number of banks */
+ UCHAR MemoryModel; /* memory model type (see #00082) */
+ UCHAR BankSize; /* size of bank in KB */
+ UCHAR NumberOfImagePanes; /* number of image pages (less one) that will fit in video RAM */
+ UCHAR Reserved1; /* reserved (00h for VBE 1.0-2.0, 01h for VBE 3.0) */
+ /* ---VBE v1.2+ --- */
+ UCHAR RedMaskSize; /* red mask size */
+ UCHAR RedMaskPosition; /* red field position */
+ UCHAR GreenMaskSize; /* green mask size */
+ UCHAR GreenMaskPosition; /* green field size */
+ UCHAR BlueMaskSize; /* blue mask size */
+ UCHAR BlueMaskPosition; /* blue field size */
+ UCHAR ReservedMaskSize; /* reserved mask size */
+ UCHAR ReservedMaskPosition; /* reserved mask position */
+ UCHAR DirectColorModeInfo; /* direct color mode info */
+ /* bit 0:Color ramp is programmable */
+ /* bit 1:Bytes in reserved field may be used by application */
+ /* ---VBE v2.0+ --- */
+ ULONG LinearVideoBufferAddress; /* physical address of linear video buffer */
+ ULONG OffscreenMemoryPointer; /* pointer to start of offscreen memory */
+ USHORT OffscreenMemorySize; /* KB of offscreen memory */
+ /* ---VBE v3.0 --- */
+ USHORT LinearBytesPerScanLine; /* bytes per scan line in linear modes */
+ UCHAR BankedNumberOfImages; /* number of images (less one) for banked video modes */
+ UCHAR LinearNumberOfImages; /* number of images (less one) for linear video modes */
+ UCHAR LinearRedMaskSize; /* linear modes:Size of direct color red mask (in bits) */
+ UCHAR LinearRedMaskPosition; /* linear modes:Bit position of red mask LSB (e.g. shift count) */
+ UCHAR LinearGreenMaskSize; /* linear modes:Size of direct color green mask (in bits) */
+ UCHAR LinearGreenMaskPosition; /* linear modes:Bit position of green mask LSB (e.g. shift count) */
+ UCHAR LinearBlueMaskSize; /* linear modes:Size of direct color blue mask (in bits) */
+ UCHAR LinearBlueMaskPosition; /* linear modes:Bit position of blue mask LSB (e.g. shift count) */
+ UCHAR LinearReservedMaskSize; /* linear modes:Size of direct color reserved mask (in bits) */
+ UCHAR LinearReservedMaskPosition; /* linear modes:Bit position of reserved mask LSB */
+ ULONG MaximumPixelClock; /* maximum pixel clock for graphics video mode, in Hz */
+ UCHAR Reserved2[190]; /* 190 BYTEs reserved (0) */
+} PACKED SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
+
+static ULONG BiosVideoMode; /* Current video mode as known by BIOS */
+static ULONG ScreenWidth = 80; /* Screen Width in characters */
+static ULONG ScreenHeight = 25; /* Screen Height in characters */
+static ULONG BytesPerScanLine = 160; /* Number of bytes per scanline (delta) */
+static VIDEODISPLAYMODE DisplayMode = VideoTextMode; /* Current display mode */
+static BOOLEAN VesaVideoMode = FALSE; /* Are we using a VESA mode? */
+static SVGA_MODE_INFORMATION VesaVideoModeInformation; /* Only valid when in VESA mode */
+static ULONG CurrentMemoryBank = 0; /* Currently selected VESA bank */
+
+static ULONG
+PcVideoDetectVideoCard(VOID)
+{
+ REGS Regs;
+
+ /* Int 10h AH=12h BL=10h
+ * VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - GET EGA INFO
+ *
+ * AH = 12h
+ * BL = 10h
+ * Return:
+ * BH = video state
+ * 00h color mode in effect (I/O port 3Dxh)
+ * 01h mono mode in effect (I/O port 3Bxh)
+ * BL = installed memory (00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K)
+ * CH = feature connector bits
+ * CL = switch settings
+ * AH destroyed (at least by Tseng ET4000 BIOS v8.00n)
+ *
+ * Installation check;EGA
+ */
+ Regs.b.ah = 0x12;
+ Regs.b.bl = 0x10;
+ Int386(0x10, &Regs, &Regs);
+
+ /* If BL is still equal to 0x10 then there is no EGA/VGA present */
+ if (0x10 == Regs.b.bl)
+ {
+ return VIDEOCARD_CGA_OR_OTHER;
+ }
+
+ /* Int 10h AX=1A00h
+ * VIDEO - GET DISPLAY COMBINATION CODE (PS,VGA/MCGA)
+ *
+ * AX = 1A00h
+ * Return:
+ * AL = 1Ah if function was supported
+ * BL = active display code
+ * BH = alternate display code
+ *
+ * This function is commonly used to check for the presence of a VGA.
+ *
+ * Installation check;VGA
+ *
+ * Values for display combination code:
+ * 00h no display
+ * 01h monochrome adapter w/ monochrome display
+ * 02h CGA w/ color display
+ * 03h reserved
+ * 04h EGA w/ color display
+ * 05h EGA w/ monochrome display
+ * 06h PGA w/ color display
+ * 07h VGA w/ monochrome analog display
+ * 08h VGA w/ color analog display
+ * 09h reserved
+ * 0Ah MCGA w/ digital color display
+ * 0Bh MCGA w/ monochrome analog display
+ * 0Ch MCGA w/ color analog display
+ * FFh unknown display type
+ */
+ Regs.b.ah = 0x12;
+ Regs.b.bl = 0x10;
+ Int386(0x10, &Regs, &Regs);
+
+ if (0x1a == Regs.b.al)
+ {
+ return VIDEOCARD_VGA;
+ }
+ else
+ {
+ return VIDEOCARD_EGA;
+ }
+}
+
+static VOID PcVideoSetBiosMode(ULONG VideoMode)
+{
+ REGS Regs;
+
+ /* Int 10h AH=00h
+ * VIDEO - SET VIDEO MODE
+ *
+ * AH = 00h
+ * AL = desired video mode
+ * Return:
+ * AL = video mode flag (Phoenix, AMI BIOS)
+ * 20h mode > 7
+ * 30h modes 0-5 and 7
+ * 3Fh mode 6
+ * AL = CRT controller mode byte (Phoenix 386 BIOS v1.10)
+ */
+ Regs.b.ah = 0x00;
+ Regs.b.al = VideoMode;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSetFont8x8(VOID)
+{
+ REGS Regs;
+
+ /* Int 10h AX=1112h
+ * VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x8 DBL-DOT PATTERNS (PS,EGA,VGA)
+ *
+ * AX = 1112h
+ * BL = block to load
+ * Return:
+ * Nothing
+ */
+ Regs.w.ax = 0x1112;
+ Regs.b.bl = 0x00;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSetFont8x14(VOID)
+{
+ REGS Regs;
+
+ /* Int 10h AX=1111h
+ * VIDEO - TEXT-MODE CHARGEN - LOAD ROM MONOCHROME PATTERNS (PS,EGA,VGA)
+ *
+ * AX = 1111h
+ * BL = block to load
+ * Return:
+ * Nothing
+ */
+ Regs.w.ax = 0x1111;
+ Regs.b.bl = 0;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSelectAlternatePrintScreen(VOID)
+{
+ REGS Regs;
+
+ /* Int 10h AH=12h BL=20h
+ * VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - ALTERNATE PRTSC
+ *
+ * AH = 12h
+ * BL = 20h select alternate print screen routine
+ * Return:
+ * Nothing
+ *
+ * Installs a PrtSc routine from the video card's BIOS to replace the
+ * default PrtSc handler from the ROM BIOS, which usually does not
+ * understand screen heights other than 25 lines.
+ *
+ * Some adapters disable print-screen instead of enhancing it.
+ */
+ Regs.b.ah = 0x12;
+ Regs.b.bl = 0x20;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoDisableCursorEmulation(VOID)
+{
+ REGS Regs;
+
+ /* Int 10h AH=12h BL=34h
+ * VIDEO - ALTERNATE FUNCTION SELECT (VGA) - CURSOR EMULATION
+ *
+ * AH = 12h
+ * BL = 34h
+ * AL = new state
+ * 00h enable alphanumeric cursor emulation
+ * 01h disable alphanumeric cursor emulation
+ * Return:
+ * AL = 12h if function supported
+ *
+ * Specify whether the BIOS should automatically remap cursor start/end
+ * according to the current character height in text modes.
+ */
+ Regs.b.ah = 0x12;
+ Regs.b.bl = 0x34;
+ Regs.b.al = 0x01;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine)
+{
+ REGS Regs;
+
+ /* Int 10h AH=01h
+ * VIDEO - SET TEXT-MODE CURSOR SHAPE
+ *
+ * AH = 01h
+ * CH = cursor start and options
+ * CL = bottom scan line containing cursor (bits 0-4)
+ * Return:
+ * Nothing
+ *
+ * Specify the starting and ending scan lines to be occupied
+ * by the hardware cursor in text modes.
+ *
+ * AMI 386 BIOS and AST Premier 386 BIOS will lock up the
+ * system if AL is not equal to the current video mode.
+ *
+ * Bitfields for cursor start and options:
+ *
+ * Bit(s) Description
+ * 7 should be zero
+ * 6,5 cursor blink
+ * (00=normal, 01=invisible, 10=erratic, 11=slow).
+ * (00=normal, other=invisible on EGA/VGA)
+ * 4-0 topmost scan line containing cursor
+ */
+ Regs.b.ah = 0x01;
+ Regs.b.al = 0x03;
+ Regs.b.ch = StartScanLine;
+ Regs.b.cl = EndScanLine;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSetVerticalResolution(ULONG ScanLines)
+{
+ REGS Regs;
+
+ /* Int 10h AH=12h BL=30h
+ * VIDEO - ALTERNATE FUNCTION SELECT (VGA) - SELECT VERTICAL RESOLUTION
+ *
+ * AH = 12h
+ * BL = 30h
+ * AL = vertical resolution
+ * 00h 200 scan lines
+ * 01h 350 scan lines
+ * 02h 400 scan lines
+ * Return:
+ * AL = 12h if function supported
+ *
+ * Specifiy the number of scan lines used to display text modes.
+ *
+ * The specified resolution will take effect on the next mode set.
+ */
+ Regs.b.ah = 0x12;
+ Regs.b.bl = 0x30;
+ Regs.b.al = ScanLines;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSet480ScanLines(VOID)
+{
+ INT_PTR CRTC;
+
+ /* Read CRTC port */
+ CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
+
+ if (CRTC & 1)
+ {
+ CRTC = 0x3D4;
+ }
+ else
+ {
+ CRTC = 0x3B4;
+ }
+
+ /* Vertical sync end (also unlocks CR0-7) */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x11);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0C);
+
+ /* Vertical total */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x06);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0B);
+
+ /* (vertical) overflow */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x07);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x3E);
+
+ /* Vertical sync start */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x10);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xEA);
+
+ /* Vertical display end */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
+
+ /* Vertical blank start */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x15);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xE7);
+
+ /* Vertical blank end */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x16);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x04);
+
+ /* Misc output register (read) */
+ CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
+
+ /* Preserve clock select bits and color bit */
+ CRTC = (CRTC & 0x0D);
+ /* Set correct sync polarity */
+ CRTC = (CRTC | 0xE2);
+
+ /* (write) */
+ WRITE_PORT_UCHAR((PUCHAR)0x03C2, CRTC);
+}
+
+static VOID
+PcVideoSetDisplayEnd(VOID)
+{
+ INT_PTR CRTC;
+
+ /* Read CRTC port */
+ CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
+
+ if (CRTC & 1)
+ {
+ CRTC = 0x3D4;
+ }
+ else
+ {
+ CRTC = 0x3B4;
+ }
+
+ /* Vertical display end */
+ WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
+ WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
+}
+
+static BOOLEAN
+PcVideoVesaGetSVGAModeInformation(USHORT Mode, PSVGA_MODE_INFORMATION ModeInformation)
+{
+ REGS Regs;
+
+ RtlZeroMemory((PVOID)BIOSCALLBUFFER, 256);
+
+ /* VESA SuperVGA BIOS - GET SuperVGA MODE INFORMATION
+ * AX = 4F01h
+ * CX = SuperVGA video mode (see #04082 for bitfields)
+ * ES:DI -> 256-byte buffer for mode information (see #00079)
+ * Return:
+ * AL = 4Fh if function supported
+ * AH = status
+ * 00h successful
+ * ES:DI buffer filled
+ * 01h failed
+ *
+ * Desc: Determine the attributes of the specified video mode
+ *
+ * Note: While VBE 1.1 and higher will zero out all unused bytes
+ * of the buffer, v1.0 did not, so applications that want to be
+ * backward compatible should clear the buffer before calling
+ */
+ Regs.w.ax = 0x4F01;
+ Regs.w.cx = Mode;
+ Regs.w.es = BIOSCALLBUFSEGMENT;
+ Regs.w.di = BIOSCALLBUFOFFSET;
+ Int386(0x10, &Regs, &Regs);
+
+ if (Regs.w.ax != 0x004F)
+ {
+ return FALSE;
+ }
+
+ RtlCopyMemory(ModeInformation, (PVOID)BIOSCALLBUFFER, sizeof(SVGA_MODE_INFORMATION));
+
+ DbgPrint((DPRINT_UI, "\n"));
+ DbgPrint((DPRINT_UI, "BiosVesaGetSVGAModeInformation() mode 0x%x\n", Mode));
+ DbgPrint((DPRINT_UI, "ModeAttributes = 0x%x\n", ModeInformation->ModeAttributes));
+ DbgPrint((DPRINT_UI, "WindowAttributesA = 0x%x\n", ModeInformation->WindowAttributesA));
+ DbgPrint((DPRINT_UI, "WindowAttributesB = 0x%x\n", ModeInformation->WindowsAttributesB));
+ DbgPrint((DPRINT_UI, "WindowGranularity = %dKB\n", ModeInformation->WindowGranularity));
+ DbgPrint((DPRINT_UI, "WindowSize = %dKB\n", ModeInformation->WindowSize));
+ DbgPrint((DPRINT_UI, "WindowAStartSegment = 0x%x\n", ModeInformation->WindowAStartSegment));
+ DbgPrint((DPRINT_UI, "WindowBStartSegment = 0x%x\n", ModeInformation->WindowBStartSegment));
+ DbgPrint((DPRINT_UI, "WindowPositioningFunction = 0x%x\n", ModeInformation->WindowPositioningFunction));
+ DbgPrint((DPRINT_UI, "BytesPerScanLine = %d\n", ModeInformation->BytesPerScanLine));
+ DbgPrint((DPRINT_UI, "WidthInPixels = %d\n", ModeInformation->WidthInPixels));
+ DbgPrint((DPRINT_UI, "HeightInPixels = %d\n", ModeInformation->HeightInPixels));
+ DbgPrint((DPRINT_UI, "CharacterWidthInPixels = %d\n", ModeInformation->CharacterWidthInPixels));
+ DbgPrint((DPRINT_UI, "CharacterHeightInPixels = %d\n", ModeInformation->CharacterHeightInPixels));
+ DbgPrint((DPRINT_UI, "NumberOfMemoryPlanes = %d\n", ModeInformation->NumberOfMemoryPlanes));
+ DbgPrint((DPRINT_UI, "BitsPerPixel = %d\n", ModeInformation->BitsPerPixel));
+ DbgPrint((DPRINT_UI, "NumberOfBanks = %d\n", ModeInformation->NumberOfBanks));
+ DbgPrint((DPRINT_UI, "MemoryModel = %d\n", ModeInformation->MemoryModel));
+ DbgPrint((DPRINT_UI, "BankSize = %d\n", ModeInformation->BankSize));
+ DbgPrint((DPRINT_UI, "NumberOfImagePlanes = %d\n", ModeInformation->NumberOfImagePanes));
+ DbgPrint((DPRINT_UI, "---VBE v1.2+ ---\n"));
+ DbgPrint((DPRINT_UI, "RedMaskSize = %d\n", ModeInformation->RedMaskSize));
+ DbgPrint((DPRINT_UI, "RedMaskPosition = %d\n", ModeInformation->RedMaskPosition));
+ DbgPrint((DPRINT_UI, "GreenMaskSize = %d\n", ModeInformation->GreenMaskSize));
+ DbgPrint((DPRINT_UI, "GreenMaskPosition = %d\n", ModeInformation->GreenMaskPosition));
+ DbgPrint((DPRINT_UI, "BlueMaskSize = %d\n", ModeInformation->BlueMaskSize));
+ DbgPrint((DPRINT_UI, "BlueMaskPosition = %d\n", ModeInformation->BlueMaskPosition));
+ DbgPrint((DPRINT_UI, "ReservedMaskSize = %d\n", ModeInformation->ReservedMaskSize));
+ DbgPrint((DPRINT_UI, "ReservedMaskPosition = %d\n", ModeInformation->ReservedMaskPosition));
+ DbgPrint((DPRINT_UI, "\n"));
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetBiosVesaMode(USHORT Mode)
+{
+ REGS Regs;
+
+ /* Int 10h AX=4F02h
+ * VESA SuperVGA BIOS - SET SuperVGA VIDEO MODE
+ *
+ * AX = 4F02h
+ * BX = new video mode
+ * ES:DI -> (VBE 3.0+) CRTC information block, bit mode bit 11 set
+ * Return:
+ * AL = 4Fh if function supported
+ * AH = status
+ * 00h successful
+ * 01h failed
+ *
+ * Values for VESA video mode:
+ * 00h-FFh OEM video modes (see #00010 at AH=00h)
+ * 100h 640x400x256
+ * 101h 640x480x256
+ * 102h 800x600x16
+ * 103h 800x600x256
+ * 104h 1024x768x16
+ * 105h 1024x768x256
+ * 106h 1280x1024x16
+ * 107h 1280x1024x256
+ * 108h 80x60 text
+ * 109h 132x25 text
+ * 10Ah 132x43 text
+ * 10Bh 132x50 text
+ * 10Ch 132x60 text
+ * ---VBE v1.2+ ---
+ * 10Dh 320x200x32K
+ * 10Eh 320x200x64K
+ * 10Fh 320x200x16M
+ * 110h 640x480x32K
+ * 111h 640x480x64K
+ * 112h 640x480x16M
+ * 113h 800x600x32K
+ * 114h 800x600x64K
+ * 115h 800x600x16M
+ * 116h 1024x768x32K
+ * 117h 1024x768x64K
+ * 118h 1024x768x16M
+ * 119h 1280x1024x32K (1:5:5:5)
+ * 11Ah 1280x1024x64K (5:6:5)
+ * 11Bh 1280x1024x16M
+ * ---VBE 2.0+ ---
+ * 120h 1600x1200x256
+ * 121h 1600x1200x32K
+ * 122h 1600x1200x64K
+ * 81FFh special full-memory access mode
+ *
+ * Notes: The special mode 81FFh preserves the contents of the video memory and gives
+ * access to all of the memory; VESA recommends that the special mode be a packed-pixel
+ * mode. For VBE 2.0+, it is required that the VBE implement the mode, but not place it
+ * in the list of available modes (mode information for this mode can be queried
+ * directly, however).. As of VBE 2.0, VESA will no longer define video mode numbers
+ */
+ Regs.w.ax = 0x4F02;
+ Regs.w.bx = Mode;
+ Int386(0x10, &Regs, &Regs);
+
+ if (0x004F != Regs.w.ax)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x25(VOID)
+{
+ PcVideoSetBiosMode(0x03);
+ ScreenWidth = 80;
+ ScreenHeight = 25;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x50_80x43(VOID)
+{
+ if (VIDEOCARD_VGA == PcVideoDetectVideoCard())
+ {
+ PcVideoSetBiosMode(0x12);
+ PcVideoSetFont8x8();
+ PcVideoSelectAlternatePrintScreen();
+ PcVideoDisableCursorEmulation();
+ PcVideoDefineCursor(6, 7);
+ ScreenWidth = 80;
+ ScreenHeight = 50;
+ }
+ else if (VIDEOCARD_EGA == PcVideoDetectVideoCard())
+ {
+ PcVideoSetBiosMode(0x03);
+ PcVideoSetFont8x8();
+ PcVideoSelectAlternatePrintScreen();
+ PcVideoDisableCursorEmulation();
+ PcVideoDefineCursor(6, 7);
+ ScreenWidth = 80;
+ ScreenHeight = 43;
+ }
+ else /* VIDEOCARD_CGA_OR_OTHER */
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x28(VOID)
+{
+ /* FIXME: Is this VGA-only? */
+ PcVideoSetMode80x25();
+ PcVideoSetFont8x14();
+ PcVideoDefineCursor(11, 12);
+ ScreenWidth = 80;
+ ScreenHeight = 28;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x30(VOID)
+{
+ /* FIXME: Is this VGA-only? */
+ PcVideoSetMode80x25();
+ PcVideoSet480ScanLines();
+ ScreenWidth = 80;
+ ScreenHeight = 30;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x34(VOID)
+{
+ /* FIXME: Is this VGA-only? */
+ PcVideoSetMode80x25();
+ PcVideoSet480ScanLines();
+ PcVideoSetFont8x14();
+ PcVideoDefineCursor(11, 12);
+ PcVideoSetDisplayEnd();
+ ScreenWidth = 80;
+ ScreenHeight = 34;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x43(VOID)
+{
+ /* FIXME: Is this VGA-only? */
+ PcVideoSetVerticalResolution(VERTRES_350_SCANLINES);
+ PcVideoSetMode80x25();
+ PcVideoSetFont8x8();
+ PcVideoSelectAlternatePrintScreen();
+ PcVideoDisableCursorEmulation();
+ PcVideoDefineCursor(6, 7);
+ ScreenWidth = 80;
+ ScreenHeight = 43;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode80x60(VOID)
+{
+ /* FIXME: Is this VGA-only? */
+ PcVideoSetMode80x25();
+ PcVideoSet480ScanLines();
+ PcVideoSetFont8x8();
+ PcVideoSelectAlternatePrintScreen();
+ PcVideoDisableCursorEmulation();
+ PcVideoDefineCursor(6, 7);
+ PcVideoSetDisplayEnd();
+ ScreenWidth = 80;
+ ScreenHeight = 60;
+
+ return TRUE;
+}
+
+static BOOLEAN
+PcVideoSetMode(ULONG NewMode)
+{
+ CurrentMemoryBank = 0;
+
+ /* Set the values for the default text modes
+ * If they are setting a graphics mode then
+ * these values will be changed.
+ */
+ BiosVideoMode = NewMode;
+ ScreenWidth = 80;
+ ScreenHeight = 25;
+ BytesPerScanLine = 160;
+ DisplayMode = VideoTextMode;
+ VesaVideoMode = FALSE;
+
+ switch (NewMode)
+ {
+ case VIDEOMODE_NORMAL_TEXT:
+ case 0x03: /* BIOS 80x25 text mode number */
+ return PcVideoSetMode80x25();
+ case VIDEOMODE_EXTENDED_TEXT:
+ return PcVideoSetMode80x50_80x43();
+ case VIDEOMODE_80X28:
+ return PcVideoSetMode80x28();
+ case VIDEOMODE_80X30:
+ return PcVideoSetMode80x30();
+ case VIDEOMODE_80X34:
+ return PcVideoSetMode80x34();
+ case VIDEOMODE_80X43:
+ return PcVideoSetMode80x43();
+ case VIDEOMODE_80X60:
+ return PcVideoSetMode80x60();
+ }
+
+ if (0x12 == NewMode)
+ {
+ /* 640x480x16 */
+ PcVideoSetBiosMode(NewMode);
+ WRITE_PORT_USHORT((USHORT*)0x03CE, 0x0F01); /* For some reason this is necessary? */
+ ScreenWidth = 640;
+ ScreenHeight = 480;
+ BytesPerScanLine = 80;
+ BiosVideoMode = NewMode;
+ DisplayMode = VideoGraphicsMode;
+
+ return TRUE;
+ }
+ else if (0x13 == NewMode)
+ {
+ /* 320x200x256 */
+ PcVideoSetBiosMode(NewMode);
+ ScreenWidth = 320;
+ ScreenHeight = 200;
+ BytesPerScanLine = 320;
+ BiosVideoMode = NewMode;
+ DisplayMode = VideoGraphicsMode;
+
+ return TRUE;
+ }
+ else if (0x0108 <= NewMode && NewMode <= 0x010C)
+ {
+ /* VESA Text Mode */
+ if (! PcVideoVesaGetSVGAModeInformation(NewMode, &VesaVideoModeInformation))
+ {
+ return FALSE;
+ }
+
+ if (! PcVideoSetBiosVesaMode(NewMode))
+ {
+ return FALSE;
+ }
+
+ ScreenWidth = VesaVideoModeInformation.WidthInPixels;
+ ScreenHeight = VesaVideoModeInformation.HeightInPixels;
+ BytesPerScanLine = VesaVideoModeInformation.BytesPerScanLine;
+ BiosVideoMode = NewMode;
+ DisplayMode = VideoTextMode;
+ VesaVideoMode = TRUE;
+
+ return TRUE;
+ }
+ else
+ {
+ /* VESA Graphics Mode */
+ if (! PcVideoVesaGetSVGAModeInformation(NewMode, &VesaVideoModeInformation))
+ {
+ return FALSE;
+ }
+
+ if (! PcVideoSetBiosVesaMode(NewMode))
+ {
+ return FALSE;
+ }
+
+ ScreenWidth = VesaVideoModeInformation.WidthInPixels;
+ ScreenHeight = VesaVideoModeInformation.HeightInPixels;
+ BytesPerScanLine = VesaVideoModeInformation.BytesPerScanLine;
+ BiosVideoMode = NewMode;
+ DisplayMode = VideoTextMode;
+ VesaVideoMode = TRUE;
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static VOID
+PcVideoSetBlinkBit(BOOLEAN Enable)
+{
+ REGS Regs;
+
+ /* Int 10h AX=1003h
+ * VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
+ *
+ * AX = 1003h
+ * BL = new state
+ * 00h background intensity enabled
+ * 01h blink enabled
+ * BH = 00h to avoid problems on some adapters
+ * Return:
+ * Nothing
+ *
+ * Note: although there is no function to get
+ * the current status, bit 5 of 0040h:0065h
+ * indicates the state.
+ */
+ Regs.w.ax = 0x1003;
+ Regs.w.bx = Enable ? 0x0001 : 0x0000;
+ Int386(0x10, &Regs, &Regs);
+}
+
+static VOID
+PcVideoSetMemoryBank(USHORT BankNumber)
+{
+ REGS Regs;
+
+ if (CurrentMemoryBank != BankNumber)
+ {
+ /* Int 10h AX=4F05h
+ * VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL
+ *
+ * AX = 4F05h
+ * BH = subfunction
+ * 00h select video memory window
+ * 01h get video memory window
+ * DX = window address in video memory (in granularity units)
+ * Return:
+ * DX = window address in video memory (in gran. units)
+ * BL = window number
+ * 00h window A
+ * 01h window B.
+ * Return:
+ * AL = 4Fh if function supported
+ * AH = status
+ * 00h successful
+ * 01h failed
+ */
+ Regs.w.ax = 0x4F05;
+ Regs.w.bx = 0x0000;
+ Regs.w.dx = BankNumber;
+ Int386(0x10, &Regs, &Regs);
+
+ if (0x004F == Regs.w.ax)
+ {
+ CurrentMemoryBank = BankNumber;
+ }
+ }
+}
+
+VIDEODISPLAYMODE
+PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
+{
+ ULONG VideoMode = VIDEOMODE_NORMAL_TEXT;
+
+ if (NULL == DisplayModeName || '\0' == *DisplayModeName)
+ {
+ PcVideoSetBlinkBit(! Init);
+ return DisplayMode;
+ }
+
+ if (VIDEOCARD_CGA_OR_OTHER == PcVideoDetectVideoCard())
+ {
+ DbgPrint((DPRINT_UI, "CGA or other display adapter detected.\n"));
+ printf("CGA or other display adapter detected.\n");
+ printf("Using 80x25 text mode.\n");
+ VideoMode = VIDEOMODE_NORMAL_TEXT;
+ }
+ else if (VIDEOCARD_EGA == PcVideoDetectVideoCard())
+ {
+ DbgPrint((DPRINT_UI, "EGA display adapter detected.\n"));
+ printf("EGA display adapter detected.\n");
+ printf("Using 80x25 text mode.\n");
+ VideoMode = VIDEOMODE_NORMAL_TEXT;
+ }
+ else /* if (VIDEOCARD_VGA == PcVideoDetectVideoCard()) */
+ {
+ DbgPrint((DPRINT_UI, "VGA display adapter detected.\n"));
+
+ if (0 == _stricmp(DisplayModeName, "NORMAL_VGA"))
+ {
+ VideoMode = VIDEOMODE_NORMAL_TEXT;
+ }
+ else if (0 == _stricmp(DisplayModeName, "EXTENDED_VGA"))
+ {
+ VideoMode = VIDEOMODE_EXTENDED_TEXT;
+ }
+ else
+ {
+ VideoMode = atoi(DisplayModeName);
+ }
+ }
+
+ if (! PcVideoSetMode(VideoMode))
+ {
+ printf("Error: unable to set video display mode 0x%x\n", (int) VideoMode);
+ printf("Defaulting to 80x25 text mode.\n");
+ printf("Press any key to continue.\n");
+ PcConsGetCh();
+
+ PcVideoSetMode(VIDEOMODE_NORMAL_TEXT);
+ }
+
+ PcVideoSetBlinkBit(! Init);
+
+
+ return DisplayMode;
+}
+
+VOID
+PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
+{
+ *Width = ScreenWidth;
+ *Height = ScreenHeight;
+ if (VideoGraphicsMode == DisplayMode && VesaVideoMode)
+ {
+ if (16 == VesaVideoModeInformation.BitsPerPixel)
+ {
+ /* 16-bit color modes give green an extra bit (5:6:5)
+ * 15-bit color modes have just 5:5:5 for R:G:B */
+ *Depth = (6 == VesaVideoModeInformation.GreenMaskSize ? 16 : 15);
+ }
+ else
+ {
+ *Depth = VesaVideoModeInformation.BitsPerPixel;
+ }
+ }
+ else
+ {
+ *Depth = 0;
+ }
+}
+
+ULONG
+PcVideoGetBufferSize(VOID)
+{
+ return ScreenHeight * BytesPerScanLine;
+}
+
+VOID
+PcVideoSetTextCursorPosition(ULONG X, ULONG Y)
+{
+ REGS Regs;
+
+ /* Int 10h AH=02h
+ * VIDEO - SET CURSOR POSITION
+ *
+ * AH = 02h
+ * BH = page number
+ * 0-3 in modes 2&3
+ * 0-7 in modes 0&1
+ * 0 in graphics modes
+ * DH = row (00h is top)
+ * DL = column (00h is left)
+ * Return:
+ * Nothing
+ */
+ Regs.b.ah = 0x02;
+ Regs.b.bh = 0x00;
+ Regs.b.dh = Y;
+ Regs.b.dl = X;
+ Int386(0x10, &Regs, &Regs);
+}
+
+VOID
+PcVideoHideShowTextCursor(BOOLEAN Show)
+{
+ if (Show)
+ {
+ PcVideoDefineCursor(0x0D, 0x0E);
+ }
+ else
+ {
+ PcVideoDefineCursor(0x20, 0x00);
+ }
+}
+
+VOID
+PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
+{
+ ULONG BanksToCopy;
+ ULONG BytesInLastBank;
+ ULONG CurrentBank;
+ ULONG BankSize;
+
+ /* PcVideoWaitForVerticalRetrace(); */
+
+ /* Text mode (BIOS or VESA) */
+ if (VideoTextMode == DisplayMode)
+ {
+ RtlCopyMemory((PVOID) VIDEOTEXT_MEM_ADDRESS, Buffer, PcVideoGetBufferSize());
+ }
+ /* VESA graphics mode */
+ else if (VideoGraphicsMode == DisplayMode && VesaVideoMode)
+ {
+ BankSize = VesaVideoModeInformation.WindowGranularity << 10;
+ BanksToCopy = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) / BankSize;
+ BytesInLastBank = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) % BankSize;
+
+ /* Copy all the banks but the last one because
+ * it is probably a partial bank */
+ for (CurrentBank = 0; CurrentBank < BanksToCopy; CurrentBank++)
+ {
+ PcVideoSetMemoryBank(CurrentBank);
+ RtlCopyMemory((PVOID) VIDEOVGA_MEM_ADDRESS, (char *) Buffer + CurrentBank * BankSize, BankSize);
+ }
+
+ /* Copy the remaining bytes into the last bank */
+ PcVideoSetMemoryBank(CurrentBank);
+ RtlCopyMemory((PVOID)VIDEOVGA_MEM_ADDRESS, (char *) Buffer + CurrentBank * BankSize, BytesInLastBank);
+ }
+ /* BIOS graphics mode */
+ else
+ {
+ UNIMPLEMENTED;
+ }
+}
+
+VOID
+PcVideoClearScreen(UCHAR Attr)
+{
+ USHORT AttrChar;
+ USHORT *BufPtr;
+
+ AttrChar = ((USHORT) Attr << 8) | ' ';
+ for (BufPtr = (USHORT *) VIDEOTEXT_MEM_ADDRESS;
+ BufPtr < (USHORT *) (VIDEOTEXT_MEM_ADDRESS + VIDEOTEXT_MEM_SIZE);
+ BufPtr++)
+ {
+ *BufPtr = AttrChar;
+ }
+}
+
+VOID
+PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
+{
+ USHORT *BufPtr;
+
+ BufPtr = (USHORT *) (ULONG_PTR)(VIDEOTEXT_MEM_ADDRESS + Y * BytesPerScanLine + X * 2);
+ *BufPtr = ((USHORT) Attr << 8) | (Ch & 0xff);
+}
+
+BOOLEAN
+PcVideoIsPaletteFixed(VOID)
+{
+ return FALSE;
+}
+
+VOID
+PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
+{
+ WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_WRITE, Color);
+ WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Red);
+ WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Green);
+ WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Blue);
+}
+
+VOID
+PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue)
+{
+ WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_READ, Color);
+ *Red = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA);
+ *Green = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA);
+ *Blue = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA);
+}
+
+VOID
+PcVideoSync(VOID)
+{
+ while (1 == (READ_PORT_UCHAR((UCHAR*)VIDEOPORT_VERTICAL_RETRACE) & 0x08))
+ {
+ /*
+ * Keep reading the port until bit 3 is clear
+ * This waits for the current retrace to end and
+ * we can catch the next one so we know we are
+ * getting a full retrace.
+ */
+ }
+
+ while (0 == (READ_PORT_UCHAR((UCHAR*)VIDEOPORT_VERTICAL_RETRACE) & 0x08))
+ {
+ /*
+ * Keep reading the port until bit 3 is set
+ * Now that we know we aren't doing a vertical
+ * retrace we need to wait for the next one.
+ */
+ }
+}
+
+VOID
+PcVideoPrepareForReactOS(IN BOOLEAN Setup)
+{
+ if (Setup)
+ {
+ PcVideoSetMode80x50_80x43();
+ }
+ else
+ {
+ PcVideoSetBiosMode(0x12);
+ }
+ PcVideoHideShowTextCursor(FALSE);
+}
+
+/* EOF */
{
CHAR SettingName[80];
CHAR SettingValue[80];
- ULONG SectionId;
+ ULONG_PTR SectionId;
ULONG OperatingSystemCount;
PCSTR *OperatingSystemSectionNames;
PCSTR *OperatingSystemDisplayNames;
{
CHAR DefaultOSText[80];
PCSTR DefaultOSName;
- ULONG SectionId;
+ ULONG_PTR SectionId;
ULONG DefaultOS = 0;
ULONG Idx;
{
CHAR TimeOutText[20];
LONG TimeOut;
- ULONG SectionId;
+ ULONG_PTR SectionId;
TimeOut = CmdLineGetTimeOut();
if (0 <= TimeOut)
// Get ramdisk base address
//
Setting = strstr(CmdLine, "rdbase=");
- if (Setting) gRamDiskBase = (PVOID)strtoul(Setting +
+ if (Setting) gRamDiskBase = (PVOID)(ULONG_PTR)strtoull(Setting +
sizeof("rdbase=") -
sizeof(ANSI_NULL),
NULL,
if (ComPort == 0)
{
- if (Rs232DoesComPortExist ((PUCHAR)BaseArray[2]))
+ if (Rs232DoesComPortExist ((PUCHAR)(ULONG_PTR)BaseArray[2]))
{
- Rs232PortBase = (PUCHAR)BaseArray[2];
+ Rs232PortBase = (PUCHAR)(ULONG_PTR)BaseArray[2];
Rs232ComPort = 2;
/*#ifndef NDEBUG
sprintf (buffer,
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
- else if (Rs232DoesComPortExist ((PUCHAR)BaseArray[1]))
+ else if (Rs232DoesComPortExist ((PUCHAR)(ULONG_PTR)BaseArray[1]))
{
- Rs232PortBase = (PUCHAR)BaseArray[1];
+ Rs232PortBase = (PUCHAR)(ULONG_PTR)BaseArray[1];
Rs232ComPort = 1;
/*#ifndef NDEBUG
sprintf (buffer,
}
else
{
- if (Rs232DoesComPortExist ((PUCHAR)BaseArray[ComPort]))
+ if (Rs232DoesComPortExist ((PUCHAR)(ULONG_PTR)BaseArray[ComPort]))
{
- Rs232PortBase = (PUCHAR)BaseArray[ComPort];
+ Rs232PortBase = (PUCHAR)(ULONG_PTR)BaseArray[ComPort];
Rs232ComPort = ComPort;
/*#ifndef NDEBUG
sprintf (buffer,
BOOLEAN Rs232PortInUse(ULONG Base)
{
#ifdef DBG
- return PortInitialized && Rs232PortBase == (PUCHAR)Base ? TRUE : FALSE;
+ return PortInitialized && Rs232PortBase == (PUCHAR)(ULONG_PTR)Base ? TRUE : FALSE;
#else
return FALSE;
#endif
//#define DEBUG_ALL
//#define DEBUG_INIFILE
//#define DEBUG_REACTOS
-//#define DEBUG_CUSTOM
-#define DEBUG_NONE
+#define DEBUG_CUSTOM
+//#define DEBUG_NONE
#if defined (DEBUG_ALL)
ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
#elif defined (DEBUG_REACTOS)
ULONG DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY;
#elif defined (DEBUG_CUSTOM)
-ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY |
- DPRINT_REACTOS | DPRINT_WINDOWS | DPRINT_HWDETECT;
+ULONG DebugPrintMask = DPRINT_WARNING |
+ DPRINT_UI | DPRINT_CACHE | DPRINT_REACTOS |
+ DPRINT_LINUX;
#else //#elif defined (DEBUG_NONE)
ULONG DebugPrintMask = 0;
#endif
VOID DebugPrint(ULONG Mask, char *format, ...)
{
va_list ap;
- char Buffer[4096];
+ char Buffer[2096];
char *ptr = Buffer;
// Mask out unwanted debug messages
VOID DebugPrint1(char *format, ...)
{
va_list ap;
- char Buffer[4096];
+ char Buffer[2096];
char *ptr = Buffer;
va_start(ap, format);
//
// Get actual pointers and lengths
//
- StartAddress = (PVOID)((ULONG)SectorNumber * 512);
+ StartAddress = (PVOID)((ULONG_PTR)SectorNumber * 512);
Length = SectorCount * 512;
//
<library>ppcmmu</library>
</module>
</if>
+ <if property="ARCH" value="amd64">
+ <module name="freeldr" type="bootloader">
+ <bootstrap installbase="loader" />
+ <library>freeldr_startup</library>
+ <library>freeldr_base64k</library>
+ <library>freeldr_base</library>
+ <library>freeldr_arch</library>
+ <library>freeldr_main</library>
+ <library>rossym</library>
+ <library>cmlib</library>
+ <library>rtl</library>
+ <library>libcntpr</library>
+ <linkerflag>-static</linkerflag>
+ <linkerflag>-lgcc</linkerflag>
+ </module>
+ </if>
</group>
<file>versuart.c</file>
</if>
</directory>
+
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>_alloca.S</file>
+ <file>mach.c</file>
+ <file>hardware.c</file>
+ <file>hwacpi.c</file>
+ <file>hwapm.c</file>
+ <file>hwpci.c</file>
+ <file>i386disk.c</file>
+ <file>i386rtl.c</file>
+ <file>i386vid.c</file>
+ <file>loader.c</file>
+ <file>pccons.c</file>
+ <file>pcdisk.c</file>
+ <file>pcmem.c</file>
+ <file>pcrtc.c</file>
+ <file>pcvideo.c</file>
+ </directory>
+ </if>
+
</directory>
</module>
<file>mb.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>drvmap.S</file>
+ <file>i386cpu.S</file>
+ <file>i386idt.S</file>
+ <file>i386trap.S</file>
+ <file>mb.S</file>
+ </directory>
+ </if>
</directory>
</module>
<file>arch.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file first="true">fathelp.S</file>
+ <file>arch.S</file>
+ </directory>
+ </if>
</directory>
</module>
}
// Copy the data to their buffer
- RtlCopyMemory(InodeBuffer, (PVOID)(FILESYSBUFFER + (InodeOffsetInBlock * EXT3_INODE_SIZE(Ext2SuperBlock))), sizeof(EXT2_INODE));
+ RtlCopyMemory(InodeBuffer, (PVOID)(ULONG_PTR)(FILESYSBUFFER + (InodeOffsetInBlock * EXT3_INODE_SIZE(Ext2SuperBlock))), sizeof(EXT2_INODE));
DbgPrint((DPRINT_FILESYSTEM, "Dumping inode information:\n"));
DbgPrint((DPRINT_FILESYSTEM, "i_mode = 0x%x\n", InodeBuffer->i_mode));
#ifndef __ARCH_H
#define __ARCH_H
+#ifdef _M_AMD64
+#include <arch/amd64/amd64.h>
+#endif
+
/* Defines needed for switching between real and protected mode */
#define NULL_DESC 0x00 /* NULL descriptor */
#define PMODE_CS 0x08 /* PMode code selector, base 0 limit 4g */
#define STACK16ADDR 0x7000 /* The 16-bit stack top will be at 0000:7000 */
#define STACK32ADDR 0x78000 /* The 32-bit stack top will be at 7000:8000, or 0x78000 */
-#ifdef _M_IX86
+#if defined (_M_IX86) || defined (_M_AMD64)
#define BIOSCALLBUFFER 0x78000 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFSEGMENT 0x7800 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2003 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __AMD64_AMD64_H_
+#define __AMD64_AMD64_H_
+
+#define STACK64ADDR 0x74000 /* The 64-bit stack top will be at 0x74000 */
+
+#define LMODE_CS 0x08
+#define LMODE_DS 0x10
+
+/* Where we put out initial page tables */
+#define PML4_PAGENUM 60 // Put it high enough so it doesn't interfere with freeldr
+
+#define PAGESIZE 4096
+#define PDP_PAGENUM (PML4_PAGENUM + 1)
+#define PD_PAGENUM (PDP_PAGENUM + 1)
+#define PML4_ADDRESS (PML4_PAGENUM * PAGESIZE)
+#define PDP_ADDRESS (PDP_PAGENUM * PAGESIZE)
+#define PML4_SEG (PML4_ADDRESS / 16)
+#define PML4_PAGES 3
+#define PAGETABLE_SIZE PML4_PAGES * PAGESIZE
+
+#if 0
+#ifndef ASM
+typedef struct
+{
+ unsigned long long rax;
+ unsigned long long rbx;
+ unsigned long long rcx;
+ unsigned long long rdx;
+
+ unsigned long long rsi;
+ unsigned long long rdi;
+
+ unsigned long long r8;
+ unsigned long long r9;
+ unsigned long long r10;
+ unsigned long long r11;
+ unsigned long long r12;
+ unsigned long long r13;
+ unsigned long long r14;
+ unsigned long long r15;
+
+ unsigned short ds;
+ unsigned short es;
+ unsigned short fs;
+ unsigned short gs;
+
+ unsigned long long rflags;
+
+} QWORDREGS;
+#endif /* ! ASM */
+#endif
+
+#endif /* __AMD64_AMD64_H_ */
+
+/* EOF */
--- /dev/null
+/*
+ * FreeLoader
+ *
+ * Copyright (C) 2003 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __AMD64_HARDWARE_H_
+#define __AMD64_HARDWARE_H_
+
+#ifndef __REGISTRY_H
+#include "../../reactos/registry.h"
+#endif
+
+#define CONFIG_CMD(bus, dev_fn, where) \
+ (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
+
+
+//
+// Static heap for ARC Hardware Component Tree
+// 16KB oughta be enough for anyone.
+//
+#define HW_MAX_ARC_HEAP_SIZE 16 * 1024
+
+//
+// ARC Component Configuration Routines
+//
+VOID
+NTAPI
+FldrSetComponentInformation(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN IDENTIFIER_FLAG Flags,
+ IN ULONG Key,
+ IN ULONG Affinity
+);
+
+VOID
+NTAPI
+FldrSetIdentifier(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN PCHAR Identifier
+);
+
+VOID
+NTAPI
+FldrCreateSystemKey(
+ OUT PCONFIGURATION_COMPONENT_DATA *SystemKey
+);
+
+VOID
+NTAPI
+FldrCreateComponentKey(
+ IN PCONFIGURATION_COMPONENT_DATA SystemKey,
+ IN PWCHAR BusName,
+ IN ULONG BusNumber,
+ IN CONFIGURATION_CLASS Class,
+ IN CONFIGURATION_TYPE Type,
+ OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey
+);
+
+VOID
+NTAPI
+FldrSetConfigurationData(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
+ IN ULONG Size
+);
+
+
+/* PROTOTYPES ***************************************************************/
+
+/* hardware.c */
+
+VOID StallExecutionProcessor(ULONG Microseconds);
+
+VOID HalpCalibrateStallExecution(VOID);
+
+/* hwacpi.c */
+VOID DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
+
+/* hwapm.c */
+VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
+
+/* hwpci.c */
+VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
+
+/* i386cpu.S */
+ULONG CpuidSupported(VOID);
+VOID GetCpuid(ULONG Level,
+ ULONG *eax,
+ ULONG *ebx,
+ ULONG *ecx,
+ ULONG *edx);
+ULONGLONG RDTSC(VOID);
+
+/* i386pnp.S */
+ULONG_PTR PnpBiosSupported(VOID);
+ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize,
+ ULONG *NodeCount);
+ULONG PnpBiosGetDeviceNode(UCHAR *NodeId,
+ UCHAR *NodeBuffer);
+
+#endif /* __AMD64_HARDWARE_H_ */
+
+/* EOF */
--- /dev/null
+/* $Id: machpc.h 32135 2008-02-05 11:13:17Z ros-arm-bringup $
+ *
+ * FreeLoader
+ *
+ * Copyright (C) 2003 Eric Kohl
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __I386_MACHPC_H_
+#define __I386_MACHPC_H_
+
+#ifndef __MEMORY_H
+#include "mm.h"
+#endif
+
+VOID PcMachInit(const char *CmdLine);
+
+VOID PcConsPutChar(int Ch);
+BOOLEAN PcConsKbHit();
+int PcConsGetCh();
+
+VOID PcVideoClearScreen(UCHAR Attr);
+VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init);
+VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
+ULONG PcVideoGetBufferSize(VOID);
+VOID PcVideoSetTextCursorPosition(ULONG X, ULONG Y);
+VOID PcVideoHideShowTextCursor(BOOLEAN Show);
+VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
+VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
+BOOLEAN PcVideoIsPaletteFixed(VOID);
+VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
+VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
+VOID PcVideoSync(VOID);
+VOID PcVideoPrepareForReactOS(IN BOOLEAN Setup);
+VOID PcPrepareForReactOS(IN BOOLEAN Setup);
+
+ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
+
+BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
+BOOLEAN PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
+BOOLEAN PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
+ULONG PcDiskGetCacheableBlockCount(ULONG DriveNumber);
+
+VOID PcRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second);
+
+PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID);
+
+#endif /* __I386_MACHPC_H_ */
+
+/* EOF */
// i386 BIOS Disk Functions (i386disk.c)
//
///////////////////////////////////////////////////////////////////////////////////////
-#ifdef __i386__
+#if defined(__i386__) || defined(_M_AMD64)
BOOLEAN DiskResetController(ULONG DriveNumber);
BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber);
//VOID DiskStopFloppyMotor(VOID);
BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize);
-#endif // defined __i386__
+#endif // defined __i386__ || defined(_M_AMD64)
///////////////////////////////////////////////////////////////////////////////////////
//
#include <arch/arm/hardware.h>
#elif defined(_M_MIPS)
#include <arch/mips/arcbios.h>
+#elif defined(_M_AMD64)
+#include <arch/amd64/hardware.h>
+#include <arch/amd64/machpc.h>
#endif
/* misc files */
#include <keycodes.h>
#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n")
#endif
+#ifdef _M_AMD64
+#define KeAmd64EraseFlags(x) __asm__ __volatile__("pushq $0 ; popfq\n")
+#endif
+
VOID BootMain(LPSTR CmdLine);
VOID RunLoader(VOID);
BOOLEAN IniFileInitialize(VOID);
-BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId);
-ULONG IniGetNumSectionItems(ULONG SectionId);
-ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex);
-ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex);
-BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
-BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize);
-BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId);
-BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue);
+BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId);
+ULONG IniGetNumSectionItems(ULONG_PTR SectionId);
+ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex);
+ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex);
+BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
+BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize);
+BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId);
+BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue);
#endif // defined __PARSEINI_H
#endif // defined __i386__ or _PPC_ or _MIPS_
+#if defined (_AMD64_)
+
+#define MM_PAGE_SIZE 4096
+#define MM_PAGE_MASK 0xFFF
+#define MM_PAGE_SHIFT 12
+
+#define MM_SIZE_TO_PAGES(a) \
+ ( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) )
+
+#endif
+
// HEAP and STACK size
#define HEAP_PAGES 0x400
#define STACK_PAGES 0x00
#include <freeldr.h>
#include <debug.h>
-BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId)
+BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId)
{
PINI_SECTION Section;
{
// We found it
if (SectionId)
- *SectionId = (ULONG)Section;
+ *SectionId = (ULONG_PTR)Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n", SectionId));
return TRUE;
}
return FALSE;
}
-ULONG IniGetNumSectionItems(ULONG SectionId)
+ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
return Section->SectionItemCount;
}
-PINI_SECTION_ITEM IniGetSettingByNumber(ULONG SectionId, ULONG SettingNumber)
+PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
return NULL;
}
-ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex)
+ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
{
PINI_SECTION_ITEM SectionItem;
return (strlen(SectionItem->ItemName) + 1);
}
-ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex)
+ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
{
PINI_SECTION_ITEM SectionItem;
return (strlen(SectionItem->ItemValue) + 1);
}
-BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
+BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
{
PINI_SECTION_ITEM SectionItem;
DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
return TRUE;
}
-BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
+BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
return FALSE;
}
-BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId)
+BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId)
{
PINI_SECTION Section;
IniFileSectionCount++;
InsertHeadList(&IniFileSectionListHead, &Section->ListEntry);
- *SectionId = (ULONG)Section;
+ *SectionId = (ULONG_PTR)Section;
return TRUE;
}
-BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue)
+BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
MmUpdateLastFreePageHint(PageLookupTableAddress, TotalPagesInLookupTable);
// Add machine-dependent stuff
-#ifdef __i386__
+#if defined (__i386__) || defined (_M_AMD64)
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x00, 1, LoaderFirmwarePermanent); // realmode int vectors
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x01, 7, LoaderFirmwareTemporary); // freeldr stack + cmdline
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x08, 0x70, LoaderLoadedProgram); // freeldr image (roughly max. 0x64 pages)
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x90, 0x10, LoaderOsloaderHeap); // Disk read buffer for int 13h. DISKREADBUFFER
MmMarkPagesInLookupTable(PageLookupTableAddress, 0xA0, 0x60, LoaderFirmwarePermanent); // ROM / Video
MmMarkPagesInLookupTable(PageLookupTableAddress, 0xFFF, 1, LoaderSpecialMemory); // unusable memory
+#if defined (_M_AMD64)
+ MmMarkPagesInLookupTable(PageLookupTableAddress, PML4_PAGENUM, PML4_PAGES, LoaderSpecialMemory); // the page table
+#endif
#elif __arm__
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x00, 1, LoaderFirmwarePermanent); // arm exception handlers
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x01, 7, LoaderFirmwareTemporary); // arm board block + freeldr stack + cmdline
ULONG MmGetPageNumberFromAddress(PVOID Address)
{
- return ((ULONG)Address) / MM_PAGE_SIZE;
+ return ((ULONG_PTR)Address) / MM_PAGE_SIZE;
}
PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount)
DbgPrint((DPRINT_MEMORY, "MmGetEndAddressOfAnyMemory() returning 0x%x\n", (ULONG)EndAddressOfMemory));
- return (PVOID)(ULONG)EndAddressOfMemory;
+ return (PVOID)(ULONG_PTR)EndAddressOfMemory;
}
ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount)
ULONG PageCount;
ULONGLONG EndAddress;
- EndAddress = (ULONGLONG)(ULONG)MmGetEndAddressOfAnyMemory(BiosMemoryMap, MapCount);
+ EndAddress = (ULONGLONG)(ULONG_PTR)MmGetEndAddressOfAnyMemory(BiosMemoryMap, MapCount);
// Since MmGetEndAddressOfAnyMemory() won't
// return addresses higher than 0xFFFFFFFF
if (TempBiosMemoryMap[Index].Length >= PageLookupTableSize)
{
- PageLookupTableMemAddress = (PVOID)(ULONG)
+ PageLookupTableMemAddress = (PVOID)(ULONG_PTR)
(TempBiosMemoryMap[Index].BaseAddress + (TempBiosMemoryMap[Index].Length - PageLookupTableSize));
break;
}
for (Index=0; Index<MapCount; Index++)
{
- MemoryMapStartPage = MmGetPageNumberFromAddress((PVOID)(ULONG)BiosMemoryMap[Index].BaseAddress);
- MemoryMapEndPage = MmGetPageNumberFromAddress((PVOID)(ULONG)(BiosMemoryMap[Index].BaseAddress + BiosMemoryMap[Index].Length - 1));
+ MemoryMapStartPage = MmGetPageNumberFromAddress((PVOID)(ULONG_PTR)BiosMemoryMap[Index].BaseAddress);
+ MemoryMapEndPage = MmGetPageNumberFromAddress((PVOID)(ULONG_PTR)(BiosMemoryMap[Index].BaseAddress + BiosMemoryMap[Index].Length - 1));
MemoryMapPageCount = (MemoryMapEndPage - MemoryMapStartPage) + 1;
switch (BiosMemoryMap[Index].Type)
MmAllocatePagesInLookupTable(PageLookupTableAddress, FirstFreePageFromEnd, PagesNeeded, MemoryType);
FreePagesInLookupTable -= PagesNeeded;
- MemPointer = (PVOID)(FirstFreePageFromEnd * MM_PAGE_SIZE);
+ MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE);
#ifdef DBG
DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd));
MmAllocatePagesInLookupTable(PageLookupTableAddress, StartPageNumber, PagesNeeded, MemoryType);
FreePagesInLookupTable -= PagesNeeded;
- MemPointer = (PVOID)(StartPageNumber * MM_PAGE_SIZE);
+ MemPointer = (PVOID)((ULONG_PTR)StartPageNumber * MM_PAGE_SIZE);
#ifdef DBG
DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, StartPageNumber));
PagesNeeded = ROUND_UP(MemorySize, MM_PAGE_SIZE) / MM_PAGE_SIZE;
// Get the page number for their desired address
- DesiredAddressPageNumber = (ULONG)DesiredAddress / MM_PAGE_SIZE;
+ DesiredAddressPageNumber = (ULONG_PTR)DesiredAddress / MM_PAGE_SIZE;
// If we don't have enough available mem
// then return NULL
MmAllocatePagesInLookupTable(PageLookupTableAddress, FirstFreePageFromEnd, PagesNeeded, MemoryType);
FreePagesInLookupTable -= PagesNeeded;
- MemPointer = (PVOID)(FirstFreePageFromEnd * MM_PAGE_SIZE);
+ MemPointer = (PVOID)((ULONG_PTR)FirstFreePageFromEnd * MM_PAGE_SIZE);
#ifdef DBG
DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d.\n", MemorySize, PagesNeeded, FirstFreePageFromEnd));
CHAR SettingName[260];
CHAR SettingValue[260];
ULONG OperatingSystemCount;
- ULONG SectionId;
- ULONG OperatingSystemSectionId;
+ ULONG_PTR SectionId;
+ ULONG_PTR OperatingSystemSectionId;
ULONG SectionSettingCount;
PCHAR *OperatingSystemSectionNames;
PCHAR *OperatingSystemDisplayNames;
USHORT Hint)
{
PIMAGE_EXPORT_DIRECTORY ExportDir;
- PULONG * ExFunctions;
- PULONG * ExNames;
+ ULONG * ExFunctions;
+ ULONG * ExNames;
USHORT * ExOrdinals;
PVOID ExName;
ULONG Ordinal;
/*
* Get header pointers
*/
- ExNames = (PULONG *)RVA(BaseAddress, ExportDir->AddressOfNames);
+ ExNames = (ULONG *)RVA(BaseAddress, ExportDir->AddressOfNames);
ExOrdinals = (USHORT *)RVA(BaseAddress, ExportDir->AddressOfNameOrdinals);
- ExFunctions = (PULONG *)RVA(BaseAddress, ExportDir->AddressOfFunctions);
-
+ ExFunctions = (ULONG *)RVA(BaseAddress, ExportDir->AddressOfFunctions);
+
/*
* Check the hint first
*/
CHAR szKernelName[255];
CHAR szFileName[255];
CHAR MsgBuffer[256];
- ULONG SectionId;
+ ULONG_PTR SectionId;
PIMAGE_NT_HEADERS NtHeader;
PVOID LoadBase;
ULONG_PTR Base;
* Setup multiboot information structure
*/
LoaderBlock.CommandLine = reactos_kernel_cmdline;
- LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
- LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
+ LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
+ LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.DrivesAddr = reactos_arc_disk_info;
- LoaderBlock.RdAddr = (ULONG)gRamDiskBase;
+ LoaderBlock.RdAddr = (ULONG_PTR)gRamDiskBase;
LoaderBlock.RdLength = gRamDiskSize;
- LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
+ LoaderBlock.MmapLength = (SIZE_T)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
ULONG i;
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
- LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
+ LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
{
/*
* Detect hardware
*/
- LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
+ LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
UiDrawProgressBarCenter(5, 100, szLoadingMsg);
LoaderBlock.DrivesCount = reactos_disk_count;
}
#undef DbgPrint
+#if 0
ULONG
DbgPrint(const char *Format, ...)
{
va_end(ap);
return 0;
}
+#else
+VOID DebugPrintChar(UCHAR Character);
+ULONG
+DbgPrint(const char *Format, ...)
+{
+ va_list ap;
+ CHAR Buffer[512];
+ ULONG Length;
+ char *ptr = Buffer;
+
+ va_start(ap, Format);
+
+ /* Construct a string */
+ Length = _vsnprintf(Buffer, 512, Format, ap);
+
+ /* Check if we went past the buffer */
+ if (Length == -1)
+ {
+ /* Terminate it if we went over-board */
+ Buffer[sizeof(Buffer) - 1] = '\n';
+
+ /* Put maximum */
+ Length = sizeof(Buffer);
+ }
+
+ while (*ptr)
+ {
+ DebugPrintChar(*ptr++);
+ }
+
+ va_end(ap);
+ return 0;
+}
+#endif
/* EOF */
PLIST_ENTRY Ptr;
PVALUE Value = NULL;
- DbgPrint((DPRINT_REGISTRY, "Key 0x%x, ValueName '%S', Type %d, Data 0x%x, DataSize %d\n",
- (int)Key, ValueName, (int)Type, (int)Data, (int)DataSize));
+ DbgPrint((DPRINT_REGISTRY, "Key 0x%p, ValueName '%S', Type %ld, Data 0x%p, DataSize %ld\n",
+ Key, ValueName, Type, Data, DataSize));
if ((ValueName == NULL) || (*ValueName == 0))
{
/* Setup multiboot information structure */
LoaderBlock.CommandLine = reactos_kernel_cmdline;
- LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
- LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
+ LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
+ LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
-#ifdef _M_IX86
+#if defined (_M_IX86) || defined (_M_AMD64)
ULONG i;
#endif
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
- LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
+ LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24
-#ifdef _M_IX86
+#if defined (_M_IX86) || defined (_M_AMD64)
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
{
if (BiosMemoryUsable == reactos_memory_map[i].type &&
/* Detect hardware */
UiDrawStatusText("Detecting hardware...");
- LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
+ LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
UiDrawStatusText("");
/* set boot device */
{
VIDEODISPLAYMODE UiDisplayMode; // Tells us if we are in text or graphics mode
BOOLEAN UiMinimal = FALSE; // Tells us if we should use a minimal console-like UI
- ULONG SectionId;
+ ULONG_PTR SectionId;
CHAR DisplayModeText[260];
CHAR SettingText[260];
ULONG Depth;
CHAR SettingValue[80];
PCHAR MessageBoxText;
ULONG MessageBoxTextSize;
- ULONG SectionId;
+ ULONG_PTR SectionId;
if (!IniOpenSection(SectionName, &SectionId))
{
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE group SYSTEM "tools/rbuild/project.dtd">
+<group>
+
+<!--
+ This file is a template used as a starting point for compile-time
+ configuration of ReactOS. Make a copy of this file and name it config.rbuild.
+ Then change the options in config.rbuild. If you don't have a config.rbuild file,
+ then the defaults in this file, config.template.rbuild, will be used instead.
+
+ Boolean options can obtain the values 0 (disabled) or 1 (enabled). String
+ options can obtain any value specified in the comment before it.
+-->
+
+
+<!--
+ Sub-architecture to build for. Specify one of:
+-->
+<property name="SARCH" value="" />
+
+
+<!--
+ Which CPU ReactOS should be optimized for. Specify one of:
+ k8 opteron athlon64 athlon-fx
+
+ See GCC manual for more CPU names and which CPUs GCC can optimize for.
+-->
+<property name="OARCH" value="athlon64" />
+
+
+<!--
+ What level of optimisation to use.
+ 0 = off (will not work)
+ 1 = Default option, optimize for size (-Os) with some additional options
+ 2 = -Os
+ 3 = -O1
+ 4 = -O2
+ 5 = -O3
+-->
+<property name="OPTIMIZE" value="3" />
+
+
+<!--
+ Whether to compile in the integrated kernel debugger.
+-->
+<property name="KDBG" value="1" />
+
+
+<!--
+ Whether to compile for debugging. No compiler optimizations will be
+ performed.
+-->
+<property name="DBG" value="1" />
+
+
+<!--
+ Whether to compile for debugging with GDB. If you don't use GDB, don't
+ enable this.
+-->
+<property name="GDB" value="0" />
+
+
+<!--
+ Whether to compile apps/libs with features covered software patents or not.
+ If you live in a country where software patents are valid/apply, don't
+ enable this (except they/you purchased a license from the patent owner).
+ This settings is disabled (0) by default.
+-->
+<property name="NSWPAT" value="1" />
+
+<!--
+ Whether to compile with the KD protocol. This will disable support for KDBG
+ as well as rossym and symbol lookups, and allow WinDBG to connect to ReactOS.
+ This is currently not fully working, and requires kdcom from Windows 2003 or
+ TinyKRNL. Booting into debug mode with this flag enabled will result in a
+ failure to enter GUI mode. Do not enable unless you know what you're doing.
+-->
+<property name="_WINKD_" value="0" />
+
+</group>
/* Do the probe */
Pointer = (PUCHAR)Address;
Data = *Pointer;
- Pointer = (PUCHAR)((ULONG)Address + Length -1);
+ Pointer = (PUCHAR)((ULONG_PTR)Address + Length -1);
Data = *Pointer;
}
Pointer = (PUCHAR)Address;
Data = *Pointer;
*Pointer = Data;
- Pointer = (PUCHAR)((ULONG)Address + Length -1);
+ Pointer = (PUCHAR)((ULONG_PTR)Address + Length -1);
Data = *Pointer;
*Pointer = Data;
}
HANDLE ThreadHandle;
/* Write common data */
- DebugEvent->dwProcessId = (DWORD)WaitStateChange->
+ DebugEvent->dwProcessId = (ULONG_PTR)WaitStateChange->
AppClientId.UniqueProcess;
- DebugEvent->dwThreadId = (DWORD)WaitStateChange->AppClientId.UniqueThread;
+ DebugEvent->dwThreadId = (ULONG_PTR)WaitStateChange->AppClientId.UniqueThread;
/* Check what kind of even this is */
switch (WaitStateChange->NewState)
--- /dev/null
+; $Id: ntdll.def 34404 2008-07-10 09:46:25Z fireball $
+;
+; ReactOS Operating System
+;
+LIBRARY ntdll.dll
+
+EXPORTS
+CsrAllocateCaptureBuffer
+CsrAllocateMessagePointer
+CsrCaptureMessageBuffer
+CsrCaptureMessageMultiUnicodeStringsInPlace
+CsrCaptureMessageString
+CsrCaptureTimeout
+CsrClientCallServer
+CsrClientConnectToServer
+CsrFreeCaptureBuffer
+CsrGetProcessId
+CsrIdentifyAlertableThread
+CsrNewThread
+CsrProbeForRead
+CsrProbeForWrite
+CsrSetPriorityClass
+DbgBreakPoint
+DbgPrint
+DbgPrintEx
+DbgPrompt
+DbgUiConvertStateChangeStructure
+DbgUiDebugActiveProcess
+DbgUiConnectToDbg
+DbgUiContinue
+DbgUiGetThreadDebugObject
+DbgUiIssueRemoteBreakin
+DbgUiRemoteBreakin
+DbgUiSetThreadDebugObject
+DbgUiStopDebugging
+DbgUiWaitStateChange
+DbgUserBreakPoint
+KiRaiseUserExceptionDispatcher
+KiUserApcDispatcher
+KiUserCallbackDispatcher
+KiUserExceptionDispatcher
+KiIntSystemCall
+KiFastSystemCallRet
+KiFastSystemCall
+LdrAccessResource
+LdrAddRefDll
+LdrDisableThreadCalloutsForDll
+LdrEnumResources
+LdrFindEntryForAddress
+LdrFindResourceDirectory_U
+LdrFindResource_U
+LdrGetDllHandle
+LdrGetProcedureAddress
+LdrInitializeThunk
+LdrLoadDll
+LdrProcessRelocationBlock
+LdrQueryImageFileExecutionOptions
+LdrQueryProcessModuleInformation
+LdrShutdownProcess
+LdrShutdownThread
+LdrUnloadDll
+LdrVerifyImageMatchesChecksum
+NlsAnsiCodePage DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
+NtAcceptConnectPort
+NtAccessCheck
+NtAccessCheckAndAuditAlarm
+NtAddAtom
+NtAddBootEntry
+NtAdjustGroupsToken
+NtAdjustPrivilegesToken
+NtAlertResumeThread
+NtAlertThread
+NtAllocateLocallyUniqueId
+NtAllocateUuids
+NtAllocateVirtualMemory
+NtAssignProcessToJobObject
+NtCallbackReturn
+NtCancelIoFile
+NtCancelTimer
+NtClearEvent
+NtClose
+NtCloseObjectAuditAlarm
+NtCompareTokens
+NtCompleteConnectPort
+NtConnectPort
+NtContinue
+NtCreateDebugObject
+NtCreateDirectoryObject
+NtCreateEvent
+NtCreateEventPair
+NtCreateFile
+NtCreateIoCompletion
+NtCreateJobObject
+NtCreateKey
+NtCreateMailslotFile
+NtCreateMutant
+NtCreateNamedPipeFile
+NtCreatePagingFile
+NtCreatePort
+NtCreateProcess
+NtCreateProfile
+NtCreateSection
+NtCreateSemaphore
+NtCreateSymbolicLinkObject
+NtCreateThread
+NtCreateTimer
+NtCreateToken
+NtCreateWaitablePort
+NtCurrentTeb=_NtCurrentTeb
+NtDebugContinue
+NtDelayExecution
+NtDeleteAtom
+NtDeleteFile
+NtDeleteKey
+NtDeleteObjectAuditAlarm
+NtDeleteValueKey
+NtDeviceIoControlFile
+NtDisplayString
+NtDuplicateObject
+NtDuplicateToken
+NtEnumerateKey
+NtEnumerateValueKey
+NtExtendSection
+NtFindAtom
+NtFlushBuffersFile
+NtFlushInstructionCache
+NtFlushKey
+NtFlushVirtualMemory
+NtFlushWriteBuffer
+NtFreeVirtualMemory
+NtFsControlFile
+NtGetContextThread
+NtGetPlugPlayEvent
+NtImpersonateAnonymousToken
+NtImpersonateClientOfPort
+NtImpersonateThread
+NtInitializeRegistry
+NtIsProcessInJob
+NtListenPort
+NtLoadDriver
+NtLoadKey
+NtLoadKey2
+NtLockFile
+NtLockVirtualMemory
+NtMakeTemporaryObject
+NtMapViewOfSection
+NtNotifyChangeDirectoryFile
+NtNotifyChangeKey
+NtOpenDirectoryObject
+NtOpenEvent
+NtOpenEventPair
+NtOpenFile
+NtOpenIoCompletion
+NtOpenJobObject
+NtOpenKey
+NtOpenMutant
+NtOpenObjectAuditAlarm
+NtOpenProcess
+NtOpenProcessToken
+NtOpenSection
+NtOpenSemaphore
+NtOpenSymbolicLinkObject
+NtOpenThread
+NtOpenThreadToken
+NtOpenTimer
+NtPlugPlayControl
+NtPowerInformation
+NtPrivilegeCheck
+NtPrivilegedServiceAuditAlarm
+NtPrivilegeObjectAuditAlarm
+NtProtectVirtualMemory
+NtPulseEvent
+NtQueryAttributesFile
+NtQueryDebugFilterState
+NtQueryDefaultLocale
+NtQueryDefaultUILanguage
+NtQueryDirectoryFile
+NtQueryDirectoryObject
+NtQueryEaFile
+NtQueryEvent
+NtQueryFullAttributesFile
+NtQueryInformationAtom
+NtQueryInformationFile
+NtQueryInformationJobObject
+NtQueryInformationPort
+NtQueryInformationProcess
+NtQueryInformationThread
+NtQueryInformationToken
+NtQueryInstallUILanguage
+NtQueryIntervalProfile
+NtQueryIoCompletion
+NtQueryKey
+NtQueryMultipleValueKey
+NtQueryMutant
+NtQueryObject
+NtQueryPerformanceCounter
+NtQuerySection
+NtQuerySecurityObject
+NtQuerySemaphore
+NtQuerySymbolicLinkObject
+NtQuerySystemEnvironmentValue
+NtQuerySystemInformation
+NtQuerySystemTime
+NtQueryTimer
+NtQueryTimerResolution
+NtQueryValueKey
+NtQueryVirtualMemory
+NtQueryVolumeInformationFile
+NtQueueApcThread
+NtRaiseException
+NtRaiseHardError
+NtReadFile
+NtReadFileScatter
+NtReadRequestData
+NtReadVirtualMemory
+NtRegisterThreadTerminatePort
+NtReleaseMutant
+NtReleaseSemaphore
+NtRemoveIoCompletion
+NtReplaceKey
+NtReplyPort
+NtReplyWaitReceivePort
+NtReplyWaitReceivePortEx
+NtReplyWaitReplyPort
+NtRequestPort
+NtRequestWaitReplyPort
+NtResetEvent
+NtRestoreKey
+NtResumeProcess
+NtResumeThread
+NtSaveKey
+NtSecureConnectPort
+NtSetContextThread
+NtSetDebugFilterState
+NtSetDefaultHardErrorPort
+NtSetDefaultLocale
+NtSetDefaultUILanguage
+NtSetEaFile
+NtSetEvent
+NtSetHighEventPair
+NtSetHighWaitLowEventPair
+NtSetInformationDebugObject
+NtSetInformationFile
+NtSetInformationJobObject
+NtSetInformationKey
+NtSetInformationObject
+NtSetInformationProcess
+NtSetInformationThread
+NtSetInformationToken
+NtSetIntervalProfile
+NtSetIoCompletion
+NtSetLdtEntries
+NtSetLowEventPair
+NtSetLowWaitHighEventPair
+NtSetSecurityObject
+NtSetSystemEnvironmentValue
+NtSetSystemInformation
+NtSetSystemPowerState
+NtSetSystemTime
+NtSetTimer
+NtSetTimerResolution
+NtSetUuidSeed
+NtSetValueKey
+NtSetVolumeInformationFile
+NtShutdownSystem
+NtSignalAndWaitForSingleObject
+NtStartProfile
+NtStopProfile
+NtSuspendProcess
+NtSuspendThread
+NtSystemDebugControl
+NtTerminateJobObject
+NtTerminateProcess
+NtTerminateThread
+NtTestAlert
+NtUnloadDriver
+NtUnloadKey
+NtUnlockFile
+NtUnlockVirtualMemory
+NtUnmapViewOfSection
+NtVdmControl
+NtWaitForDebugEvent
+NtWaitForMultipleObjects
+NtWaitForSingleObject
+NtWaitHighEventPair
+NtWaitLowEventPair
+NtWriteFile
+NtWriteFileGather
+NtWriteRequestData
+NtWriteVirtualMemory
+NtYieldExecution
+;PfxFindPrefix
+;PfxInitialize
+;PfxInsertPrefix
+;PfxRemovePrefix
+;PropertyLengthAsVariant
+;RestoreEmContext
+;RtlAbortRXact
+RtlAbsoluteToSelfRelativeSD
+RtlAcquirePebLock
+RtlAcquireResourceExclusive
+RtlAcquireResourceShared
+RtlAcquireSRWLockExclusive
+RtlAcquireSRWLockShared
+RtlAddAccessAllowedAce
+RtlAddAccessAllowedAceEx
+RtlAddAccessAllowedObjectAce
+RtlAddAccessDeniedAce
+RtlAddAccessDeniedAceEx
+RtlAddAccessDeniedObjectAce
+RtlAddAce
+;RtlAddActionToRXact
+RtlAddAtomToAtomTable
+;RtlAddAttributeActionToRXact
+RtlAddAuditAccessAce
+RtlAddAuditAccessAceEx
+RtlAddAuditAccessObjectAce
+;RtlAddCompoundAce
+RtlAddMandatoryAce
+RtlAddRange
+RtlAddVectoredExceptionHandler
+RtlAdjustPrivilege
+RtlAllocateAndInitializeSid
+RtlAllocateHandle
+RtlAllocateHeap
+RtlAnsiCharToUnicodeChar
+RtlAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize
+RtlAnsiStringToUnicodeString
+RtlAppendAsciizToString
+RtlAppendStringToString
+RtlAppendUnicodeStringToString
+RtlAppendUnicodeToString
+;RtlApplyRXact
+;RtlApplyRXactNoFlush
+RtlAreAllAccessesGranted
+RtlAreAnyAccessesGranted
+RtlAreBitsClear
+RtlAreBitsSet
+RtlAssert
+RtlCaptureStackBackTrace
+RtlCharToInteger
+RtlCheckRegistryKey
+RtlClearAllBits
+RtlClearBits
+RtlCompactHeap
+RtlCompareMemory
+RtlCompareMemoryUlong
+RtlCompareString
+RtlCompareUnicodeString
+RtlCompressBuffer
+RtlComputeCrc32
+;RtlConsoleMultiByteToUnicodeN
+RtlConvertExclusiveToShared
+RtlConvertLongToLargeInteger
+RtlConvertSharedToExclusive
+RtlConvertSidToUnicodeString
+;RtlConvertUiListToApiList
+RtlConvertUlongToLargeInteger
+RtlCopyLuid
+RtlCopyLuidAndAttributesArray
+RtlCopyRangeList
+RtlCopySecurityDescriptor
+RtlCopySid
+RtlCopySidAndAttributesArray
+RtlCopyString
+RtlCopyUnicodeString
+RtlCreateAcl
+;RtlCreateAndSetSD
+RtlCreateAtomTable
+RtlCreateEnvironment
+RtlCreateHeap
+RtlCreateProcessParameters
+RtlCreateQueryDebugBuffer
+RtlCreateRegistryKey
+RtlCreateSecurityDescriptor
+RtlCreateTagHeap
+RtlCreateTimer
+RtlCreateTimerQueue
+RtlCreateUnicodeString
+RtlCreateUnicodeStringFromAsciiz
+RtlCreateUserProcess
+;RtlCreateUserSecurityObject
+RtlCreateUserThread
+RtlCustomCPToUnicodeN
+RtlCutoverTimeToSystemTime
+RtlDeNormalizeProcessParams
+RtlDecodePointer=RtlEncodePointer
+RtlDecompressBuffer
+RtlDecompressFragment
+RtlDelete
+RtlDeleteAce
+RtlDeleteAtomFromAtomTable
+RtlDeleteCriticalSection
+RtlDeleteElementGenericTable
+RtlDeleteElementGenericTableAvl
+RtlDeleteNoSplay
+RtlDeleteOwnersRanges
+RtlDeleteRange
+RtlDeleteRegistryValue
+RtlDeleteResource
+RtlDeleteSecurityObject
+RtlDeleteTimer
+RtlDeleteTimerQueue
+RtlDeleteTimerQueueEx
+RtlDeregisterWait
+RtlDeregisterWaitEx
+RtlDestroyAtomTable
+RtlDestroyEnvironment
+RtlDestroyHandleTable
+RtlDestroyHeap
+RtlDestroyProcessParameters
+RtlDestroyQueryDebugBuffer
+RtlDetermineDosPathNameType_U
+RtlDllShutdownInProgress
+RtlDoesFileExists_U
+RtlDosPathNameToNtPathName_U
+RtlDosPathNameToRelativeNtPathName_U
+RtlDosSearchPath_U
+RtlDowncaseUnicodeChar
+RtlDowncaseUnicodeString
+RtlDumpResource
+RtlDuplicateUnicodeString
+RtlEmptyAtomTable
+RtlEncodePointer
+RtlEnlargedIntegerMultiply
+RtlEnlargedUnsignedDivide
+RtlEnlargedUnsignedMultiply
+RtlEnterCriticalSection
+RtlEnumProcessHeaps
+RtlEnumerateGenericTable
+RtlEnumerateGenericTableAvl
+RtlEnumerateGenericTableLikeADirectory
+RtlEnumerateGenericTableWithoutSplaying
+RtlEnumerateGenericTableWithoutSplayingAvl
+RtlEqualComputerName
+RtlEqualDomainName
+RtlEqualLuid
+RtlEqualPrefixSid
+RtlEqualSid
+RtlEqualString
+RtlEqualUnicodeString
+RtlEraseUnicodeString
+RtlExitUserThread
+RtlExpandEnvironmentStrings_U
+RtlExtendHeap
+RtlExtendedIntegerMultiply
+RtlExtendedLargeIntegerDivide
+RtlExtendedMagicDivide
+RtlFillMemory
+RtlFillMemoryUlong
+RtlFindClearBits
+RtlFindClearBitsAndSet
+RtlFindClearRuns
+RtlFindLastBackwardRunClear
+RtlFindLeastSignificantBit
+RtlFindLongestRunClear
+RtlFindLongestRunSet
+RtlFindMessage
+RtlFindMostSignificantBit
+RtlFindNextForwardRunClear
+RtlFindRange
+RtlFindSetBits
+RtlFindSetBitsAndClear
+RtlFirstFreeAce
+RtlFormatCurrentUserKeyPath
+RtlFormatMessage
+RtlFreeAnsiString
+RtlFreeHandle
+RtlFreeHeap
+RtlFreeOemString
+RtlFreeRangeList
+RtlFreeSid
+RtlFreeUnicodeString
+RtlFreeUserThreadStack
+RtlGUIDFromString
+RtlGeneratedotName
+RtlGetAce
+;RtlGetCallersAddress
+RtlGetCompressionWorkSpaceSize
+RtlGetControlSecurityDescriptor
+RtlGetCurrentDirectory_U
+RtlGetDaclSecurityDescriptor
+RtlGetElementGenericTable
+RtlGetElementGenericTableAvl
+RtlGetFirstRange
+RtlGetFullPathName_U
+RtlGetGroupSecurityDescriptor
+RtlGetLastNtStatus
+RtlGetLastWinError
+RtlGetLongestNtPathLength
+RtlGetNextRange
+RtlGetNtGlobalFlags
+RtlGetNtProductType
+RtlGetNtVersionNumbers
+RtlGetOwnerSecurityDescriptor
+RtlGetProcessHeaps
+RtlGetSaclSecurityDescriptor
+RtlGetSecurityDescriptorRMControl
+RtlGetSetBootStatusData
+RtlGetUserInfoHeap
+RtlGetVersion
+RtlHashUnicodeString
+RtlIdentifierAuthoritySid
+RtlImageDirectoryEntryToData
+RtlImageNtHeader
+RtlImageRvaToSection
+RtlImageRvaToVa
+RtlImpersonateSelf
+RtlInitAnsiString
+RtlInitCodePageTable
+RtlInitNlsTables
+RtlInitString
+RtlInitUnicodeString
+RtlInitUnicodeStringEx
+;RtlInitializeAtomPackage
+RtlInitializeBitMap
+RtlInitializeConditionVariable
+RtlInitializeContext
+RtlInitializeCriticalSection
+RtlInitializeCriticalSectionEx
+RtlInitializeCriticalSectionAndSpinCount
+RtlInitializeGenericTable
+RtlInitializeGenericTableAvl
+RtlInitializeHandleTable
+RtlInitializeRangeList
+RtlInitializeResource
+;RtlInitializeRXact
+RtlInitializeSid
+RtlInitializeSRWLock
+RtlInsertElementGenericTable
+RtlInsertElementGenericTableAvl
+RtlInsertElementGenericTableFull
+RtlInsertElementGenericTableFullAvl
+RtlIntToUnicodeString
+RtlIntegerToChar
+RtlIntegerToUnicodeString
+RtlInvertRangeList
+RtlIpvAddressToStringA
+RtlIpvAddressToStringExA
+RtlIpvAddressToStringExW
+RtlIpvAddressToStringW
+RtlIpvStringToAddressA
+RtlIpvStringToAddressExA
+RtlIpvStringToAddressExW
+RtlIpvStringToAddressW
+RtlIpvAddressToStringA
+RtlIpvAddressToStringExA
+RtlIpvAddressToStringExW
+RtlIpvAddressToStringW
+RtlIpvStringToAddressA
+RtlIpvStringToAddressExA
+RtlIpvStringToAddressExW
+RtlIpvStringToAddressW
+RtlIsDosDeviceName_U
+RtlIsGenericTableEmpty
+RtlIsGenericTableEmptyAvl
+RtlIsNameLegalDOS8Dot3
+RtlIsRangeAvailable
+RtlIsTextUnicode
+RtlIsValidHandle
+RtlIsValidIndexHandle
+RtlLargeIntegerAdd
+RtlLargeIntegerArithmeticShift
+RtlLargeIntegerDivide
+RtlLargeIntegerNegate
+RtlLargeIntegerShiftLeft
+RtlLargeIntegerShiftRight
+RtlLargeIntegerSubtract
+RtlLargeIntegerToChar
+RtlLeaveCriticalSection
+RtlLengthRequiredSid
+RtlLengthSecurityDescriptor
+RtlLengthSid
+RtlLocalTimeToSystemTime
+RtlLockBootStatusData
+RtlLockHeap
+RtlLookupAtomInAtomTable
+RtlLookupElementGenericTable
+RtlLookupElementGenericTableAvl
+RtlLookupElementGenericTableFull
+RtlLookupElementGenericTableFullAvl
+RtlMakeSelfRelativeSD
+RtlMapGenericMask
+RtlMergeRangeLists
+RtlMoveMemory
+RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeSize
+;RtlNewInstanceSecurityObject
+;RtlNewSecurityGrantedAccess
+RtlNewSecurityObject
+RtlNormalizeProcessParams
+RtlNtPathNameToDosPathName
+RtlNtStatusToDosError
+RtlNumberGenericTableElements
+RtlNumberGenericTableElementsAvl
+RtlNumberOfClearBits
+RtlNumberOfSetBits
+RtlOemStringToUnicodeSize=RtlxOemStringToUnicodeSize
+RtlOemStringToUnicodeString
+RtlOemToUnicodeN
+RtlOpenCurrentUser
+RtlPcToFileHeader
+RtlPinAtomInAtomTable
+RtlPrefixString
+RtlPrefixUnicodeString
+;RtlProtectHeap
+RtlQueryAtomInAtomTable
+RtlQueryEnvironmentVariable_U
+RtlQueryInformationAcl
+;RtlQueryProcessBackTraceInformation
+RtlQueryProcessDebugInformation
+;RtlQueryProcessHeapInformation
+;RtlQueryProcessLockInformation
+RtlQueryRegistryValues
+RtlQuerySecurityObject
+RtlQueryTagHeap
+RtlQueryTimeZoneInformation
+RtlQueueWorkItem
+RtlRaiseException
+RtlRaiseStatus
+RtlRandom
+RtlRandomEx=RtlRandom
+RtlReAllocateHeap
+RtlRealPredecessor
+RtlRealSuccessor
+RtlRegisterWait
+RtlReleasePebLock
+RtlReleaseRelativeName
+RtlReleaseResource
+RtlReleaseSRWLockExclusive
+RtlReleaseSRWLockShared
+;RtlRemoteCall
+RtlRemoveVectoredExceptionHandler
+RtlResetRtlTranslations
+RtlRestoreLastWinError=RtlSetLastWinError
+RtlRunDecodeUnicodeString
+RtlRunEncodeUnicodeString
+RtlSecondsSinceToTime
+RtlSecondsSinceToTime
+RtlSelfRelativeToAbsoluteSD
+RtlSelfRelativeToAbsoluteSD2
+RtlSetAllBits
+RtlSetAttributesSecurityDescriptor
+RtlSetBits
+RtlSetControlSecurityDescriptor
+RtlSetCriticalSectionSpinCount
+RtlSetCurrentDirectory_U
+RtlSetCurrentEnvironment
+RtlSetDaclSecurityDescriptor
+RtlSetEnvironmentVariable
+RtlSetGroupSecurityDescriptor
+RtlSetInformationAcl
+RtlSetLastWinError
+RtlSetLastWinErrorAndNtStatusFromNtStatus
+RtlSetOwnerSecurityDescriptor
+RtlSetProcessIsCritical
+RtlSetSaclSecurityDescriptor
+RtlSetSecurityDescriptorRMControl
+RtlSetSecurityObject
+RtlSetTimeZoneInformation
+;RtlSetUnicodeCallouts
+RtlSetUserFlagsHeap
+RtlSetUserValueHeap
+RtlSizeHeap
+RtlSleepConditionVariableCS
+RtlSleepConditionVariableSRW
+RtlSplay
+;RtlStartRXact
+RtlStringFromGUID
+RtlSubAuthorityCountSid
+RtlSubAuthoritySid
+RtlSubtreePredecessor
+RtlSubtreeSuccessor
+RtlSystemTimeToLocalTime
+RtlTimeFieldsToTime
+RtlTimeToElapsedTimeFields
+RtlTimeToSecondsSince1970
+RtlTimeToSecondsSince1980
+RtlTimeToTimeFields
+RtlTryEnterCriticalSection
+RtlUlongByteSwap
+RtlUlonglongByteSwap
+RtlUnhandledExceptionFilter
+RtlUnicodeStringToAnsiSize=RtlxUnicodeStringToAnsiSize
+RtlUnicodeStringToAnsiString
+RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToInteger
+RtlUnicodeStringToOemSize=RtlxUnicodeStringToOemSize
+RtlUnicodeStringToOemString
+RtlUnicodeToCustomCPN
+RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteSize
+RtlUnicodeToOemN
+RtlUniform
+RtlUnlockBootStatusData
+RtlUnlockHeap
+RtlUnwind
+RtlUpcaseUnicodeChar
+RtlUpcaseUnicodeString
+RtlUpcaseUnicodeStringToAnsiString
+RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToOemString
+RtlUpcaseUnicodeToCustomCPN
+RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToOemN
+RtlUpdateTimer
+RtlUpperChar
+RtlUpperString
+RtlUsageHeap
+RtlUshortByteSwap
+RtlValidAcl
+RtlValidRelativeSecurityDescriptor
+RtlValidSecurityDescriptor
+RtlValidSid
+RtlValidateHeap
+RtlValidateProcessHeaps
+RtlValidateUnicodeString
+RtlVerifyVersionInfo
+;RtlWalkHeap
+RtlWakeAllConditionVariable
+RtlWakeConditionVariable
+RtlWriteRegistryValue
+;RtlZeroHeap
+RtlZeroMemory
+RtlpEnsureBufferSize
+RtlpNtCreateKey
+RtlpNtEnumerateSubKey
+RtlpNtMakeTemporaryKey
+RtlpNtOpenKey
+RtlpNtQueryValueKey
+RtlpNtSetValueKey
+RtlpUnWaitCriticalSection
+RtlpWaitForCriticalSection
+RtlxAnsiStringToUnicodeSize
+RtlxOemStringToUnicodeSize
+RtlxUnicodeStringToAnsiSize
+RtlxUnicodeStringToOemSize
+;SaveEmContext
+VerSetConditionMask
+ZwAcceptConnectPort
+ZwAccessCheck
+ZwAccessCheckAndAuditAlarm
+ZwAddAtom
+ZwAdjustGroupsToken
+ZwAdjustPrivilegesToken
+ZwAlertResumeThread
+ZwAlertThread
+ZwAllocateLocallyUniqueId
+ZwAllocateUuids
+ZwAllocateVirtualMemory
+ZwAssignProcessToJobObject
+ZwCallbackReturn
+ZwCancelIoFile
+ZwCancelTimer
+ZwClearEvent
+ZwClose
+ZwCloseObjectAuditAlarm
+ZwCompareTokens
+ZwCompleteConnectPort
+ZwConnectPort
+ZwContinue
+ZwCreateDebugObject
+ZwCreateDirectoryObject
+ZwCreateEvent
+ZwCreateEventPair
+ZwCreateFile
+ZwCreateIoCompletion
+ZwCreateJobObject
+ZwCreateKey
+ZwCreateMailslotFile
+ZwCreateMutant
+ZwCreateNamedPipeFile
+ZwCreatePagingFile
+ZwCreatePort
+ZwCreateProcess
+ZwCreateProfile
+ZwCreateSection
+ZwCreateSemaphore
+ZwCreateSymbolicLinkObject
+ZwCreateThread
+ZwCreateTimer
+ZwCreateToken
+ZwCreateWaitablePort
+ZwDebugContinue
+ZwDelayExecution
+ZwDeleteAtom
+ZwDeleteFile
+ZwDeleteKey
+ZwDeleteObjectAuditAlarm
+ZwDeleteValueKey
+ZwDeviceIoControlFile
+ZwDisplayString
+ZwDuplicateObject
+ZwDuplicateToken
+ZwEnumerateKey
+ZwEnumerateValueKey
+ZwExtendSection
+ZwFindAtom
+ZwFlushBuffersFile
+ZwFlushInstructionCache
+ZwFlushKey
+ZwFlushVirtualMemory
+ZwFlushWriteBuffer
+ZwFreeVirtualMemory
+ZwFsControlFile
+ZwGetContextThread
+ZwGetPlugPlayEvent
+ZwImpersonateAnonymousToken
+ZwImpersonateClientOfPort
+ZwImpersonateThread
+ZwInitializeRegistry
+ZwIsProcessInJob
+ZwListenPort
+ZwLoadDriver
+ZwLoadKey
+ZwLoadKey
+ZwLockFile
+ZwLockVirtualMemory
+ZwMakeTemporaryObject
+ZwMapViewOfSection
+ZwNotifyChangeDirectoryFile
+ZwNotifyChangeKey
+ZwOpenDirectoryObject
+ZwOpenEvent
+ZwOpenEventPair
+ZwOpenFile
+ZwOpenIoCompletion
+ZwOpenJobObject
+ZwOpenKey
+ZwOpenMutant
+ZwOpenObjectAuditAlarm
+ZwOpenProcess
+ZwOpenProcessToken
+ZwOpenSection
+ZwOpenSemaphore
+ZwOpenSymbolicLinkObject
+ZwOpenThread
+ZwOpenThreadToken
+ZwOpenTimer
+ZwPlugPlayControl
+ZwPowerInformation
+ZwPrivilegeCheck
+ZwPrivilegedServiceAuditAlarm
+ZwPrivilegeObjectAuditAlarm
+ZwProtectVirtualMemory
+ZwPulseEvent
+ZwQueryAttributesFile
+ZwQueryDebugFilterState
+ZwQueryDefaultLocale
+ZwQueryDefaultUILanguage
+ZwQueryDirectoryFile
+ZwQueryDirectoryObject
+ZwQueryEaFile
+ZwQueryEvent
+ZwQueryFullAttributesFile
+ZwQueryInformationAtom
+ZwQueryInformationFile
+ZwQueryInformationJobObject
+ZwQueryInformationPort
+ZwQueryInformationProcess
+ZwQueryInformationThread
+ZwQueryInformationToken
+ZwQueryInstallUILanguage
+ZwQueryIntervalProfile
+ZwQueryIoCompletion
+ZwQueryKey
+ZwQueryMultipleValueKey
+ZwQueryMutant
+ZwQueryObject
+ZwQueryPerformanceCounter
+ZwQuerySection
+ZwQuerySecurityObject
+ZwQuerySemaphore
+ZwQuerySymbolicLinkObject
+ZwQuerySystemEnvironmentValue
+ZwQuerySystemInformation
+ZwQuerySystemTime
+ZwQueryTimer
+ZwQueryTimerResolution
+ZwQueryValueKey
+ZwQueryVirtualMemory
+ZwQueryVolumeInformationFile
+ZwQueueApcThread
+ZwRaiseException
+ZwRaiseHardError
+ZwReadFile
+ZwReadFileScatter
+ZwReadRequestData
+ZwReadVirtualMemory
+ZwRegisterThreadTerminatePort
+ZwReleaseMutant
+ZwReleaseSemaphore
+ZwRemoveIoCompletion
+ZwReplaceKey
+ZwReplyPort
+ZwReplyWaitReceivePort
+ZwReplyWaitReceivePortEx
+ZwReplyWaitReplyPort
+ZwRequestPort
+ZwRequestWaitReplyPort
+ZwResetEvent
+ZwRestoreKey
+ZwResumeProcess
+ZwResumeThread
+ZwSaveKey
+ZwSecureConnectPort
+ZwSetContextThread
+ZwSetDebugFilterState
+ZwSetDefaultHardErrorPort
+ZwSetDefaultLocale
+ZwSetDefaultUILanguage
+ZwSetEaFile
+ZwSetEvent
+ZwSetHighEventPair
+ZwSetHighWaitLowEventPair
+ZwSetInformationDebugObject
+ZwSetInformationFile
+ZwSetInformationJobObject
+ZwSetInformationKey
+ZwSetInformationObject
+ZwSetInformationProcess
+ZwSetInformationThread
+ZwSetInformationToken
+ZwSetIntervalProfile
+ZwSetIoCompletion
+ZwSetLdtEntries
+ZwSetLowEventPair
+ZwSetLowWaitHighEventPair
+ZwSetSecurityObject
+ZwSetSystemEnvironmentValue
+ZwSetSystemInformation
+ZwSetSystemPowerState
+ZwSetSystemTime
+ZwSetTimer
+ZwSetTimerResolution
+ZwSetUuidSeed
+ZwSetValueKey
+ZwSetVolumeInformationFile
+ZwShutdownSystem
+ZwSignalAndWaitForSingleObject
+ZwStartProfile
+ZwStopProfile
+ZwSuspendProcess
+ZwSuspendThread
+ZwSystemDebugControl
+ZwTerminateJobObject
+ZwTerminateProcess
+ZwTerminateThread
+ZwTestAlert
+ZwUnloadDriver
+ZwUnloadKey
+ZwUnlockFile
+ZwUnlockVirtualMemory
+ZwUnmapViewOfSection
+ZwVdmControl
+ZwWaitForDebugEvent
+ZwWaitForMultipleObjects
+ZwWaitForSingleObject
+ZwWaitHighEventPair
+ZwWaitLowEventPair
+ZwWriteFile
+ZwWriteFileGather
+ZwWriteRequestData
+ZwWriteVirtualMemory
+ZwYieldExecution
+__isascii
+__iscsym
+__iscsymf
+__toascii
+_alldiv
+_allmul
+_alloca_probe
+_allrem
+_allshl
+_allshr
+_atoi64
+_aulldiv
+_aullrem
+_aullshr
+_chkstk
+_fltused
+_ftol
+_itoa
+_itow
+_i64toa
+_i64tow
+_lfind
+_ltoa
+_ltow
+_memccpy
+_memicmp
+_snprintf
+_snwprintf
+_splitpath
+_strcmpi
+_stricmp
+_strlwr
+_strnicmp
+_strupr
+_tolower
+_toupper
+_ui64toa
+_ui64tow
+_ultoa
+_ultow
+_vsnprintf
+_vsnwprintf
+_wcsicmp
+_wcslwr
+_wcsnicmp
+_wcsupr
+_wtoi
+_wtoi
+_wtol
+abs
+atan
+atoi
+atol
+bsearch
+ceil
+cos
+fabs
+floor
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalpha
+iswctype
+iswdigit
+iswlower
+iswspace
+iswxdigit
+isxdigit
+labs
+log
+mbstowcs
+memchr
+memcmp
+memcpy
+memmove
+memset
+pow
+qsort
+sin
+sprintf
+sqrt
+sscanf
+strcat
+strchr
+strcmp
+strcpy
+strcspn
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtol
+strtoul
+strtoull
+swprintf
+tan
+tolower
+toupper
+towlower
+towupper
+vsprintf
+vDbgPrintExWithPrefix
+wcscat
+wcschr
+wcscmp
+wcscpy
+wcscspn
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstol
+wcstombs
+wcstoul
+; EOF
+
; $Id: ntdll.def 34404 2008-07-10 09:46:25Z fireball $
;
; ReactOS Operating System
&Size);
ASSERT(Module->TlsIndex < LdrpTlsCount);
TlsData = &LdrpTlsArray[Module->TlsIndex];
- TlsData->StartAddressOfRawData = (PVOID)TlsDirectory->StartAddressOfRawData;
+ TlsData->StartAddressOfRawData = (PVOID)(ULONG_PTR)TlsDirectory->StartAddressOfRawData;
TlsData->TlsDataSize = TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData;
TlsData->TlsZeroSize = TlsDirectory->SizeOfZeroFill;
if (TlsDirectory->AddressOfCallBacks)
ASSERT(Module);
memset(Module, 0, sizeof(LDR_DATA_TABLE_ENTRY));
Module->DllBase = (PVOID)ImageBase;
- Module->EntryPoint = (PVOID)NTHeaders->OptionalHeader.AddressOfEntryPoint;
+ Module->EntryPoint = (PVOID)(ULONG_PTR)NTHeaders->OptionalHeader.AddressOfEntryPoint;
if (Module->EntryPoint != 0)
Module->EntryPoint = (PVOID)((ULONG_PTR)Module->EntryPoint + (ULONG_PTR)Module->DllBase);
Module->SizeOfImage = LdrpGetResidentSize(NTHeaders);
? RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] )
: NULL);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
{
Ordinal = ExOrdinals[Hint];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
{
Ordinal = ExOrdinals[mid];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
+++ /dev/null
-; $Id$
-;
-; advapi32.def
-;
-; ReactOS Operating System
-;
-LIBRARY advapi32.dll
-EXPORTS
-A_SHAFinal@8
-A_SHAInit@4
-A_SHAUpdate@12
-AbortSystemShutdownA@4
-AbortSystemShutdownW@4
-AccessCheck@32
-AccessCheckAndAuditAlarmA@44
-AccessCheckAndAuditAlarmW@44
-;AccessCheckByType
-AccessCheckByTypeAndAuditAlarmA@64
-AccessCheckByTypeAndAuditAlarmW@64
-;AccessCheckByTypeResultList@44
-AccessCheckByTypeResultListAndAuditAlarmA@64
-AccessCheckByTypeResultListAndAuditAlarmByHandleA@68
-AccessCheckByTypeResultListAndAuditAlarmByHandleW@68
-AccessCheckByTypeResultListAndAuditAlarmW@64
-AddAccessAllowedAce@16
-AddAccessAllowedAceEx@20
-AddAccessAllowedObjectAce@28
-AddAccessDeniedAce@16
-AddAccessDeniedAceEx@20
-AddAccessDeniedObjectAce@28
-AddAce@20
-AddAuditAccessAce@24
-AddAuditAccessAceEx@28
-AddAuditAccessObjectAce@36
-AddMandatoryAce@20
-AddUsersToEncryptedFile@8
-AdjustTokenGroups@24
-AdjustTokenPrivileges@24
-AllocateAndInitializeSid@44
-AllocateLocallyUniqueId@4
-AreAllAccessesGranted@8
-AreAnyAccessesGranted@8
-BackupEventLogA@8
-BackupEventLogW@8
-BuildExplicitAccessWithNameA@20
-BuildExplicitAccessWithNameW@20
-BuildImpersonateExplicitAccessWithNameA@24
-BuildImpersonateExplicitAccessWithNameW@24
-BuildImpersonateTrusteeA@8
-BuildImpersonateTrusteeW@8
-BuildSecurityDescriptorA@36
-BuildSecurityDescriptorW@36
-BuildTrusteeWithNameA@8
-BuildTrusteeWithNameW@8
-BuildTrusteeWithObjectsAndNameA@24
-BuildTrusteeWithObjectsAndNameW@24
-BuildTrusteeWithObjectsAndSidA@20
-BuildTrusteeWithObjectsAndSidW@20
-BuildTrusteeWithSidA@8
-BuildTrusteeWithSidW@8
-;CancelOverlappedAccess@4
-ChangeServiceConfig2A@12
-ChangeServiceConfig2W@12
-ChangeServiceConfigA@44
-ChangeServiceConfigW@44
-CheckTokenMembership@12
-ClearEventLogA@8
-ClearEventLogW@8
-;CloseCodeAuthzLevel@4
-;CloseEncryptedFileRaw
-CloseEventLog@4
-CloseServiceHandle@4
-;CloseTrace@8
-CommandLineFromMsiDescriptor@12
-;ComputeAccessTokenFromCodeAuthzLevel@20
-ControlService@12
-ControlServiceEx@16
-;ControlTraceA@12
-;ControlTraceW@12
-;ConvertAccessToSecurityDescriptorA@20
-;ConvertAccessToSecurityDescriptorW@20
-;ConvertSDToStringSDRootDomainA@24
-;ConvertSDToStringSDRootDomainW@24
-;ConvertSecurityDescriptorToAccessA@28
-;ConvertSecurityDescriptorToAccessNamedA=ConvertSecurityDescriptorToAccessA@28
-;ConvertSecurityDescriptorToAccessNamedW=ConvertSecurityDescriptorToAccessW@28
-;ConvertSecurityDescriptorToAccessW@28
-ConvertSecurityDescriptorToStringSecurityDescriptorA@20
-ConvertSecurityDescriptorToStringSecurityDescriptorW@20
-ConvertSidToStringSidA@8
-ConvertSidToStringSidW@8
-;ConvertStringSDToSDDomainA@24
-;ConvertStringSDToSDDomainW@24
-;ConvertStringSDToSDRootDomainA@20
-;ConvertStringSDToSDRootDomainW@20
-ConvertStringSecurityDescriptorToSecurityDescriptorA@16
-ConvertStringSecurityDescriptorToSecurityDescriptorW@16
-ConvertStringSidToSidA@8
-ConvertStringSidToSidW@8
-ConvertToAutoInheritPrivateObjectSecurity@24
-CopySid@12
-;CreateCodeAuthzLevel@20
-CreatePrivateObjectSecurity@24
-CreatePrivateObjectSecurityEx@32
-CreatePrivateObjectSecurityWithMultipleInheritance@36
-CreateProcessAsUserA@44
-;CreateProcessAsUserSecure
-CreateProcessAsUserW@44
-;CreateProcessWithLogonW
-CreateRestrictedToken@36
-CreateServiceA@52
-CreateServiceW@52
-;CreateTraceInstanceId@8
-CreateWellKnownSid@16
-;CredDeleteA@12
-;CredDeleteW@12
-;CredEnumerateA@16
-;CredEnumerateW@16
-;CredFree@4
-;CredGetSessionTypes@8
-;CredGetTargetInfoA@12
-;CredGetTargetInfoW@12
-;CredIsMarshaledCredentialA@4
-;CredIsMarshaledCredentialW@4
-;CredMarshalCredentialA@12
-;CredMarshalCredentialW@12
-;CredProfileLoaded
-;CredReadA
-;CredReadDomainCredentialsA
-;CredReadDomainCredentialsW
-;CredReadW
-;CredRenameA
-;CredRenameW
-;CredUnmarshalCredentialA
-;CredUnmarshalCredentialW
-;CredWriteA
-;CredWriteDomainCredentialsA
-;CredWriteDomainCredentialsW
-;CredWriteW
-;CredpConvertCredential
-;CredpConvertTargetInfo
-;CredpDecodeCredential
-;CredpEncodeCredential
-CryptAcquireContextA@20
-CryptAcquireContextW@20
-CryptContextAddRef@12
-CryptCreateHash@20
-CryptDecrypt@24
-CryptDeriveKey@20
-CryptDestroyHash@4
-CryptDestroyKey@4
-CryptDuplicateHash@16
-CryptDuplicateKey@16
-CryptEncrypt@28
-CryptEnumProviderTypesA@24
-CryptEnumProviderTypesW@24
-CryptEnumProvidersA@24
-CryptEnumProvidersW@24
-CryptExportKey@24
-CryptGenKey@16
-CryptGenRandom@12
-CryptGetDefaultProviderA@20
-CryptGetDefaultProviderW@20
-CryptGetHashParam@20
-CryptGetKeyParam@20
-CryptGetProvParam@20
-CryptGetUserKey@12
-CryptHashData@16
-CryptHashSessionKey@12
-CryptImportKey@24
-CryptReleaseContext@8
-CryptSetHashParam@16
-CryptSetKeyParam@16
-CryptSetProvParam@16
-CryptSetProviderA@8
-CryptSetProviderExA@16
-CryptSetProviderExW@16
-CryptSetProviderW@8
-CryptSignHashA@24
-CryptSignHashW@24
-CryptVerifySignatureA@24
-CryptVerifySignatureW@24
-DecryptFileA@8
-DecryptFileW@8
-DeleteAce@8
-DeleteService@4
-DeregisterEventSource@4
-DestroyPrivateObjectSecurity@4
-;DuplicateEncryptionInfoFile
-DuplicateToken@12
-DuplicateTokenEx@24
-;ElfBackupEventLogFileA@8
-;ElfBackupEventLogFileW@8
-;ElfChangeNotify@8
-;ElfClearEventLogFileA@8
-;ElfClearEventLogFileW@8
-;ElfCloseEventLog@4
-;ElfDeregisterEventSource@4
-;ElfNumberOfRecords@8
-;ElfOldestRecord@8
-;ElfOpenBackupEventLogA@12
-;ElfOpenBackupEventLogW@12
-;ElfOpenEventLogA@12
-;ElfOpenEventLogW@12
-;ElfReadEventLogA@28
-;ElfReadEventLogW@28
-;ElfRegisterEventSourceA@12
-;ElfRegisterEventSourceW@12
-;ElfReportEventA@48
-;ElfReportEventW@48
-;EnableTrace
-EncryptFileA@4
-EncryptFileW@4
-;EncryptedFileKeyInfo
-EncryptionDisable@8
-EnumDependentServicesA@24
-EnumDependentServicesW@24
-EnumServiceGroupW@36
-EnumServicesStatusA@32
-EnumServicesStatusExA@40
-EnumServicesStatusExW@40
-EnumServicesStatusW@32
-;EnumerateTraceGuids
-EqualDomainSid@12
-EqualPrefixSid@8
-EqualSid@8
-FileEncryptionStatusA@8
-FileEncryptionStatusW@8
-FindFirstFreeAce@8
-;FlushTraceA
-;FlushTraceW
-;FreeEncryptedFileKeyInfo
-FreeEncryptionCertificateHashList@4
-FreeInheritedFromArray@12
-FreeSid@4
-;GetAccessPermissionsForObjectA
-;GetAccessPermissionsForObjectW
-GetAce@12
-GetAclInformation@16
-GetAuditedPermissionsFromAclA@16
-GetAuditedPermissionsFromAclW@16
-GetCurrentHwProfileA@4
-GetCurrentHwProfileW@4
-GetEffectiveRightsFromAclA@12
-GetEffectiveRightsFromAclW@12
-;GetEventLogInformation
-GetExplicitEntriesFromAclA@12=ADVAPI32.GetExplicitEntriesFromAclW
-GetExplicitEntriesFromAclW@12
-GetFileSecurityA@20
-GetFileSecurityW@20
-;GetInformationCodeAuthzLevelW
-;GetInformationCodeAuthzPolicyW
-GetInheritanceSourceA@40
-GetInheritanceSourceW@40
-GetKernelObjectSecurity@20
-GetLengthSid@4
-;GetLocalManagedApplicationData
-;GetLocalManagedApplications
-;GetManagedApplicationCategories
-;GetManagedApplications
-GetMultipleTrusteeA@4
-GetMultipleTrusteeOperationA@4
-GetMultipleTrusteeOperationW@4
-GetMultipleTrusteeW@4
-GetNamedSecurityInfoA@32
-;GetNamedSecurityInfoExA
-;GetNamedSecurityInfoExW
-GetNamedSecurityInfoW@32
-GetNumberOfEventLogRecords@8
-GetOldestEventLogRecord@8
-;GetOverlappedAccessResults
-GetPrivateObjectSecurity@20
-GetSecurityDescriptorControl@12
-GetSecurityDescriptorDacl@16
-GetSecurityDescriptorGroup@12
-GetSecurityDescriptorLength@4=NTDLL.RtlLengthSecurityDescriptor
-GetSecurityDescriptorOwner@12
-GetSecurityDescriptorRMControl@8
-GetSecurityDescriptorSacl@16
-GetSecurityInfo@32
-GetSecurityInfoExA@36
-GetSecurityInfoExW@36
-GetServiceDisplayNameA@16
-GetServiceDisplayNameW@16
-GetServiceKeyNameA@16
-GetServiceKeyNameW@16
-GetSidIdentifierAuthority@4
-GetSidLengthRequired@4
-GetSidSubAuthority@8
-GetSidSubAuthorityCount@4
-GetSiteSidFromToken@4
-GetTokenInformation@20
-GetTraceEnableFlags@8
-GetTraceEnableLevel@8
-GetTraceLoggerHandle@4
-GetTrusteeFormA@4
-GetTrusteeFormW@4
-GetTrusteeNameA@4
-GetTrusteeNameW@4
-GetTrusteeTypeA@4
-GetTrusteeTypeW@4
-GetUserNameA@8
-GetUserNameW@8
-GetWindowsAccountDomainSid@12
-;I_ScGetCurrentGroupStateW@12
-;I_ScIsSecurityProcess
-;I_ScPnPGetServiceName
-;I_ScSendTSMessage
-;I_ScSetServiceBitsA@20
-;I_ScSetServiceBitsW@20
-;IdentifyCodeAuthzLevelW
-ImpersonateAnonymousToken@4
-ImpersonateLoggedOnUser@4
-ImpersonateNamedPipeClient@4
-ImpersonateSelf@4
-InitializeAcl@12
-InitializeSecurityDescriptor@8
-InitializeSid@12
-InitiateSystemShutdownA@20
-;InitiateSystemShutdownExA@24
-InitiateSystemShutdownExW@24
-InitiateSystemShutdownW@20
-;InstallApplication
-IsTextUnicode@12=NTDLL.RtlIsTextUnicode
-IsTokenRestricted@4
-;IsTokenUntrusted
-IsValidAcl@4
-IsValidSecurityDescriptor@4
-IsValidSid@4
-IsWellKnownSid@8
-LockServiceDatabase@4
-LogonUserA@24
-;LogonUserExA
-;LogonUserExW
-LogonUserW@24
-LookupAccountNameA@28
-LookupAccountNameW@28
-LookupAccountSidA@28
-LookupAccountSidW@28
-LookupPrivilegeDisplayNameA@20
-LookupPrivilegeDisplayNameW@20
-LookupPrivilegeNameA@16
-LookupPrivilegeNameW@16
-LookupPrivilegeValueA@12
-LookupPrivilegeValueW@12
-;LookupSecurityDescriptorPartsA@28
-;LookupSecurityDescriptorPartsW@28
-LsaAddAccountRights@16
-;LsaAddPrivilegesToAccount@8
-;LsaClearAuditLog@4
-LsaClose@4
-;LsaCreateAccount@16
-;LsaCreateSecret@16
-;LsaCreateTrustedDomain@16
-;LsaCreateTrustedDomainEx
-LsaDelete@4
-;LsaDeleteTrustedDomain@8
-LsaEnumerateAccountRights@16
-;LsaEnumerateAccounts@20
-LsaEnumerateAccountsWithUserRight@16
-;LsaEnumeratePrivileges@20
-;LsaEnumeratePrivilegesOfAccount@8
-LsaEnumerateTrustedDomains@20
-;LsaEnumerateTrustedDomainsEx
-LsaFreeMemory@4
-;LsaGetQuotasForAccount@8
-;LsaGetRemoteUserName
-;LsaGetSystemAccessAccount@8
-LsaGetUserName@8
-;LsaICLookupNames@32
-;LsaICLookupNamesWithCreds
-;LsaICLookupSids@32
-;LsaICLookupSidsWithCreds
-;LsaLookupNames@20
-LsaLookupNames2@24
-;LsaLookupPrivilegeDisplayName@16
-;LsaLookupPrivilegeName@12
-;LsaLookupPrivilegeValue@12
-LsaLookupSids@20
-LsaNtStatusToWinError@4
-;LsaOpenAccount@16
-LsaOpenPolicy@16
-;LsaOpenPolicySce
-;LsaOpenSecret@16
-;LsaOpenTrustedDomain@16
-;LsaOpenTrustedDomainByName
-;LsaQueryDomainInformationPolicy
-;LsaQueryForestTrustInformation
-LsaQueryInfoTrustedDomain@12
-LsaQueryInformationPolicy@12
-;LsaQuerySecret@20
-;LsaQuerySecurityObject@12
-;LsaQueryTrustedDomainInfo@16
-;LsaQueryTrustedDomainInfoByName
-LsaRemoveAccountRights@20
-;LsaRemovePrivilegesFromAccount@12
-LsaRetrievePrivateData@12
-LsaSetInformationPolicy@12
-;LsaSetForestTrustInformation
-;LsaSetInformationPolicy
-;LsaSetInformationTrustedDomain@12
-;LsaSetQuotasForAccount@8
-;LsaSetSecret@12
-;LsaSetSecurityObject@12
-;LsaSetSystemAccessAccount@8
-;LsaSetTrustedDomainInfoByName
-;LsaSetTrustedDomainInformation@16
-LsaStorePrivateData@12
-MD4Final@4
-MD4Init@4
-MD4Update@12
-MD5Final@4
-MD5Init@4
-MD5Update@12
-;MSChapSrvChangePassword
-;MSChapSrvChangePassword2
-MakeAbsoluteSD@44
-MakeAbsoluteSD2@8
-MakeSelfRelativeSD@12
-MapGenericMask@8=NTDLL.RtlMapGenericMask
-NotifyBootConfigStatus@4
-NotifyChangeEventLog@8
-ObjectCloseAuditAlarmA@12
-ObjectCloseAuditAlarmW@12
-ObjectDeleteAuditAlarmA@12
-ObjectDeleteAuditAlarmW@12
-ObjectOpenAuditAlarmA@48
-ObjectOpenAuditAlarmW@48
-ObjectPrivilegeAuditAlarmA@24
-ObjectPrivilegeAuditAlarmW@24
-OpenBackupEventLogA@8
-OpenBackupEventLogW@8
-;OpenEncryptedFileRawA
-;OpenEncryptedFileRawW
-OpenEventLogA@8
-OpenEventLogW@8
-OpenProcessToken@12
-OpenSCManagerA@12
-OpenSCManagerW@12
-OpenServiceA@12
-OpenServiceW@12
-OpenThreadToken@16
-;OpenTraceA
-;OpenTraceW
-PrivilegeCheck@12
-PrivilegedServiceAuditAlarmA@20
-PrivilegedServiceAuditAlarmW@20
-;ProcessIdleTasks
-;ProcessTrace
-;ProvAccessRightsToNTAccessMask ; ?
-;QueryAllTracesA
-;QueryAllTracesW
-QueryRecoveryAgentsOnEncryptedFile@8
-QuerySecurityAccessMask@8
-QueryServiceConfig2A@20
-QueryServiceConfig2W@20
-QueryServiceConfigA@16
-QueryServiceConfigW@16
-QueryServiceLockStatusA@16
-QueryServiceLockStatusW@16
-QueryServiceObjectSecurity@20
-QueryServiceStatus@8
-QueryServiceStatusEx@20
-;QueryTraceA
-;QueryTraceW
-QueryUsersOnEncryptedFile@8
-;QueryWindows31FilesMigration@4
-;ReadEncryptedFileRaw
-ReadEventLogA@28
-ReadEventLogW@28
-RegCloseKey@4
-RegConnectRegistryA@12
-RegConnectRegistryW@12
-RegCopyTreeA@12
-RegCopyTreeW@12
-RegCreateKeyA@12
-RegCreateKeyExA@36
-RegCreateKeyExW@36
-RegCreateKeyW@12
-RegDeleteKeyA@8
-RegDeleteKeyW@8
-RegDeleteKeyExA@16
-RegDeleteKeyExW@16
-RegDeleteKeyValueA@12
-RegDeleteKeyValueW@12
-RegDeleteTreeA@8
-RegDeleteTreeW@8
-RegDeleteValueA@8
-RegDeleteValueW@8
-RegDisablePredefinedCache@0
-RegDisablePredefinedCacheEx@0
-RegDisableReflectionKey@4
-RegEnableReflectionKey@4
-RegEnumKeyA@16
-RegEnumKeyExA@32
-RegEnumKeyExW@32
-RegEnumKeyW@16
-RegEnumValueA@32
-RegEnumValueW@32
-RegFlushKey@4
-RegGetKeySecurity@16
-RegGetValueA@28
-RegGetValueW@28
-RegLoadKeyA@12
-RegLoadKeyW@12
-RegLoadMUIStringA@28
-RegLoadMUIStringW@28
-RegNotifyChangeKeyValue@20
-RegOpenCurrentUser@8
-RegOpenKeyA@12
-RegOpenKeyExA@20
-RegOpenKeyExW@20
-RegOpenKeyW@12
-RegOpenUserClassesRoot@16
-RegOverridePredefKey@8
-RegQueryInfoKeyA@48
-RegQueryInfoKeyW@48
-RegQueryMultipleValuesA@20
-RegQueryMultipleValuesW@20
-RegQueryReflectionKey@8
-RegQueryValueA@16
-RegQueryValueExA@24
-RegQueryValueExW@24
-RegQueryValueW@16
-RegReplaceKeyA@16
-RegReplaceKeyW@16
-RegRestoreKeyA@12
-RegRestoreKeyW@12
-RegSaveKeyA@12
-;RegSaveKeyExA
-;RegSaveKeyExW
-RegSaveKeyW@12
-RegSetKeySecurity@12
-RegSetKeyValueA@24
-RegSetKeyValueW@24
-RegSetValueA@20
-RegSetValueExA@24
-RegSetValueExW@24
-RegSetValueW@20
-RegUnLoadKeyA@8
-RegUnLoadKeyW@8
-RegisterEventSourceA@8
-RegisterEventSourceW@8
-;RegisterIdleTask
-RegisterServiceCtrlHandlerA@8
-RegisterServiceCtrlHandlerExA@12
-RegisterServiceCtrlHandlerExW@12
-RegisterServiceCtrlHandlerW@8
-RegisterTraceGuidsA@32
-RegisterTraceGuidsW@32
-;RemoveTraceCallback
-RemoveUsersFromEncryptedFile@8
-ReportEventA@36
-ReportEventW@36
-RevertToSelf@0
-;SaferCloseLevel
-;SaferComputeTokenFromLevel
-;SaferCreateLevel
-;SaferGetLevelInformation
-;SaferGetPolicyInformation
-;SaferIdentifyLevel
-;SaferRecordEventLogEntry
-;SaferSetLevelInformation
-;SaferSetPolicyInformation
-;SaferiChangeRegistryScope
-;SaferiCompareTokenLevels
-;SaferiIsExecutableFileType
-;SaferiPopulateDefaultsInRegistry
-;SaferiRecordEventLogEntry
-;SaferiReplaceProcessThreadTokens
-;SaferiSearchMatchingHashRules
-SetAclInformation@16
-;SetEntriesInAccessListA
-;SetEntriesInAccessListW
-SetEntriesInAclA@16
-SetEntriesInAclW@16
-;SetEntriesInAuditListA
-;SetEntriesInAuditListW
-SetFileSecurityA@12
-SetFileSecurityW@12
-;SetInformationCodeAuthzLevelW
-;SetInformationCodeAuthzPolicyW
-SetKernelObjectSecurity@12
-SetNamedSecurityInfoA@28
-;SetNamedSecurityInfoExA
-;SetNamedSecurityInfoExW
-SetNamedSecurityInfoW@28
-SetPrivateObjectSecurity@20
-;SetPrivateObjectSecurityEx
-SetSecurityAccessMask@8
-SetSecurityDescriptorControl@12
-SetSecurityDescriptorDacl@16
-SetSecurityDescriptorGroup@12
-SetSecurityDescriptorOwner@12
-SetSecurityDescriptorRMControl@8
-SetSecurityDescriptorSacl@16
-SetSecurityInfo@28
-;SetSecurityInfoExA
-;SetSecurityInfoExW
-SetServiceBits@16
-SetServiceObjectSecurity@12
-SetServiceStatus@8
-SetThreadToken@8
-SetTokenInformation@16
-;SetTraceCallback
-;SetUserFileEncryptionKey
-StartServiceA@12
-StartServiceCtrlDispatcherA@4
-StartServiceCtrlDispatcherW@4
-StartServiceW@12
-;StartTraceA
-;StartTraceW
-;StopTraceA
-;StopTraceW
-;SynchronizeWindows31FilesAndWindowsNTRegistry@16
-SystemFunction001@12
-SystemFunction002@12
-SystemFunction003@8
-SystemFunction004@12
-SystemFunction005@12
-SystemFunction006@8
-SystemFunction007@8
-SystemFunction008@12
-SystemFunction009@12
-SystemFunction010@12
-SystemFunction011@12=ADVAPI32.SystemFunction010@12
-SystemFunction012@12
-SystemFunction013@12
-SystemFunction014@12=ADVAPI32.SystemFunction012@12
-SystemFunction015@12=ADVAPI32.SystemFunction013@13
-SystemFunction016@12=ADVAPI32.SystemFunction012@12
-SystemFunction017@12=ADVAPI32.SystemFunction013@12
-SystemFunction018@12=ADVAPI32.SystemFunction012@12
-SystemFunction019@12=ADVAPI32.SystemFunction013@12
-SystemFunction020@12=ADVAPI32.SystemFunction012@12
-SystemFunction021@12=ADVAPI32.SystemFunction013@12
-SystemFunction022@12=ADVAPI32.SystemFunction012@12
-SystemFunction023@12=ADVAPI32.SystemFunction013@12
-SystemFunction024@12
-SystemFunction025@12
-SystemFunction026@12=ADVAPI32.SystemFunction024@12
-SystemFunction027@12=ADVAPI32.SystemFunction025@12
-SystemFunction028@8
-SystemFunction029@8
-SystemFunction030@8
-SystemFunction031@8=ADVAPI32.SystemFunction030@8
-SystemFunction032@8
-SystemFunction033@8
-SystemFunction034@8
-SystemFunction035@4
-SystemFunction036@8
-SystemFunction040@12
-SystemFunction041@12
-TraceEvent@12
-;TraceEventInstance
-TraceMessage
-;TraceMessageVa
-TreeResetNamedSecurityInfoA@44
-TreeResetNamedSecurityInfoW@44
-;TrusteeAccessToObjectA
-;TrusteeAccessToObjectW
-;UninstallApplication
-UnlockServiceDatabase@4
-;UnregisterIdleTask
-UnregisterTraceGuids@8
-;UpdateTraceA
-;UpdateTraceW
-;WdmWmiServiceMain
-;WmiCloseBlock
-;WmiCloseTraceWithCursor
-;WmiConvertTimestamp
-;WmiDevInstToInstanceNameA
-;WmiDevInstToInstanceNameW
-;WmiEnumerateGuids
-;WmiExecuteMethodA
-;WmiExecuteMethodW
-;WmiFileHandleToInstanceNameA
-;WmiFileHandleToInstanceNameW
-;WmiFreeBuffer
-;WmiGetFirstTraceOffset
-;WmiGetNextEvent
-;WmiGetTraceHeader
-;WmiMofEnumerateResourcesA
-;WmiMofEnumerateResourcesW
-;WmiNotificationRegistrationA
-;WmiNotificationRegistrationW
-;WmiOpenBlock
-;WmiOpenTraceWithCursor
-;WmiParseTraceEvent
-;WmiQueryAllDataA
-;WmiQueryAllDataMultipleA
-;WmiQueryAllDataMultipleW
-;WmiQueryAllDataW
-;WmiQueryGuidInformation
-;WmiQuerySingleInstanceA
-;WmiQuerySingleInstanceMultipleA
-;WmiQuerySingleInstanceMultipleW
-;WmiQuerySingleInstanceW
-;WmiReceiveNotificationsA
-;WmiReceiveNotificationsW
-;WmiSetSingleInstanceA
-;WmiSetSingleInstanceW
-;WmiSetSingleItemA
-;WmiSetSingleItemW
-;Wow64Win32ApiEntry
-;WriteEncryptedFileRaw
-; EOF
<module name="advapi32" type="win32dll" baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32" installname="advapi32.dll" unicode="yes">
- <importlibrary definition="advapi32.def" />
+ <importlibrary definition="advapi32.spec.def" />
<include base="advapi32">.</include>
<include base="scm_client">.</include>
<include base="lsa_client">.</include>
<library>pseh</library>
<library>ntdll</library>
<pch>advapi32.h</pch>
+ <file>advapi32.spec</file>
<directory name="crypt">
<file>crypt.c</file>
<file>crypt_arc4.c</file>
--- /dev/null
+ @ stdcall A_SHAFinal(ptr ptr)
+ @ stdcall A_SHAInit(ptr)
+ @ stdcall A_SHAUpdate(ptr ptr long)
+ @ stdcall AbortSystemShutdownA(ptr)
+ @ stdcall AbortSystemShutdownW(ptr)
+ @ stdcall AccessCheck(ptr long long ptr ptr ptr ptr ptr)
+ @ stdcall AccessCheckAndAuditAlarmA(str ptr str str ptr long ptr long ptr ptr ptr)
+ @ stdcall AccessCheckAndAuditAlarmW(wstr ptr wstr wstr ptr long ptr long ptr ptr ptr)
+ @ stub AccessCheckByType #(ptr ptr long long ptr long ptr ptr ptr ptr ptr)
+ @ stdcall AccessCheckByTypeAndAuditAlarmA(str ptr str str ptr ptr long long long ptr long ptr long ptr ptr ptr)
+ @ stdcall AccessCheckByTypeAndAuditAlarmW(wstr ptr wstr wstr ptr ptr long long long ptr long ptr long ptr ptr ptr)
+ @ stub AccessCheckByTypeResultList
+ @ stdcall AccessCheckByTypeResultListAndAuditAlarmA(str ptr str str ptr long long long long ptr long ptr long ptr ptr ptr)
+ @ stdcall AccessCheckByTypeResultListAndAuditAlarmByHandleA(str ptr ptr str str ptr long long long long ptr long ptr long ptr ptr ptr)
+ @ stdcall AccessCheckByTypeResultListAndAuditAlarmByHandleW(wstr ptr ptr wstr wstr ptr long long long long ptr long ptr long ptr ptr ptr)
+ @ stdcall AccessCheckByTypeResultListAndAuditAlarmW(wstr ptr wstr wstr ptr long long long long ptr long ptr long ptr ptr ptr)
+ @ stdcall AddAccessAllowedAce (ptr long long ptr)
+ @ stdcall AddAccessAllowedAceEx (ptr long long long ptr)
+ @ stub AddAccessAllowedObjectAce
+ @ stdcall AddAccessDeniedAce(ptr long long ptr)
+ @ stdcall AddAccessDeniedAceEx(ptr long long long ptr)
+ @ stub AddAccessDeniedObjectAce
+ @ stdcall AddAce(ptr long long ptr long)
+ @ stdcall AddAuditAccessAce(ptr long long ptr long long)
+ @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long)
+ @ stub AddAuditAccessObjectAce
+ @ stub AddUsersToEncryptedFile
+ @ stdcall AdjustTokenGroups(long long ptr long ptr ptr)
+ @ stdcall AdjustTokenPrivileges(long long ptr long ptr ptr)
+ @ stdcall AllocateAndInitializeSid(ptr long long long long long long long long long ptr)
+ @ stdcall AllocateLocallyUniqueId(ptr)
+ @ stdcall AreAllAccessesGranted(long long)
+ @ stdcall AreAnyAccessesGranted(long long)
+ @ stdcall BackupEventLogA (long str)
+ @ stdcall BackupEventLogW (long wstr)
+ @ stdcall BuildExplicitAccessWithNameA(ptr str long long long)
+ @ stdcall BuildExplicitAccessWithNameW(ptr wstr long long long)
+ @ stub BuildImpersonateExplicitAccessWithNameA
+ @ stub BuildImpersonateExplicitAccessWithNameW
+ @ stub BuildImpersonateTrusteeA
+ @ stub BuildImpersonateTrusteeW
+ @ stdcall BuildSecurityDescriptorA(ptr ptr long ptr long ptr ptr ptr ptr)
+ @ stdcall BuildSecurityDescriptorW(ptr ptr long ptr long ptr ptr ptr ptr)
+ @ stdcall BuildTrusteeWithNameA(ptr str)
+ @ stdcall BuildTrusteeWithNameW(ptr wstr)
+ @ stdcall BuildTrusteeWithObjectsAndNameA(ptr ptr long str str str)
+ @ stdcall BuildTrusteeWithObjectsAndNameW(ptr ptr long wstr wstr wstr)
+ @ stdcall BuildTrusteeWithObjectsAndSidA(ptr ptr ptr ptr ptr)
+ @ stdcall BuildTrusteeWithObjectsAndSidW(ptr ptr ptr ptr ptr)
+ @ stdcall BuildTrusteeWithSidA(ptr ptr)
+ @ stdcall BuildTrusteeWithSidW(ptr ptr)
+ @ stub CancelOverlappedAccess
+ @ stdcall ChangeServiceConfig2A(long long ptr)
+ @ stdcall ChangeServiceConfig2W(long long ptr)
+ @ stdcall ChangeServiceConfigA(long long long long wstr str ptr str str str str)
+ @ stdcall ChangeServiceConfigW(long long long long wstr wstr ptr wstr wstr wstr wstr)
+ @ stdcall CheckTokenMembership(long ptr ptr)
+ @ stdcall ClearEventLogA (long str)
+ @ stdcall ClearEventLogW (long wstr)
+ @ stub CloseCodeAuthzLevel
+ @ stub CloseEncryptedFileRaw
+ @ stdcall CloseEventLog (long)
+ @ stdcall CloseServiceHandle(long)
+ @ stub CloseTrace
+ @ stdcall CommandLineFromMsiDescriptor(wstr ptr ptr)
+ @ stub ComputeAccessTokenFromCodeAuthzLevel
+ @ stdcall ControlService(long long ptr)
+ @ stub ControlTraceA
+ @ stub ControlTraceW
+ @ stub ConvertAccessToSecurityDescriptorA
+ @ stub ConvertAccessToSecurityDescriptorW
+ @ stub ConvertSDToStringSDRootDomainA
+ @ stub ConvertSDToStringSDRootDomainW
+ @ stub ConvertSecurityDescriptorToAccessA
+ @ stub ConvertSecurityDescriptorToAccessNamedA
+ @ stub ConvertSecurityDescriptorToAccessNamedW
+ @ stub ConvertSecurityDescriptorToAccessW
+ @ stdcall ConvertSecurityDescriptorToStringSecurityDescriptorA(ptr long long ptr ptr)
+ @ stdcall ConvertSecurityDescriptorToStringSecurityDescriptorW(ptr long long ptr ptr)
+ @ stdcall ConvertSidToStringSidA(ptr ptr)
+ @ stdcall ConvertSidToStringSidW(ptr ptr)
+ @ stub ConvertStringSDToSDDomainA
+ @ stub ConvertStringSDToSDDomainW
+ @ stub ConvertStringSDToSDRootDomainA
+ @ stub ConvertStringSDToSDRootDomainW
+ @ stdcall ConvertStringSecurityDescriptorToSecurityDescriptorA(str long ptr ptr)
+ @ stdcall ConvertStringSecurityDescriptorToSecurityDescriptorW(wstr long ptr ptr)
+ @ stdcall ConvertStringSidToSidA(ptr ptr)
+ @ stdcall ConvertStringSidToSidW(ptr ptr)
+ @ stub ConvertToAutoInheritPrivateObjectSecurity
+ @ stdcall CopySid(long ptr ptr)
+ @ stub CreateCodeAuthzLevel
+ @ stdcall CreatePrivateObjectSecurity(ptr ptr ptr long long ptr)
+ @ stub CreatePrivateObjectSecurityEx
+ @ stub CreatePrivateObjectSecurityWithMultipleInheritance
+ @ stdcall CreateProcessAsUserA(long str str ptr ptr long long ptr str ptr ptr)
+ @ stub CreateProcessAsUserSecure
+ @ stdcall CreateProcessAsUserW(long str str ptr ptr long long ptr str ptr ptr)
+ @ stub CreateProcessWithLogonW #(wstr wstr wstr long wstr wstr long ptr wstr ptr ptr)
+ @ stdcall CreateRestrictedToken(long long long ptr long ptr long ptr ptr)
+ @ stdcall CreateServiceA(long ptr ptr long long long long ptr ptr ptr ptr ptr ptr)
+ @ stdcall CreateServiceW (long ptr ptr long long long long ptr ptr ptr ptr ptr ptr)
+ @ stub CreateTraceInstanceId
+ @ stdcall CreateWellKnownSid(long ptr ptr ptr)
+ @ stub CredDeleteA #(str long long)
+ @ stub CredDeleteW #(wstr long long)
+ @ stub CredEnumerateA #(str long ptr ptr)
+ @ stub CredEnumerateW #(wstr long ptr ptr)
+ @ stub CredFree #(ptr)
+ @ stub CredGetSessionTypes #(long ptr)
+ @ stub CredGetTargetInfoA
+ @ stub CredGetTargetInfoW
+ @ stub CredIsMarshaledCredentialA
+ @ stub CredIsMarshaledCredentialW
+ @ stub CredMarshalCredentialA
+ @ stub CredMarshalCredentialW
+ @ stub CredProfileLoaded
+ @ stub CredReadA #(str long long ptr)
+ @ stub CredReadDomainCredentialsA
+ @ stub CredReadDomainCredentialsW
+ @ stub CredReadW #(wstr long long ptr)
+ @ stub CredRenameA
+ @ stub CredRenameW
+ @ stub CredUnmarshalCredentialA
+ @ stub CredUnmarshalCredentialW
+ @ stub CredWriteA #(ptr long)
+ @ stub CredWriteDomainCredentialsA
+ @ stub CredWriteDomainCredentialsW
+ @ stub CredWriteW #(ptr long)
+ @ stub CredpConvertCredential
+ @ stub CredpConvertTargetInfo
+ @ stub CredpDecodeCredential
+ @ stub CredpEncodeCredential
+ @ stdcall CryptAcquireContextA(ptr str str long long)
+ @ stdcall CryptAcquireContextW(ptr wstr wstr long long)
+ @ stdcall CryptContextAddRef(long ptr long)
+ @ stdcall CryptCreateHash(long long long long ptr)
+ @ stdcall CryptDecrypt(long long long long ptr ptr)
+ @ stdcall CryptDeriveKey(long long long long ptr)
+ @ stdcall CryptDestroyHash(long)
+ @ stdcall CryptDestroyKey(long)
+ @ stdcall CryptDuplicateHash(long ptr long ptr)
+ @ stdcall CryptDuplicateKey(long ptr long ptr)
+ @ stdcall CryptEncrypt(long long long long ptr ptr long)
+ @ stdcall CryptEnumProviderTypesA(long ptr long ptr ptr ptr)
+ @ stdcall CryptEnumProviderTypesW(long ptr long ptr ptr ptr)
+ @ stdcall CryptEnumProvidersA(long ptr long ptr ptr ptr)
+ @ stdcall CryptEnumProvidersW(long ptr long ptr ptr ptr)
+ @ stdcall CryptExportKey(long long long long ptr ptr)
+ @ stdcall CryptGenKey(long long long ptr)
+ @ stdcall CryptGenRandom(long long ptr)
+ @ stdcall CryptGetDefaultProviderA(long ptr long ptr ptr)
+ @ stdcall CryptGetDefaultProviderW(long ptr long ptr ptr)
+ @ stdcall CryptGetHashParam(long long ptr ptr long)
+ @ stdcall CryptGetKeyParam(long long ptr ptr long)
+ @ stdcall CryptGetProvParam(long long ptr ptr long)
+ @ stdcall CryptGetUserKey(long long ptr)
+ @ stdcall CryptHashData(long ptr long long)
+ @ stdcall CryptHashSessionKey(long long long)
+ @ stdcall CryptImportKey(long ptr long long long ptr)
+ @ stdcall CryptReleaseContext(long long)
+ @ stdcall CryptSetHashParam(long long ptr long)
+ @ stdcall CryptSetKeyParam(long long ptr long)
+ @ stdcall CryptSetProvParam(long long ptr long)
+ @ stdcall CryptSetProviderA(str long)
+ @ stdcall CryptSetProviderExA(str long ptr long)
+ @ stdcall CryptSetProviderExW(wstr long ptr long)
+ @ stdcall CryptSetProviderW(wstr long)
+ @ stdcall CryptSignHashA(long long ptr long ptr ptr)
+ @ stdcall CryptSignHashW(long long ptr long ptr ptr)
+ @ stdcall CryptVerifySignatureA(long ptr long long ptr long)
+ @ stdcall CryptVerifySignatureW(long ptr long long ptr long)
+ @ stdcall DecryptFileA(str long)
+ @ stdcall DecryptFileW(wstr long)
+ @ stdcall DeleteAce(ptr long)
+ @ stdcall DeleteService(long)
+ @ stdcall DeregisterEventSource(long)
+ @ stdcall DestroyPrivateObjectSecurity(ptr)
+ @ stub DuplicateEncryptionInfoFile
+ @ stdcall DuplicateToken(long long ptr)
+ @ stdcall DuplicateTokenEx(long long ptr long long ptr)
+ @ stub ElfBackupEventLogFileA
+ @ stub ElfBackupEventLogFileW
+ @ stub ElfChangeNotify
+ @ stub ElfClearEventLogFileA
+ @ stub ElfClearEventLogFileW
+ @ stub ElfCloseEventLog
+ @ stub ElfDeregisterEventSource
+ @ stub ElfDeregisterEventSourceW
+ @ stub ElfFlushEventLog
+ @ stub ElfNumberOfRecords
+ @ stub ElfOldestRecord
+ @ stub ElfOpenBackupEventLogA
+ @ stub ElfOpenBackupEventLogW
+ @ stub ElfOpenEventLogA
+ @ stub ElfOpenEventLogW
+ @ stub ElfReadEventLogA
+ @ stub ElfReadEventLogW
+ @ stub ElfRegisterEventSourceA
+ @ stub ElfRegisterEventSourceW
+ @ stub ElfReportEventA
+ @ stub ElfReportEventW
+ @ stub EnableTrace
+ @ stdcall EncryptFileA(str)
+ @ stdcall EncryptFileW(wstr)
+ @ stub EncryptedFileKeyInfo
+ @ stub EncryptionDisable
+ @ stdcall EnumDependentServicesA(long long ptr long ptr ptr)
+ @ stdcall EnumDependentServicesW(long long ptr long ptr ptr)
+ @ stub EnumServiceGroupA
+ @ stub EnumServiceGroupW
+ @ stdcall EnumServicesStatusA (long long long ptr long ptr ptr ptr)
+ @ stdcall EnumServicesStatusExA(long long long long ptr long ptr ptr ptr str)
+ @ stdcall EnumServicesStatusExW(long long long long ptr long ptr ptr ptr wstr)
+ @ stdcall EnumServicesStatusW (long long long ptr long ptr ptr ptr)
+ @ stub EnumerateTraceGuids
+ @ stub EqualDomainSid
+ @ stdcall EqualPrefixSid(ptr ptr)
+ @ stdcall EqualSid(ptr ptr)
+ @ stdcall FileEncryptionStatusA(str ptr)
+ @ stdcall FileEncryptionStatusW(wstr ptr)
+ @ stdcall FindFirstFreeAce(ptr ptr)
+ @ stub FlushTraceA
+ @ stub FlushTraceW
+ @ stub FreeEncryptedFileKeyInfo
+ @ stub FreeEncryptionCertificateHashList
+ @ stdcall FreeInheritedFromArray(ptr long ptr)
+ @ stdcall FreeSid(ptr)
+ @ stub GetAccessPermissionsForObjectA
+ @ stub GetAccessPermissionsForObjectW
+ @ stdcall GetAce(ptr long ptr)
+ @ stdcall GetAclInformation(ptr ptr long long)
+ @ stdcall GetAuditedPermissionsFromAclA(ptr ptr ptr ptr)
+ @ stdcall GetAuditedPermissionsFromAclW(ptr ptr ptr ptr)
+ @ stdcall GetCurrentHwProfileA(ptr)
+ @ stdcall GetCurrentHwProfileW(ptr)
+ @ stdcall GetEffectiveRightsFromAclA(ptr ptr ptr)
+ @ stdcall GetEffectiveRightsFromAclW(ptr ptr ptr)
+ @ stub GetEventLogInformation
+ @ stub GetExplicitEntriesFromAclA #(ptr ptr ptr)
+ @ stdcall GetExplicitEntriesFromAclW(ptr ptr ptr)
+ @ stdcall GetFileSecurityA(str long ptr long ptr)
+ @ stdcall GetFileSecurityW(wstr long ptr long ptr)
+ @ stub GetInformationCodeAuthzLevelW
+ @ stub GetInformationCodeAuthzPolicyW
+ @ stdcall GetInheritanceSourceA(str long long long ptr long ptr ptr ptr ptr)
+ @ stdcall GetInheritanceSourceW(wstr long long long ptr long ptr ptr ptr ptr)
+ @ stdcall GetKernelObjectSecurity(long long ptr long ptr)
+ @ stdcall GetLengthSid(ptr)
+ @ stub GetLocalManagedApplicationData
+ @ stub GetLocalManagedApplications
+ @ stub GetManagedApplicationCategories
+ @ stub GetManagedApplications
+ @ stub GetMangledSiteSid
+ @ stub GetMultipleTrusteeA
+ @ stub GetMultipleTrusteeOperationA
+ @ stub GetMultipleTrusteeOperationW
+ @ stub GetMultipleTrusteeW
+ @ stdcall GetNamedSecurityInfoA (str long long ptr ptr ptr ptr ptr)
+ @ stub GetNamedSecurityInfoExA
+ @ stub GetNamedSecurityInfoExW
+ @ stdcall GetNamedSecurityInfoW (wstr long long ptr ptr ptr ptr ptr)
+ @ stdcall GetNumberOfEventLogRecords (long ptr)
+ @ stdcall GetOldestEventLogRecord (long ptr)
+ @ stub GetOverlappedAccessResults
+ @ stdcall GetPrivateObjectSecurity(ptr long ptr long ptr)
+ @ stdcall GetSecurityDescriptorControl (ptr ptr ptr)
+ @ stdcall GetSecurityDescriptorDacl (ptr ptr ptr ptr)
+ @ stdcall GetSecurityDescriptorGroup(ptr ptr ptr)
+ @ stub GetSecurityDescriptorLength #(ptr)
+ @ stdcall GetSecurityDescriptorOwner(ptr ptr ptr)
+ @ stub GetSecurityDescriptorRMControl
+ @ stdcall GetSecurityDescriptorSacl (ptr ptr ptr ptr)
+ @ stdcall GetSecurityInfo (long long long ptr ptr ptr ptr ptr)
+ @ stub GetSecurityInfoExA
+ @ stdcall GetSecurityInfoExW (long long long wstr wstr ptr ptr ptr ptr)
+ @ stdcall GetServiceDisplayNameA(ptr str ptr ptr)
+ @ stdcall GetServiceDisplayNameW(ptr wstr ptr ptr)
+ @ stdcall GetServiceKeyNameA(long str ptr ptr)
+ @ stdcall GetServiceKeyNameW(long wstr ptr ptr)
+ @ stdcall GetSidIdentifierAuthority(ptr)
+ @ stdcall GetSidLengthRequired(long)
+ @ stdcall GetSidSubAuthority(ptr long)
+ @ stdcall GetSidSubAuthorityCount(ptr)
+ @ stub GetSiteSidFromToken
+ @ stdcall GetTokenInformation(long long ptr long ptr)
+ @ stub GetTraceEnableFlags
+ @ stub GetTraceEnableLevel
+ @ stub GetTraceLoggerHandle
+ @ stdcall GetTrusteeFormA(ptr)
+ @ stdcall GetTrusteeFormW(ptr)
+ @ stdcall GetTrusteeNameA(ptr)
+ @ stdcall GetTrusteeNameW(ptr)
+ @ stdcall GetTrusteeTypeA(ptr)
+ @ stdcall GetTrusteeTypeW(ptr)
+ @ stdcall GetUserNameA(ptr ptr)
+ @ stdcall GetUserNameW(ptr ptr)
+ @ stub GetWindowsAccountDomainSid
+ @ stub I_ScGetCurrentGroupStateW
+ @ stub I_ScIsSecurityProcess
+ @ stub I_ScPnPGetServiceName
+ @ stub I_ScSendTSMessage
+ @ stub I_ScSetServiceBit
+ @ stub I_ScSetServiceBitsA
+ @ stub I_ScSetServiceBitsW
+ @ stub IdentifyCodeAuthzLevelW
+ @ stub ImpersonateAnonymousToken
+ @ stdcall ImpersonateLoggedOnUser(long)
+ @ stdcall ImpersonateNamedPipeClient(long)
+ @ stdcall ImpersonateSelf(long)
+ @ stdcall InitializeAcl(ptr long long)
+ @ stdcall InitializeSecurityDescriptor(ptr long)
+ @ stdcall InitializeSid(ptr ptr long)
+ @ stdcall InitiateSystemShutdownA(str str long long long)
+ @ stub InitiateSystemShutdownExA #(str str long long long long)
+ @ stdcall InitiateSystemShutdownExW(wstr wstr long long long long)
+ @ stdcall InitiateSystemShutdownW(str str long long long)
+ @ stub InstallApplication
+ @ stub IsProcessRestricted
+ @ stub IsTextUnicode #(ptr long ptr)
+ @ stdcall IsTokenRestricted(long)
+ @ stub IsTokenUntrusted
+ @ stdcall IsValidAcl(ptr)
+ @ stdcall IsValidSecurityDescriptor(ptr)
+ @ stdcall IsValidSid(ptr)
+ @ stdcall IsWellKnownSid(ptr long)
+ @ stdcall LockServiceDatabase(ptr)
+ @ stdcall LogonUserA(str str str long long ptr)
+ @ stub LogonUserExA
+ @ stub LogonUserExW
+ @ stdcall LogonUserW(wstr wstr wstr long long ptr)
+ @ stdcall LookupAccountNameA(str str ptr ptr ptr ptr ptr)
+ @ stdcall LookupAccountNameW(wstr wstr ptr ptr ptr ptr ptr)
+ @ stdcall LookupAccountSidA(ptr ptr ptr ptr ptr ptr ptr)
+ @ stdcall LookupAccountSidW(ptr ptr ptr ptr ptr ptr ptr)
+ @ stdcall LookupPrivilegeDisplayNameA(str str str ptr ptr)
+ @ stdcall LookupPrivilegeDisplayNameW(wstr wstr wstr ptr ptr)
+ @ stdcall LookupPrivilegeNameA(str ptr ptr long)
+ @ stdcall LookupPrivilegeNameW(wstr ptr ptr long)
+ @ stdcall LookupPrivilegeValueA(ptr ptr ptr)
+ @ stdcall LookupPrivilegeValueW(ptr ptr ptr)
+ @ stub LookupSecurityDescriptorPartsA
+ @ stub LookupSecurityDescriptorPartsW
+ @ stdcall LsaAddAccountRights(ptr ptr ptr long)
+ @ stub LsaAddPrivilegesToAccount
+ @ stub LsaClearAuditLog
+ @ stdcall LsaClose(ptr)
+ @ stub LsaCreateAccount
+ @ stub LsaCreateSecret
+ @ stub LsaCreateTrustedDomain
+ @ stdcall LsaCreateTrustedDomainEx(ptr ptr ptr long ptr)
+ @ stub LsaDelete
+ @ stdcall LsaDeleteTrustedDomain(ptr ptr)
+ @ stdcall LsaEnumerateAccountRights(ptr ptr ptr ptr)
+ @ stub LsaEnumerateAccounts
+ @ stdcall LsaEnumerateAccountsWithUserRight(ptr ptr ptr ptr)
+ @ stub LsaEnumeratePrivileges
+ @ stub LsaEnumeratePrivilegesOfAccount
+ @ stdcall LsaEnumerateTrustedDomains(ptr ptr ptr long ptr)
+ @ stdcall LsaEnumerateTrustedDomainsEx(ptr ptr ptr long ptr)
+ @ stdcall LsaFreeMemory(ptr)
+ @ stub LsaGetQuotasForAccount
+ @ stub LsaGetRemoteUserName
+ @ stub LsaGetSystemAccessAccount
+ @ stub LsaGetUserName
+ @ stub LsaICLookupNames
+ @ stub LsaICLookupNamesWithCreds
+ @ stub LsaICLookupSids
+ @ stub LsaICLookupSidsWithCreds
+ @ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
+ @ stdcall LsaLookupNames(long long ptr ptr ptr)
+ @ stub LsaLookupPrivilegeDisplayName
+ @ stub LsaLookupPrivilegeName
+ @ stub LsaLookupPrivilegeValue
+ @ stdcall LsaLookupSids(ptr long ptr ptr ptr)
+ @ stdcall LsaNtStatusToWinError(long)
+ @ stub LsaOpenAccount
+ @ stdcall LsaOpenPolicy(long long long long)
+ @ stub LsaOpenPolicySce
+ @ stub LsaOpenSecret
+ @ stub LsaOpenTrustedDomain
+ @ stdcall LsaOpenTrustedDomainByName(ptr ptr long ptr)
+ @ stub LsaQueryDomainInformationPolicy
+ @ stub LsaQueryForestTrustInformation
+ @ stub LsaQueryInfoTrustedDomain
+ @ stdcall LsaQueryInformationPolicy(ptr long ptr)
+ @ stub LsaQuerySecret
+ @ stub LsaQuerySecurityObject
+ @ stdcall LsaQueryTrustedDomainInfo(ptr ptr long ptr)
+ @ stdcall LsaQueryTrustedDomainInfoByName(ptr ptr long ptr)
+ @ stub LsaRegisterPolicyChangeNotification #(long long)
+ @ stdcall LsaRemoveAccountRights(ptr ptr long ptr long)
+ @ stub LsaRemovePrivilegesFromAccount
+ @ stdcall LsaRetrievePrivateData(ptr ptr ptr)
+ @ stub LsaSetDomainInformationPolicy
+ @ stub LsaSetForestTrustInformation
+ @ stdcall LsaSetInformationPolicy(long long ptr)
+ @ stub LsaSetInformationTrustedDomain
+ @ stub LsaSetQuotasForAccount
+ @ stub LsaSetSecret
+ @ stub LsaSetSecurityObject
+ @ stub LsaSetSystemAccessAccount
+ @ stdcall LsaSetTrustedDomainInfoByName(ptr ptr long ptr)
+ @ stdcall LsaSetTrustedDomainInformation(ptr ptr long ptr)
+ @ stdcall LsaStorePrivateData(ptr ptr ptr)
+ @ stub LsaUnregisterPolicyChangeNotification #(long long)
+ @ stdcall MD4Final(ptr)
+ @ stdcall MD4Init(ptr)
+ @ stdcall MD4Update(ptr ptr long)
+ @ stdcall MD5Final(ptr)
+ @ stdcall MD5Init(ptr)
+ @ stdcall MD5Update(ptr ptr long)
+ @ stub MSChapSrvChangePassword2
+ @ stub MSChapSrvChangePassword
+ @ stub MakeAbsoluteSD2
+ @ stdcall MakeAbsoluteSD(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
+ @ stdcall MakeSelfRelativeSD(ptr ptr ptr)
+ @ stdcall MapGenericMask (ptr ptr) NTDLL.RtlMapGenericMask
+ @ stdcall NotifyBootConfigStatus(long)
+ @ stdcall NotifyChangeEventLog (long long)
+ @ stdcall ObjectCloseAuditAlarmA(str ptr long)
+ @ stdcall ObjectCloseAuditAlarmW(wstr ptr long)
+ @ stub ObjectDeleteAuditAlarmA
+ @ stdcall ObjectDeleteAuditAlarmW(wstr ptr long)
+ @ stdcall ObjectOpenAuditAlarmA(str ptr str str ptr long long long ptr long long ptr)
+ @ stdcall ObjectOpenAuditAlarmW(wstr ptr wstr wstr ptr long long long ptr long long ptr)
+ @ stdcall ObjectPrivilegeAuditAlarmA(str ptr long long ptr long)
+ @ stdcall ObjectPrivilegeAuditAlarmW(wstr ptr long long ptr long)
+ @ stdcall OpenBackupEventLogA (str str)
+ @ stdcall OpenBackupEventLogW (wstr wstr)
+ @ stub OpenEncryptedFileRawA
+ @ stub OpenEncryptedFileRawW
+ @ stdcall OpenEventLogA (str str)
+ @ stdcall OpenEventLogW (wstr wstr)
+ @ stdcall OpenProcessToken(long long ptr)
+ @ stdcall OpenSCManagerA(str str long)
+ @ stdcall OpenSCManagerW(wstr wstr long)
+ @ stdcall OpenServiceA(long str long)
+ @ stdcall OpenServiceW(long wstr long)
+ @ stdcall OpenThreadToken(long long long ptr)
+ @ stub OpenTraceA
+ @ stub OpenTraceW
+ @ stdcall PrivilegeCheck(ptr ptr ptr)
+ @ stdcall PrivilegedServiceAuditAlarmA(str str long ptr long)
+ @ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long)
+ @ stub ProcessIdleTasks
+ @ stub ProcessTrace
+ @ stub QueryAllTracesA
+ @ stub QueryAllTracesW
+ @ stub QueryRecoveryAgentsOnEncryptedFile
+ @ stdcall QuerySecurityAccessMask(long ptr)
+ @ stdcall QueryServiceConfig2A(long long ptr long ptr)
+ @ stdcall QueryServiceConfig2W(long long ptr long ptr)
+ @ stdcall QueryServiceConfigA(long ptr long ptr)
+ @ stdcall QueryServiceConfigW(long ptr long ptr)
+ @ stdcall QueryServiceLockStatusA(long ptr long ptr)
+ @ stdcall QueryServiceLockStatusW(long ptr long ptr)
+ @ stdcall QueryServiceObjectSecurity(long long ptr long ptr)
+ @ stdcall QueryServiceStatus(long ptr)
+ @ stdcall QueryServiceStatusEx (long long ptr long ptr)
+ @ stub QueryTraceA
+ @ stub QueryTraceW
+ @ stub QueryUsersOnEncryptedFile
+ @ stub QueryWindows31FilesMigration #(long)
+ @ stub ReadEncryptedFileRaw
+ @ stdcall ReadEventLogA (long long long ptr long ptr ptr)
+ @ stdcall ReadEventLogW (long long long ptr long ptr ptr)
+ @ stdcall RegCloseKey(long)
+ @ stdcall RegConnectRegistryA(str long ptr)
+ @ stdcall RegConnectRegistryW(wstr long ptr)
+ @ stdcall RegCopyTreeA(ptr str ptr)
+ @ stdcall RegCopyTreeW(ptr wstr ptr)
+ @ stdcall RegCreateKeyA(long str ptr)
+ @ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr)
+ @ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr)
+ @ stdcall RegCreateKeyW(long wstr ptr)
+ @ stdcall RegDeleteKeyA(long str)
+ @ stdcall RegDeleteKeyW(long wstr)
+ @ stdcall RegDeleteTreeA(long str)
+ @ stdcall RegDeleteTreeW(long wstr)
+ @ stdcall RegDeleteValueA(long str)
+ @ stdcall RegDeleteValueW(long wstr)
+ @ stdcall RegDisablePredefinedCache()
+ @ stdcall RegEnumKeyA(long long ptr long)
+ @ stdcall RegEnumKeyExA(long long ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegEnumKeyExW(long long ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegEnumKeyW(long long ptr long)
+ @ stdcall RegEnumValueA(long long ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegEnumValueW(long long ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegFlushKey(long)
+ @ stdcall RegGetKeySecurity(long long ptr ptr)
+ @ stdcall RegGetValueA(long str str long ptr ptr ptr)
+ @ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr)
+ @ stdcall RegLoadKeyA(long str str)
+ @ stdcall RegLoadKeyW(long wstr wstr)
+ @ stdcall RegLoadMUIStringA(long str str long ptr long str)
+ @ stdcall RegLoadMUIStringW(long wstr wstr long ptr long wstr)
+ @ stdcall RegNotifyChangeKeyValue(long long long long long)
+ @ stdcall RegOpenCurrentUser(long ptr)
+ @ stdcall RegOpenKeyA(long str ptr)
+ @ stdcall RegOpenKeyExA(long str long long ptr)
+ @ stdcall RegOpenKeyExW(long wstr long long ptr)
+ @ stdcall RegOpenKeyW(long wstr ptr)
+ @ stdcall RegOpenUserClassesRoot(ptr long long ptr)
+ @ stdcall RegOverridePredefKey(long long)
+ @ stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
+ @ stdcall RegQueryMultipleValuesA(long ptr long ptr ptr)
+ @ stdcall RegQueryMultipleValuesW(long ptr long ptr ptr)
+ @ stdcall RegQueryValueA(long str ptr ptr)
+ @ stdcall RegQueryValueExA(long str ptr ptr ptr ptr)
+ @ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr)
+ @ stdcall RegQueryValueW(long wstr ptr ptr)
+ @ stub RegRemapPreDefKey
+ @ stdcall RegReplaceKeyA(long str str str)
+ @ stdcall RegReplaceKeyW(long wstr wstr wstr)
+ @ stdcall RegRestoreKeyA(long str long)
+ @ stdcall RegRestoreKeyW(long wstr long)
+ @ stdcall RegSaveKeyA(long ptr ptr)
+ @ stub RegSaveKeyExA
+ @ stub RegSaveKeyExW
+ @ stdcall RegSaveKeyW(long ptr ptr)
+ @ stdcall RegSetKeySecurity(long long ptr)
+ @ stdcall RegSetValueA(long str long ptr long)
+ @ stdcall RegSetValueExA(long str long long ptr long)
+ @ stdcall RegSetValueExW(long wstr long long ptr long)
+ @ stdcall RegSetValueW(long wstr long ptr long)
+ @ stdcall RegUnLoadKeyA(long str)
+ @ stdcall RegUnLoadKeyW(long wstr)
+ @ stdcall RegisterEventSourceA(ptr ptr)
+ @ stdcall RegisterEventSourceW(ptr ptr)
+ @ stub RegisterIdleTask
+ @ stdcall RegisterServiceCtrlHandlerA(str ptr)
+ @ stdcall RegisterServiceCtrlHandlerExA(str ptr ptr)
+ @ stdcall RegisterServiceCtrlHandlerExW(wstr ptr ptr)
+ @ stdcall RegisterServiceCtrlHandlerW(wstr ptr)
+ @ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr)
+ @ stdcall RegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr)
+ @ stub RemoveTraceCallback
+ @ stub RemoveUsersFromEncryptedFile
+ @ stdcall ReportEventA (long long long long ptr long long str ptr)
+ @ stdcall ReportEventW (long long long long ptr long long wstr ptr)
+ @ stdcall RevertToSelf()
+ @ stub SaferCloseLevel
+ @ stub SaferComputeTokenFromLevel
+ @ stub SaferCreateLevel
+ @ stub SaferGetLevelInformation
+ @ stub SaferGetPolicyInformation
+ @ stub SaferIdentifyLevel
+ @ stub SaferRecordEventLogEntry
+ @ stub SaferSetLevelInformation
+ @ stub SaferSetPolicyInformation
+ @ stub SaferiChangeRegistryScope
+ @ stub SaferiCompareTokenLevels
+ @ stub SaferiIsExecutableFileType
+ @ stub SaferiPopulateDefaultsInRegistry
+ @ stub SaferiRecordEventLogEntry
+ @ stub SaferiReplaceProcessThreadTokens
+ @ stub SaferiSearchMatchingHashRules
+ @ stdcall SetAclInformation(ptr ptr long long)
+ @ stub SetEntriesInAccessListA
+ @ stub SetEntriesInAccessListW
+ @ stdcall SetEntriesInAclA(long ptr ptr ptr)
+ @ stdcall SetEntriesInAclW(long ptr ptr ptr)
+ @ stub SetEntriesInAuditListA
+ @ stub SetEntriesInAuditListW
+ @ stdcall SetFileSecurityA(str long ptr )
+ @ stdcall SetFileSecurityW(wstr long ptr)
+ @ stub SetInformationCodeAuthzLevelW
+ @ stub SetInformationCodeAuthzPolicyW
+ @ stdcall SetKernelObjectSecurity(long long ptr)
+ @ stdcall SetNamedSecurityInfoA(str long ptr ptr ptr ptr ptr)
+ @ stub SetNamedSecurityInfoExA
+ @ stub SetNamedSecurityInfoExW
+ @ stdcall SetNamedSecurityInfoW(wstr long ptr ptr ptr ptr ptr)
+ @ stdcall SetPrivateObjectSecurity(long ptr ptr ptr long)
+ @ stub SetPrivateObjectSecurityEx
+ @ stdcall SetSecurityAccessMask(long ptr)
+ @ stdcall SetSecurityDescriptorControl(ptr long long)
+ @ stdcall SetSecurityDescriptorDacl(ptr long ptr long)
+ @ stdcall SetSecurityDescriptorGroup (ptr ptr long)
+ @ stdcall SetSecurityDescriptorOwner (ptr ptr long)
+ @ stub SetSecurityDescriptorRMControl
+ @ stdcall SetSecurityDescriptorSacl(ptr long ptr long)
+ @ stdcall SetSecurityInfo (long long long ptr ptr ptr ptr)
+ @ stub SetSecurityInfoExA
+ @ stub SetSecurityInfoExW
+ @ stdcall SetServiceBits(long long long long)
+ @ stdcall SetServiceObjectSecurity(long long ptr)
+ @ stdcall SetServiceStatus(long long)
+ @ stdcall SetThreadToken (ptr ptr)
+ @ stdcall SetTokenInformation (long long ptr long)
+ @ stub SetTraceCallback
+ @ stub SetUserFileEncryptionKey
+ @ stdcall StartServiceA(long long ptr)
+ @ stdcall StartServiceCtrlDispatcherA(ptr)
+ @ stdcall StartServiceCtrlDispatcherW(ptr)
+ @ stdcall StartServiceW(long long ptr)
+ @ stub StartTraceA
+ @ stub StartTraceW
+ @ stub StopTraceA
+ @ stub StopTraceW
+ @ stub SynchronizeWindows31FilesAndWindowsNTRegistry #(long long long long)
+ @ stdcall SystemFunction001(ptr ptr ptr)
+ @ stdcall SystemFunction002(ptr ptr ptr)
+ @ stdcall SystemFunction003(ptr ptr)
+ @ stdcall SystemFunction004(ptr ptr ptr)
+ @ stdcall SystemFunction005(ptr ptr ptr)
+ @ stdcall SystemFunction006(ptr ptr)
+ @ stdcall SystemFunction007(ptr ptr)
+ @ stdcall SystemFunction008(ptr ptr ptr)
+ @ stdcall SystemFunction009(ptr ptr ptr)
+ @ stdcall SystemFunction010(ptr ptr ptr)
+ @ stdcall SystemFunction011(ptr ptr ptr) SystemFunction010
+ @ stdcall SystemFunction012(ptr ptr ptr)
+ @ stdcall SystemFunction013(ptr ptr ptr)
+ @ stdcall SystemFunction014(ptr ptr ptr) SystemFunction012
+ @ stdcall SystemFunction015(ptr ptr ptr) SystemFunction013
+ @ stdcall SystemFunction016(ptr ptr ptr) SystemFunction012
+ @ stdcall SystemFunction017(ptr ptr ptr) SystemFunction013
+ @ stdcall SystemFunction018(ptr ptr ptr) SystemFunction012
+ @ stdcall SystemFunction019(ptr ptr ptr) SystemFunction013
+ @ stdcall SystemFunction020(ptr ptr ptr) SystemFunction012
+ @ stdcall SystemFunction021(ptr ptr ptr) SystemFunction013
+ @ stdcall SystemFunction022(ptr ptr ptr) SystemFunction012
+ @ stdcall SystemFunction023(ptr ptr ptr) SystemFunction013
+ @ stdcall SystemFunction024(ptr ptr ptr)
+ @ stdcall SystemFunction025(ptr ptr ptr)
+ @ stdcall SystemFunction026(ptr ptr ptr) SystemFunction024
+ @ stdcall SystemFunction027(ptr ptr ptr) SystemFunction025
+ @ stub SystemFunction028
+ @ stub SystemFunction029
+ @ stdcall SystemFunction030(ptr ptr)
+ @ stdcall SystemFunction031(ptr ptr) SystemFunction030
+ @ stdcall SystemFunction032(ptr ptr)
+ @ stub SystemFunction033
+ @ stub SystemFunction034
+ @ stdcall SystemFunction035(str)
+ @ stdcall SystemFunction036(ptr long) # RtlGenRandom
+ @ stdcall SystemFunction040(ptr long long) # RtlEncryptMemory
+ @ stdcall SystemFunction041(ptr long long) # RtlDecryptMemory
+ @ stub TraceEvent
+ @ stub TraceEventInstance
+ @ stub TraceMessage
+ @ stub TraceMessageVa
+ @ stub TreeResetNamedSecurityInfoA
+ @ stub TreeResetNamedSecurityInfoW
+ @ stub TrusteeAccessToObjectA
+ @ stub TrusteeAccessToObjectW
+ @ stub UninstallApplication
+ @ stdcall UnlockServiceDatabase (ptr)
+ @ stub UnregisterIdleTask
+ @ stub UnregisterTraceGuids
+ @ stub UpdateTraceA
+ @ stub UpdateTraceW
+ @ stub WdmWmiServiceMain
+ @ stub WmiCloseBlock
+ @ stub WmiCloseTraceWithCursor
+ @ stub WmiConvertTimestamp
+ @ stub WmiDevInstToInstanceNameA
+ @ stub WmiDevInstToInstanceNameW
+ @ stub WmiEnumerateGuids
+ @ stub WmiExecuteMethodA
+ @ stub WmiExecuteMethodW
+ @ stub WmiFileHandleToInstanceNameA
+ @ stub WmiFileHandleToInstanceNameW
+ @ stub WmiFreeBuffer
+ @ stub WmiGetFirstTraceOffset
+ @ stub WmiGetNextEvent
+ @ stub WmiGetTraceHeader
+ @ stub WmiMofEnumerateResourcesA
+ @ stub WmiMofEnumerateResourcesW
+ @ stub WmiNotificationRegistrationA
+ @ stub WmiNotificationRegistrationW
+ @ stub WmiOpenBlock
+ @ stub WmiOpenTraceWithCursor
+ @ stub WmiParseTraceEvent
+ @ stub WmiQueryAllDataA
+ @ stub WmiQueryAllDataMultipleA
+ @ stub WmiQueryAllDataMultipleW
+ @ stub WmiQueryAllDataW
+ @ stub WmiQueryGuidInformation
+ @ stub WmiQuerySingleInstanceA
+ @ stub WmiQuerySingleInstanceMultipleA
+ @ stub WmiQuerySingleInstanceMultipleW
+ @ stub WmiQuerySingleInstanceW
+ @ stub WmiReceiveNotificationsA
+ @ stub WmiReceiveNotificationsW
+ @ stub WmiSetSingleInstanceA
+ @ stub WmiSetSingleInstanceW
+ @ stub WmiSetSingleItemA
+ @ stub WmiSetSingleItemW
+ @ stub Wow64Win32ApiEntry
+ @ stub WriteEncryptedFileRaw
NtClose(Handle); \
}
#define IsPredefKey(HKey) \
- (((ULONG)(HKey) & 0xF0000000) == 0x80000000)
+ (((ULONG_PTR)(HKey) & 0xF0000000) == 0x80000000)
#define GetPredefKeyIndex(HKey) \
- ((ULONG)(HKey) & 0x0FFFFFFF)
+ ((ULONG_PTR)(HKey) & 0x0FFFFFFF)
static NTSTATUS OpenClassesRootKey(PHANDLE KeyHandle);
static NTSTATUS OpenLocalMachineKey (PHANDLE KeyHandle);
LSAHandleBind();
return LsarClose(LSABindingHandle,
- (unsigned long)ObjectHandle);
+ (ULONG_PTR)ObjectHandle);
}
HandleBind();
dwError = RChangeServiceConfig2A(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ (SC_RPC_HANDLE)(ULONG_PTR)hService,
Info);
if (dwError != ERROR_SUCCESS)
{
TRACE("Size: %lu\n", ControlPacket->dwSize);
TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
- lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+ lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
if (lpService == NULL)
{
TRACE("Service not found\n");
TRACE("Size: %lu\n", ControlPacket->dwSize);
TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
- lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+ lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
if (lpService == NULL)
{
TRACE("Service not found\n");
CLIENT_ID ClientId;
/* If we don't have a PID, look it up */
- if (dwProcessId == -1) dwProcessId = (DWORD)CsrGetProcessId();
+ if (dwProcessId == -1) dwProcessId = (ULONG_PTR)CsrGetProcessId();
/* Open a handle to the process */
ClientId.UniqueThread = NULL;
- ClientId.UniqueProcess = (HANDLE)dwProcessId;
+ ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)dwProcessId;
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtOpenProcess(&Handle,
PROCESS_ALL_ACCESS,
pc->Ebp, pc->Esi, pc->Esp);
DbgPrint("EDI: %.8x EFLAGS: %.8x\n", pc->Edi, pc->EFlags);
}
+#elif defined(_M_AMD64)
+_dump_context(PCONTEXT pc)
+{
+ DbgPrint("CS:EIP %x:%I64x\n", pc->SegCs&0xffff, pc->Rip );
+ DbgPrint("DS %x ES %x FS %x GS %x\n", pc->SegDs&0xffff, pc->SegEs&0xffff,
+ pc->SegFs&0xffff, pc->SegGs&0xfff);
+ DbgPrint("RAX: %I64x RBX: %I64x RCX: %I64x RDI: %I64x\n", pc->Rax, pc->Rbx, pc->Rcx, pc->Rdi);
+ DbgPrint("RDX: %I64x RBP: %I64x RSI: %I64x RSP: %I64x\n", pc->Rdx, pc->Rbp, pc->Rsi, pc->Rsp);
+ DbgPrint("R8: %I64x R9: %I64x R10: %I64x R11: %I64x\n", pc->R8, pc->R9, pc->R10, pc->R11);
+ DbgPrint("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12, pc->R13, pc->R14, pc->R15);
+ DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
+}
#else
#warning Unknown architecture
static VOID
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
{
-#ifdef _X86_
+#ifdef __i386__
PULONG Frame;
#endif
PVOID StartAddr;
ExceptionInfo->ExceptionRecord->ExceptionAddress,
_module_name_from_addr(ExceptionInfo->ExceptionRecord->ExceptionAddress, &StartAddr, szMod, sizeof(szMod)));
_dump_context ( ExceptionInfo->ContextRecord );
-#ifdef _X86_
+#ifdef __i386__
DbgPrint("Frames:\n");
_SEH_TRY
{
DWORD NumberOfBytesRead;
if ( !ReadFile(
- (HANDLE) hFile,
+ (HANDLE)(ULONG_PTR) hFile,
(LPVOID) lpBuffer,
(DWORD) lBytes,
& NumberOfBytesRead,
*lpNumberOfBytesWritten = 0;
}
- if (IsConsoleHandle(hFile))
+ if (IsConsoleHandle((ULONG_PTR)hFile))
{
return WriteConsoleA(hFile,
lpBuffer,
+++ /dev/null
-;
-; kernel32.def
-;
-; Exports for KERNEL32 DLL
-;
-; Copyright (C) 1996 Free Software Foundation, Inc.
-;
-; Author: Scott Christley <scottc@net-community.com>
-; Date: 1996
-;
-; This file is part of the Windows32 API Library.
-;
-; This library is free software; you can redistribute it and/or
-; modify it under the terms of the GNU Library General Public
-; License as published by the Free Software Foundation; either
-; version 2 of the License, or (at your option) any later version.
-;
-; This library 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
-; Library General Public License for more details.
-;
-; If you are interested in a warranty or support for this source code,
-; contact Scott Christley <scottc@net-community.com> for more information.
-;
-; You should have received a copy of the GNU Library General Public
-; License along with this library; see the file COPYING.LIB.
-; If not, write to the Free Software Foundation,
-; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-;
-LIBRARY KERNEL32.DLL
-EXPORTS
-AcquireSRWLockExclusive@4=NTDLL.RtlAcquireSRWLockExclusive
-AcquireSRWLockShared@4=NTDLL.RtlAcquireSRWLockShared
-ActivateActCtx@8
-AddAtomA@4
-AddAtomW@4
-AddConsoleAliasA@12
-AddConsoleAliasW@12
-;AddLocalAlternateComputerNameA
-;AddLocalAlternateComputerNameW
-AddRefActCtx@4
-AddVectoredExceptionHandler@8=NTDLL.RtlAddVectoredExceptionHandler
-AllocateUserPhysicalPages@12
-AllocConsole@0
-AreFileApisANSI@0
-AssignProcessToJobObject@8
-AttachConsole@4
-BackupRead@28
-BackupSeek@24
-BackupWrite@28
-BaseAttachCompleteThunk@0
-BaseCheckAppcompatCache@16
-;BaseCleanupAppcompatCache
-;BaseCleanupAppcompatCacheSupport
-BaseDumpAppcompatCache@0
-BaseFlushAppcompatCache@0
-;BaseInitAppcompatCache
-;BaseInitAppcompatCacheSupport
-BaseProcessInitPostImport@0
-BaseQueryModuleData@20
-BaseUpdateAppcompatCache@12
-Beep@8
-BeginUpdateResourceA@8
-BeginUpdateResourceW@8
-BindIoCompletionCallback@12
-BuildCommDCBA@8
-BuildCommDCBAndTimeoutsA@12
-BuildCommDCBAndTimeoutsW@12
-BuildCommDCBW@8
-CallNamedPipeA@28
-CallNamedPipeW@28
-CancelDeviceWakeupRequest@4
-CancelIo@4
-CancelIoEx@8
-CancelSynchronousIo@4
-CancelTimerQueueTimer@8
-CancelWaitableTimer@4
-ChangeTimerQueueTimer@16
-CheckNameLegalDOS8Dot3A@20
-CheckNameLegalDOS8Dot3W@20
-CheckRemoteDebuggerPresent@8
-ClearCommBreak@4
-ClearCommError@12
-CloseConsoleHandle@4
-CloseHandle@4
-CloseProfileUserMapping@0
-CmdBatNotification@4
-CommConfigDialogA@12
-CommConfigDialogW@12
-CompareFileTime@8
-CompareStringA@24
-CompareStringW@24
-ConnectNamedPipe@8
-ConsoleMenuControl@12
-ContinueDebugEvent@12
-ConvertDefaultLocale@4
-ConvertFiberToThread@0
-ConvertThreadToFiber@4
-CopyFileA@12
-CopyFileExA@24
-CopyFileExW@24
-CopyFileW@12
-CopyLZFile@8
-CreateActCtxA@4
-CreateActCtxW@4
-CreateConsoleScreenBuffer@20
-CreateDirectoryA@8
-CreateDirectoryExA@12
-CreateDirectoryExW@12
-CreateDirectoryW@8
-CreateEventA@16
-CreateEventW@16
-CreateEventExA@16
-CreateEventExW@16
-CreateFiber@12
-CreateFiberEx@20
-CreateFileA@28
-CreateFileMappingA@24
-CreateFileMappingW@24
-CreateFileW@28
-CreateHardLinkA@12
-CreateHardLinkW@12
-CreateIoCompletionPort@16
-CreateJobObjectA@8
-CreateJobObjectW@8
-CreateJobSet@12
-CreateMailslotA@16
-CreateMailslotW@16
-CreateMemoryResourceNotification@4
-CreateMutexA@12
-CreateMutexW@12
-CreateMutexExA@16
-CreateMutexExW@16
-CreateNamedPipeA@32
-CreateNamedPipeW@32
-CreateNlsSecurityDescriptor@12
-CreatePipe@16
-CreateProcessA@40
-CreateProcessInternalA@48
-CreateProcessInternalW@48
-CreateProcessW@40
-CreateRemoteThread@28
-CreateSemaphoreA@16
-CreateSemaphoreW@16
-CreateSemaphoreExA@24
-CreateSemaphoreExW@24
-CreateSocketHandle@0
-CreateSymbolicLinkA@12
-CreateSymbolicLinkW@12
-CreateTapePartition@16
-CreateThread@24
-CreateTimerQueue@0
-CreateTimerQueueTimer@28
-CreateToolhelp32Snapshot@8
-CreateVirtualBuffer@12
-CreateWaitableTimerA@12
-CreateWaitableTimerW@12
-CreateWaitableTimerExA@16
-CreateWaitableTimerExW@16
-DeactivateActCtx@8
-DebugActiveProcess@4
-DebugActiveProcessStop@4
-DebugBreak@0=NTDLL.DbgBreakPoint
-DebugBreakProcess@4
-DebugSetProcessKillOnExit@4
-DecodePointer@4=NTDLL.RtlDecodePointer
-DefineDosDeviceA@12
-DefineDosDeviceW@12
-DelayLoadFailureHook@8
-DeleteAtom@4
-DeleteCriticalSection@4=NTDLL.RtlDeleteCriticalSection
-DeleteFiber@4
-DeleteFileA@4
-DeleteFileW@4
-DeleteTimerQueue@4
-DeleteTimerQueueEx@8
-DeleteTimerQueueTimer@12
-DeleteVolumeMountPointA@4
-DeleteVolumeMountPointW@4
-DeviceIoControl@32
-DisableThreadLibraryCalls@4
-DisconnectNamedPipe@4
-DnsHostnameToComputerNameA@12
-DnsHostnameToComputerNameW@12
-DosDateTimeToFileTime@12
-DosPathToSessionPathA@12
-DosPathToSessionPathW@12
-DuplicateConsoleHandle@16
-DuplicateHandle@28
-EncodePointer@4=NTDLL.RtlEncodePointer
-EndUpdateResourceA@8
-EndUpdateResourceW@8
-EnterCriticalSection@4=NTDLL.RtlEnterCriticalSection
-EnumCalendarInfoA@16
-EnumCalendarInfoExA@16
-EnumCalendarInfoExW@16
-EnumCalendarInfoW@16
-EnumDateFormatsA@12
-EnumDateFormatsExA@12
-EnumDateFormatsExW@12
-EnumDateFormatsW@12
-EnumLanguageGroupLocalesA@16
-EnumLanguageGroupLocalesW@16
-EnumResourceLanguagesA@20
-EnumResourceLanguagesW@20
-EnumResourceNamesA@16
-EnumResourceNamesW@16
-EnumResourceTypesA@12
-EnumResourceTypesW@12
-EnumSystemCodePagesA@8
-EnumSystemCodePagesW@8
-EnumSystemGeoID@12
-EnumSystemLanguageGroupsA@12
-EnumSystemLanguageGroupsW@12
-EnumSystemLocalesA@8
-EnumSystemLocalesW@8
-EnumTimeFormatsA@12
-EnumTimeFormatsW@12
-EnumUILanguagesA@12
-EnumUILanguagesW@12
-;EnumerateLocalComputerNamesA
-;EnumerateLocalComputerNamesW
-EraseTape@12
-EscapeCommFunction@8
-ExitProcess@4
-ExitThread@4
-ExitVDM@8
-ExpandEnvironmentStringsA@12
-ExpandEnvironmentStringsW@12
-ExpungeConsoleCommandHistoryA@4
-ExpungeConsoleCommandHistoryW@4
-ExtendVirtualBuffer@8
-FatalAppExitA@8
-FatalAppExitW@8
-FatalExit@4
-FileTimeToDosDateTime@12
-FileTimeToLocalFileTime@8
-FileTimeToSystemTime@8
-FillConsoleOutputAttribute@20
-FillConsoleOutputCharacterA@20
-FillConsoleOutputCharacterW@20
-FindActCtxSectionGuid@20
-FindActCtxSectionStringA@20
-FindActCtxSectionStringW@20
-FindAtomA@4
-FindAtomW@4
-FindClose@4
-FindCloseChangeNotification@4
-FindFirstChangeNotificationA@12
-FindFirstChangeNotificationW@12
-FindFirstFileA@8
-FindFirstFileExA@24
-FindFirstFileExW@24
-FindFirstFileW@8
-FindFirstStreamW@16
-FindNextChangeNotification@4
-FindNextFileA@8
-FindNextFileW@8
-FindNextStreamW@8
-FindFirstVolumeA@8
-FindFirstVolumeMountPointA@12
-FindFirstVolumeMountPointW@12
-FindFirstVolumeW@8
-FindNextVolumeA@12
-FindNextVolumeMountPointA@12
-FindNextVolumeMountPointW@12
-FindNextVolumeW@12
-FindResourceA@12
-FindResourceExA@16
-FindResourceExW@16
-FindResourceW@12
-FindVolumeClose@4
-FindVolumeMountPointClose@4
-;FlsAlloc@4 ;new for 2003
-;FlsFree@4 ;new for 2003
-;FlsGetValue@4 ;new for 2003
-;FlsSetValue@8 ;new for 2003
-FlushConsoleInputBuffer@4
-FlushFileBuffers@4
-FlushInstructionCache@12
-FlushViewOfFile@8
-FoldStringA@20
-FoldStringW@20
-FormatMessageA@28
-FormatMessageW@28
-FreeConsole@0
-FreeEnvironmentStringsA@4
-FreeEnvironmentStringsW@4
-FreeLibrary@4
-FreeLibraryAndExitThread@8
-FreeResource@4
-FreeUserPhysicalPages@12
-FreeVirtualBuffer@4
-GenerateConsoleCtrlEvent@8
-GetACP@0
-GetApplicationRecoveryCallback@20
-GetApplicationRestart@16
-GetAtomNameA@12
-GetAtomNameW@12
-GetBinaryType@8=GetBinaryTypeA@8
-GetBinaryTypeA@8
-GetBinaryTypeW@8
-GetCPFileNameFromRegistry@12
-GetCPInfo@8
-GetCPInfoExA@12
-GetCPInfoExW@12
-GetCalendarInfoA@24
-GetCalendarInfoW@24
-GetCommConfig@12
-GetCommMask@8
-GetCommModemStatus@8
-GetCommProperties@8
-GetCommState@8
-GetCommTimeouts@8
-GetCommandLineA@0
-GetCommandLineW@0
-;GetComPlusPackageInstallStatus
-GetCompressedFileSizeA@8
-GetCompressedFileSizeW@8
-GetComputerNameA@8
-GetComputerNameExA@12
-GetComputerNameExW@12
-GetComputerNameW@8
-GetConsoleAliasA@16
-GetConsoleAliasExesA@8
-GetConsoleAliasExesLengthA@0
-GetConsoleAliasExesLengthW@0
-GetConsoleAliasExesW@8
-GetConsoleAliasW@16
-GetConsoleAliasesA@12
-GetConsoleAliasesLengthA@4
-GetConsoleAliasesLengthW@4
-GetConsoleAliasesW@12
-;GetConsoleCharType
-GetConsoleCP@0
-GetConsoleCommandHistoryA@12
-GetConsoleCommandHistoryLengthA@4
-GetConsoleCommandHistoryLengthW@4
-GetConsoleCommandHistoryW@12
-GetConsoleCursorInfo@8
-;GetConsoleCursorMode
-GetConsoleDisplayMode@4
-GetConsoleFontInfo@16
-GetConsoleFontSize@8
-GetConsoleHardwareState@12
-GetConsoleInputExeNameA@8
-GetConsoleInputExeNameW@8
-GetConsoleInputWaitHandle@0
-GetConsoleKeyboardLayoutNameA@4
-GetConsoleKeyboardLayoutNameW@4
-GetConsoleMode@8
-;GetConsoleNlsMode
-GetConsoleOutputCP@0
-GetConsoleProcessList@8
-GetConsoleScreenBufferInfo@8
-GetConsoleSelectionInfo@4
-GetConsoleTitleA@8
-GetConsoleTitleW@8
-GetConsoleWindow@0
-GetCurrencyFormatA@24
-GetCurrencyFormatW@24
-GetCurrentActCtx@4
-GetCurrentConsoleFont@12
-GetCurrentDirectoryA@8
-GetCurrentDirectoryW@8
-GetCurrentProcess@0
-GetCurrentProcessId@0
-GetCurrentThread@0
-GetCurrentThreadId@0
-GetDateFormatA@24
-GetDateFormatW@24
-GetDefaultCommConfigA@12
-GetDefaultCommConfigW@12
-;GetDefaultSortkeySize
-GetDevicePowerState@8
-GetDiskFreeSpaceA@20
-GetDiskFreeSpaceW@20
-GetDiskFreeSpaceExA@16
-GetDiskFreeSpaceExW@16
-GetDllDirectoryA@8
-GetDllDirectoryW@8
-GetDriveTypeA@4
-GetDriveTypeW@4
-GetEnvironmentStrings@0
-GetEnvironmentStringsA=GetEnvironmentStrings@0
-GetEnvironmentStringsW@0
-GetEnvironmentVariableA@12
-GetEnvironmentVariableW@12
-GetExitCodeProcess@8
-GetExitCodeThread@8
-GetExpandedNameA@8
-GetExpandedNameW@8
-GetFileAttributesA@4
-GetFileAttributesW@4
-GetFileAttributesByHandle@12
-GetFileAttributesExA@12
-GetFileAttributesExW@12
-GetFileBandwidthReservation@24
-GetFileInformationByHandle@8
-GetFileSize@8
-GetFileSizeEx@8
-GetFileTime@16
-GetFileType@4
-GetFinalPathNameByHandleA@16
-GetFinalPathNameByHandleW@16
-GetFirmwareEnvironmentVariableA@16
-GetFirmwareEnvironmentVariableW@16
-GetFullPathNameA@16
-GetFullPathNameW@16
-GetGeoInfoA@20
-GetGeoInfoW@20
-GetHandleContext@4
-GetHandleInformation@8
-GetLargePageMinimum@0
-GetLargestConsoleWindowSize@4
-GetLastError@0
-;GetLinguistLangSize
-GetLocalTime@4
-GetLocaleInfoA@16
-GetLocaleInfoW@16
-GetLocaleInfoEx@16
-GetLogicalDriveStringsA@8
-GetLogicalDriveStringsW@8
-GetLogicalDrives@0
-GetLongPathNameA@12
-GetLongPathNameW@12
-GetMailslotInfo@20
-GetModuleFileNameA@12
-GetModuleFileNameW@12
-GetModuleHandleA@4
-GetModuleHandleExA@12
-GetModuleHandleExW@12
-GetModuleHandleW@4
-GetNamedPipeHandleStateA@28
-GetNamedPipeHandleStateW@28
-GetNamedPipeInfo@20
-GetNativeSystemInfo@4
-GetNextVDMCommand@4
-GetNlsSectionName@24
-GetNumaHighestNodeNumber@4
-GetNumaNodeProcessorMask@8
-;GetNumaProcessorMap
-GetNumaProcessorNode@8
-GetNumberFormatA@24
-GetNumberFormatW@24
-GetNumberOfConsoleFonts@0
-GetNumberOfConsoleInputEvents@8
-GetNumberOfConsoleMouseButtons@4
-GetOEMCP@0
-GetOverlappedResult@16
-GetPriorityClass@4
-GetPrivateProfileIntA@16
-GetPrivateProfileIntW@16
-GetPrivateProfileSectionA@16
-GetPrivateProfileSectionNamesA@12
-GetPrivateProfileSectionNamesW@12
-GetPrivateProfileSectionW@16
-GetPrivateProfileStringA@24
-GetPrivateProfileStringW@24
-GetPrivateProfileStructA@20
-GetPrivateProfileStructW@20
-GetProcAddress@8
-GetProcessAffinityMask@12
-GetProcessHandleCount@8
-GetProcessHeap@0
-GetProcessHeaps@8
-GetProcessId@4
-GetProcessIdOfThread@4
-GetProcessIoCounters@8
-GetProcessPriorityBoost@8
-GetProcessShutdownParameters@8
-GetProcessTimes@20
-GetProcessVersion@4
-GetProcessWorkingSetSize@12
-GetProfileIntA@12
-GetProfileIntW@12
-GetProfileSectionA@12
-GetProfileSectionW@12
-GetProfileStringA@20
-GetProfileStringW@20
-GetQueuedCompletionStatus@20
-GetShortPathNameA@12
-GetShortPathNameW@12
-GetStartupInfoA@4
-GetStartupInfoW@4
-GetStdHandle@4
-GetStringTypeA@20
-GetStringTypeExA@20
-GetStringTypeExW@20
-GetStringTypeW@16
-GetSystemDefaultLCID@0
-GetSystemDefaultLangID@0
-GetSystemDefaultUILanguage@0
-GetSystemDirectoryA@8
-GetSystemDirectoryW@8
-GetSystemInfo@4
-GetSystemPowerStatus@4
-GetSystemRegistryQuota@8
-GetSystemTime@4
-GetSystemTimeAdjustment@12
-GetSystemTimeAsFileTime@4
-GetSystemTimes@12
-GetSystemWow64DirectoryA@8
-GetSystemWow64DirectoryW@8
-GetSystemWindowsDirectoryA@8
-GetSystemWindowsDirectoryW@8
-GetTapeParameters@16
-GetTapePosition@20
-GetTapeStatus@4
-GetTempFileNameA@16
-GetTempFileNameW@16
-GetTempPathA@8
-GetTempPathW@8
-GetThreadContext@8
-GetThreadId@4
-GetThreadIOPendingFlag@8
-GetThreadLocale@0
-GetThreadPriority@4
-GetThreadPriorityBoost@8
-GetThreadSelectorEntry@12
-GetThreadTimes@20
-GetTickCount@0
-GetTickCount64@0
-GetTimeFormatA@24
-GetTimeFormatW@24
-GetTimeZoneInformation@4
-GetUserDefaultLCID@0
-GetUserDefaultLangID@0
-GetUserDefaultUILanguage@0
-GetUserGeoID@4
-GetVDMCurrentDirectories@8
-GetVersion@0
-GetVersionExA@4
-GetVersionExW@4
-GetVolumeInformationA@32
-GetVolumeInformationW@32
-GetVolumeNameForVolumeMountPointA@12
-GetVolumeNameForVolumeMountPointW@12
-GetVolumePathNameA@12
-GetVolumePathNameW@12
-GetVolumePathNamesForVolumeNameA@16
-GetVolumePathNamesForVolumeNameW@16
-GetWindowsDirectoryA@8
-GetWindowsDirectoryW@8
-GetWriteWatch@24
-GlobalAddAtomA@4
-GlobalAddAtomW@4
-GlobalAlloc@8
-GlobalCompact@4
-GlobalDeleteAtom@4
-GlobalFindAtomA@4
-GlobalFindAtomW@4
-GlobalFix@4
-GlobalFlags@4
-GlobalFree@4
-GlobalGetAtomNameA@12
-GlobalGetAtomNameW@12
-GlobalHandle@4
-GlobalLock@4
-GlobalMemoryStatus@4
-GlobalMemoryStatusEx@4
-GlobalReAlloc@12
-GlobalSize@4
-GlobalUnWire@4
-GlobalUnfix@4
-GlobalUnlock@4
-GlobalWire@4
-Heap32First@12
-Heap32ListFirst@8
-Heap32ListNext@8
-Heap32Next@4
-HeapAlloc@12=NTDLL.RtlAllocateHeap
-HeapCompact@8
-HeapCreate@12
-HeapCreateTagsW@16
-HeapDestroy@4
-HeapExtend@16
-HeapFree@12=NTDLL.RtlFreeHeap
-HeapLock@4
-HeapQueryInformation@20
-HeapQueryTagW@20
-HeapReAlloc@16=NTDLL.RtlReAllocateHeap
-HeapSetInformation@16
-HeapSize@12=NTDLL.RtlSizeHeap
-HeapSummary@12
-HeapUnlock@4
-HeapUsage@20
-HeapValidate@12
-HeapWalk@8
-InitAtomTable@4
-InitializeConditionVariable@4=NTDLL.RtlInitializeConditionVariable
-InitializeCriticalSection@4
-InitializeCriticalSectionAndSpinCount@8
-InitializeSListHead@4=NTDLL.RtlInitializeSListHead
-InitializeSRWLock@4=NTDLL.RtlInitializeSRWLock
-InterlockedCompareExchange@12
-InterlockedDecrement@4
-InterlockedExchange@8
-InterlockedExchangeAdd@8
-InterlockedFlushSList@4=NTDLL.RtlInterlockedFlushSList
-InterlockedIncrement@4
-InterlockedPopEntrySList@4=NTDLL.RtlInterlockedPopEntrySList
-InterlockedPushEntrySList@8=NTDLL.RtlInterlockedPushEntrySList
-InvalidateConsoleDIBits@8
-IsBadCodePtr@4
-IsBadHugeReadPtr@8
-IsBadHugeWritePtr@8
-IsBadReadPtr@8
-IsBadStringPtrA@8
-IsBadStringPtrW@8
-IsBadWritePtr@8
-IsDBCSLeadByte@4
-IsDBCSLeadByteEx@8
-IsDebuggerPresent@0
-IsProcessInJob@12
-IsProcessorFeaturePresent@4
-IsSystemResumeAutomatic@0
-IsThreadAFiber@0
-IsValidCodePage@4
-IsValidLanguageGroup@8
-IsValidLocale@8
-IsValidUILanguage@4
-IsWow64Process@8
-LCMapStringA@24
-LCMapStringW@24
-LeaveCriticalSection@4=NTDLL.RtlLeaveCriticalSection
-LoadLibraryA@4
-LoadLibraryExA@12
-LoadLibraryExW@12
-LoadLibraryW@4
-LoadModule@8
-LoadResource@8
-LocalAlloc@8
-LocalCompact@4
-LocalFileTimeToFileTime@8
-LocalFlags@4
-LocalFree@4
-LocalHandle@4
-LocalLock@4
-LocalReAlloc@12
-LocalShrink@8
-LocalSize@4
-LocalUnlock@4
-LockFile@20
-LockFileEx@24
-LockResource@4
-LZClose@4
-;LZCloseFile
-LZCopy@8
-;LZCreateFileW
-LZDone@0
-LZInit@4
-LZOpenFileA@12
-LZOpenFileW@12
-LZRead@12
-LZSeek@12
-LZStart@0
-MapUserPhysicalPages@12
-MapUserPhysicalPagesScatter@12
-MapViewOfFile@20
-MapViewOfFileEx@24
-Module32First@8
-Module32FirstW@8
-Module32Next@8
-Module32NextW@8
-MoveFileA@8
-MoveFileExA@12
-MoveFileWithProgressA@20
-MoveFileExW@12
-MoveFileW@8
-MoveFileWithProgressW@20
-MulDiv@12
-MultiByteToWideChar@24
-NeedCurrentDirectoryForExePathA@4
-NeedCurrentDirectoryForExePathW@4
-NlsConvertIntegerToString@20
-NlsGetCacheUpdateCount@0
-;NlsResetProcessLocale
-;NumaVirtualQueryNode
-OpenConsoleW@16
-;OpenDataFile
-OpenEventA@12
-OpenEventW@12
-OpenFile@12
-OpenFileById@24
-OpenFileMappingA@12
-OpenFileMappingW@12
-OpenJobObjectA@12
-OpenJobObjectW@12
-OpenMutexA@12
-OpenMutexW@12
-OpenProcess@12
-;OpenProfileUserMapping@0
-OpenSemaphoreA@12
-OpenSemaphoreW@12
-OpenThread@12
-OpenWaitableTimerA@12
-OpenWaitableTimerW@12
-OutputDebugStringA@4
-OutputDebugStringW@4
-PeekConsoleInputA@16
-PeekConsoleInputW@16
-PeekNamedPipe@24
-PrivCopyFileExW@24
-;PrivMoveFileIdentityW
-PostQueuedCompletionStatus@16
-PrepareTape@12
-ProcessIdToSessionId@8
-Process32First@8
-Process32FirstW@8
-Process32Next@8
-Process32NextW@8
-PulseEvent@4
-PurgeComm@8
-QueryActCtxW@28
-QueryDepthSList@4=NTDLL.RtlQueryDepthSList
-QueryDosDeviceA@12
-QueryDosDeviceW@12
-QueryInformationJobObject@20
-QueryMemoryResourceNotification@8
-QueryPerformanceCounter@4
-QueryPerformanceFrequency@4
-QueueUserAPC@12
-QueueUserWorkItem@12
-QueryWin31IniFilesMappedToRegistry@16
-RaiseException@16
-ReadConsoleA@20
-ReadConsoleInputA@16
-;ReadConsoleInputExA
-;ReadConsoleInputExW
-ReadConsoleInputW@16
-ReadConsoleOutputA@20
-ReadConsoleOutputAttribute@20
-ReadConsoleOutputCharacterA@20
-ReadConsoleOutputCharacterW@20
-ReadConsoleOutputW@20
-ReadConsoleW@20
-ReadDirectoryChangesW@32
-ReadFile@20
-ReadFileEx@20
-ReadFileScatter@20
-ReadProcessMemory@20
-RecoveryFinished@4
-RecoveryInProgress@4
-RegisterApplicationRecoveryCallback@16
-RegisterApplicationRestart@8
-;RegisterConsoleIME
-;RegisterConsoleOS2
-RegisterConsoleVDM@44
-RegisterWaitForInputIdle@4
-RegisterWaitForSingleObject@24
-RegisterWaitForSingleObjectEx@20
-RegisterWowBaseHandlers@4
-RegisterWowExec@4
-ReleaseActCtx@4
-ReleaseMutex@4
-ReleaseSemaphore@12
-ReleaseSRWLockExclusive@4=NTDLL.RtlReleaseSRWLockExclusive
-ReleaseSRWLockShared@4=NTDLL.RtlReleaseSRWLockShared
-RemoveDirectoryA@4
-RemoveDirectoryW@4
-;RemoveLocalAlternateComputerNameA
-;RemoveLocalAlternateComputerNameW
-RemoveVectoredExceptionHandler@4=NTDLL.RtlRemoveVectoredExceptionHandler
-ReplaceFile=ReplaceFileW@24
-ReplaceFileA@24
-ReplaceFileW@24
-RequestDeviceWakeup@4
-RequestWakeupLatency@4
-ResetEvent@4
-ResetWriteWatch@8
-RestoreLastError@4
-ResumeThread@4
-RtlCaptureContext@4=NTDLL.RtlCaptureContext
-;RtlCaptureStackBackTrace
-RtlFillMemory@12=NTDLL.RtlFillMemory
-RtlMoveMemory@12=NTDLL.RtlMoveMemory
-RtlUnwind@16=NTDLL.RtlUnwind
-RtlZeroMemory@8=NTDLL.RtlZeroMemory
-ScrollConsoleScreenBufferA@20
-ScrollConsoleScreenBufferW@20
-SearchPathA@24
-SearchPathW@24
-SetCPGlobal@4
-SetCalendarInfoA@16
-SetCalendarInfoW@16
-SetClientTimeZoneInformation@4
-;SetComPlusPackageInstallStatus
-SetCommBreak@4
-SetCommConfig@12
-SetCommMask@8
-SetCommState@8
-SetCommTimeouts@8
-SetComputerNameA@4
-SetComputerNameExA@8
-SetComputerNameExW@8
-SetComputerNameW@4
-SetConsoleActiveScreenBuffer@4
-SetConsoleCP@4
-SetConsoleCommandHistoryMode@4
-SetConsoleCtrlHandler@8
-SetConsoleCursor@8
-SetConsoleCursorInfo@8
-;SetConsoleCursorMode
-SetConsoleCursorPosition@8
-SetConsoleDisplayMode@12
-SetConsoleFont@8
-SetConsoleHardwareState@12
-SetConsoleHistoryInfo@4
-SetConsoleIcon@4
-SetConsoleInputExeNameA@4
-SetConsoleInputExeNameW@4
-SetConsoleKeyShortcuts@16
-;SetConsoleLocalEUDC
-SetConsoleMaximumWindowSize@8
-SetConsoleMenuClose@4
-SetConsoleMode@8
-;SetConsoleNlsMode
-SetConsoleNumberOfCommandsA@8
-SetConsoleNumberOfCommandsW@8
-;SetConsoleOS2OemFormat
-SetConsoleOutputCP@4
-SetConsolePalette@12
-SetConsoleScreenBufferInfoEx@8
-SetConsoleScreenBufferSize@8
-SetConsoleTextAttribute@8
-SetConsoleTitleA@4
-SetConsoleTitleW@4
-SetConsoleWindowInfo@12
-SetCriticalSectionSpinCount@8=NTDLL.RtlSetCriticalSectionSpinCount
-SetCurrentDirectoryA@4
-SetCurrentDirectoryW@4
-SetDefaultCommConfigA@12
-SetDefaultCommConfigW@12
-SetDllDirectoryA@4
-SetDllDirectoryW@4
-SetEndOfFile@4
-SetEnvironmentVariableA@8
-SetEnvironmentVariableW@8
-SetErrorMode@4
-SetEvent@4
-SetFileApisToANSI@0
-SetFileApisToOEM@0
-SetFileAttributesA@8
-SetFileAttributesW@8
-SetFileAttributesByHandle@12
-SetFileBandwidthReservation@24
-SetFileCompletionNotificationModes@8
-SetFilePointer@16
-SetFilePointerEx@20
-SetFileShortNameA@8
-SetFileShortNameW@8
-SetFileTime@16
-SetFileValidData@12
-SetFirmwareEnvironmentVariableA@16
-SetFirmwareEnvironmentVariableW@16
-SetHandleContext@8
-SetHandleCount@4
-SetHandleInformation@12
-SetInformationJobObject@16
-SetLastConsoleEventActive@0
-SetLastError@4
-;SetLocalPrimaryComputerNameA
-;SetLocalPrimaryComputerNameW
-SetLocalTime@4
-SetLocaleInfoA@12
-SetLocaleInfoW@12
-SetMailslotInfo@8
-SetMessageWaitingIndicator@8
-SetNamedPipeHandleState@16
-SetPriorityClass@8
-SetProcessAffinityMask@8
-SetProcessPriorityBoost@8
-SetProcessShutdownParameters@8
-SetProcessWorkingSetSize@12
-SetStdHandle@8
-SetSystemPowerState@8
-SetSystemTime@4
-SetSystemTimeAdjustment@8
-SetTapeParameters@12
-SetTapePosition@24
-;SetTermsrvAppInstallMode
-SetThreadAffinityMask@8
-SetThreadContext@8
-SetThreadExecutionState@4
-SetThreadIdealProcessor@8
-SetThreadLocale@4
-SetThreadPriority@8
-SetThreadPriorityBoost@8
-SetThreadUILanguage@4
-SetTimerQueueTimer@24
-SetTimeZoneInformation@4
-SetUnhandledExceptionFilter@4
-SetUserDefaultLCID@4
-SetUserDefaultUILanguage@4
-SetUserGeoID@4
-SetVDMCurrentDirectories@8
-SetVolumeLabelA@8
-SetVolumeLabelW@8
-SetVolumeMountPointA@8
-SetVolumeMountPointW@8
-SetWaitableTimer@24
-SetupComm@12
-ShowConsoleCursor@8
-SignalObjectAndWait@16
-SizeofResource@8
-Sleep@4
-SleepConditionVariableCS@12
-SleepConditionVariableSRW@16
-SleepEx@8
-SuspendThread@4
-SwitchToFiber@4
-SwitchToThread@0
-SystemTimeToFileTime@8
-SystemTimeToTzSpecificLocalTime@12
-TerminateJobObject@8
-TerminateProcess@8
-TerminateThread@8
-;TermsrvAppInstallMode
-Thread32First@8
-Thread32Next@8
-TlsAlloc@0
-TlsFree@4
-TlsGetValue@4
-TlsSetValue@8
-Toolhelp32ReadProcessMemory@20
-TransactNamedPipe@28
-TransmitCommChar@8
-TrimVirtualBuffer@4
-TryEnterCriticalSection@4=NTDLL.RtlTryEnterCriticalSection
-TzSpecificLocalTimeToSystemTime@12
-UnhandledExceptionFilter@4
-UnlockFile@20
-UnlockFileEx@20
-UnmapViewOfFile@4
-UpdateResourceA@24
-UpdateResourceW@24
-UTRegister@28
-UTUnRegister@4
-;UnregisterConsoleIME
-UnregisterWait@4
-UnregisterWaitEx@8
-;ValidateLCType
-;ValidateLocale
-VDMConsoleOperation@8
-VDMOperationStarted@4
-VerLanguageNameA@12
-VerLanguageNameW@12
-VerSetConditionMask@16=NTDLL.VerSetConditionMask
-VerifyConsoleIoHandle@4
-VerifyVersionInfoA@16
-VerifyVersionInfoW@16
-VirtualAlloc@16
-VirtualAllocEx@20
-VirtualBufferExceptionHandler@12
-VirtualFree@12
-VirtualFreeEx@16
-VirtualLock@8
-VirtualProtect@16
-VirtualProtectEx@20
-VirtualQuery@12
-VirtualQueryEx@16
-VirtualUnlock@8
-WakeAllConditionVariable@4=NTDLL.RtlWakeAllConditionVariable
-WakeConditionVariable@4=NTDLL.RtlWakeConditionVariable
-WaitCommEvent@12
-WaitForDebugEvent@8
-WaitForMultipleObjects@16
-WaitForMultipleObjectsEx@20
-WaitForSingleObject@8
-WaitForSingleObjectEx@12
-WaitNamedPipeA@8
-WaitNamedPipeW@8
-WideCharToMultiByte@32
-WinExec@8
-Wow64EnableWow64FsRedirection@4
-Wow64DisableWow64FsRedirection@4
-Wow64RevertWow64FsRedirection@4
-WriteConsoleA@20
-WriteConsoleInputA@16
-WriteConsoleInputVDMA@16
-WriteConsoleInputVDMW@16
-WriteConsoleInputW@16
-WriteConsoleOutputA@20
-WriteConsoleOutputAttribute@20
-WriteConsoleOutputCharacterA@20
-WriteConsoleOutputCharacterW@20
-WriteConsoleOutputW@20
-WriteConsoleW@20
-WriteFile@20
-WriteFileEx@20
-WriteFileGather@20
-WritePrivateProfileSectionA@12
-WritePrivateProfileSectionW@12
-WritePrivateProfileStringA@16
-WritePrivateProfileStringW@16
-WritePrivateProfileStructA@20
-WritePrivateProfileStructW@20
-WriteProcessMemory@20
-WriteProfileSectionA@8
-WriteProfileSectionW@8
-WriteProfileStringA@12
-WriteProfileStringW@12
-WriteTapemark@16
-WTSGetActiveConsoleSessionId@0
-ZombifyActCtx@4
-_hread@12
-_hwrite@12
-_lclose@4
-_lcreat@8
-_llseek@12
-_lopen@8
-_lread@12=_hread@12
-_lwrite@12=_hwrite@12
-lstrcat@8=lstrcatA@8
-lstrcatA@8
-lstrcatW@8
-lstrcmp@8=lstrcmpA@8
-lstrcmpA@8
-lstrcmpW@8
-lstrcmpi@8=lstrcmpiA@8
-lstrcmpiA@8
-lstrcmpiW@8
-lstrcpy@8=lstrcpyA@8
-lstrcpyA@8
-lstrcpyW@8
-lstrcpyn@12=lstrcpynA@12
-lstrcpynA@12
-lstrcpynW@12
-lstrlen@4=lstrlenA@4
-lstrlenA@4
-lstrlenW@4
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group>
- <module name="kernel32_base" type="objectlibrary">
+ <module name="kernel32_base" type="objectlibrary" allowwarnings="true">
<include base="kernel32_base">.</include>
<include base="kernel32_base">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<file>thread.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>fiber.S</file>
+ <file>thread.S</file>
+ </directory>
+ </if>
</directory>
</module>
<module name="kernel32" type="win32dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll">
- <importlibrary definition="kernel32.def" />
+ <importlibrary definition="kernel32.spec.def" />
<include base="kernel32">.</include>
<include base="kernel32" root="intermediate">.</include>
<include base="kernel32">include</include>
<library>pseh</library>
<library>ntdll</library>
<file>kernel32.rc</file>
+ <file>kernel32.spec</file>
</module>
</group>
--- /dev/null
+#
+# kernel32.spec
+#
+# Exports for KERNEL32 DLL
+
+
+@ stdcall AcquireSRWLockExclusive(ptr) ntdll.RtlAcquireSRWLockExclusive
+@ stdcall AcquireSRWLockShare(ptr) ntdll.RtlAcquireSRWLockShared
+@ stdcall ActivateActCtx(ptr ptr)
+@ stdcall AddAtomA(str)
+@ stdcall AddAtomW(wstr)
+@ stdcall AddConsoleAliasA(str str str) #check
+@ stdcall AddConsoleAliasW(wstr wstr wstr) #check
+@ stub AddLocalAlternateComputerNameA
+@ stub AddLocalAlternateComputerNameW
+@ stdcall AddRefActCtx(ptr)
+@ stdcall AddVectoredExceptionHandler(long ptr) ntdll.RtlAddVectoredExceptionHandler
+@ stdcall AllocConsole()
+@ stub AllocLSCallback
+@ stub AllocateUserPhysicalPages
+@ stdcall AreFileApisANSI()
+@ stdcall AssignProcessToJobObject(ptr ptr)
+@ stdcall AttachConsole(long)
+@ stdcall BackupRead(ptr ptr long ptr long long ptr)
+@ stdcall BackupSeek(ptr long long ptr ptr ptr)
+@ stdcall BackupWrite(ptr ptr long ptr long long ptr)
+@ stdcall BaseCheckAppcompatCache(long long long ptr) #check
+@ stub BaseCleanupAppcompatCache
+@ stub BaseCleanupAppcompatCacheSupport
+@ stdcall BaseDumpAppcompatCache()
+@ stdcall BaseFlushAppcompatCache()
+@ stub BaseInitAppcompatCache
+@ stub BaseInitAppcompatCacheSupport
+@ stdcall BaseProcessInitPostImport()
+@ stdcall BaseQueryModuleData(str str ptr ptr ptr) #check
+@ stdcall BaseUpdateAppcompatCache(long long long)
+@ stub BasepCheckWinSaferRestrictions
+@ stub BasepDebugDump
+@ stdcall Beep(long long)
+@ stdcall BeginUpdateResourceA(str long)
+@ stdcall BeginUpdateResourceW(wstr long)
+@ stdcall BindIoCompletionCallback(long ptr long)
+@ stdcall BuildCommDCBA(str ptr)
+@ stdcall BuildCommDCBAndTimeoutsA(str ptr ptr)
+@ stdcall BuildCommDCBAndTimeoutsW(wstr ptr ptr)
+@ stdcall BuildCommDCBW(wstr ptr)
+@ stdcall CallNamedPipeA(str ptr long ptr long ptr long)
+@ stdcall CallNamedPipeW(wstr ptr long ptr long ptr long)
+@ stdcall CancelDeviceWakeupRequest(long)
+@ stdcall CancelIo(long)
+@ stdcall CancelIoEx(long ptr)
+@ stdcall CancelSynchronousIo(long)
+@ stdcall CancelTimerQueueTimer(long long)
+@ stdcall CancelWaitableTimer(long)
+@ stdcall ChangeTimerQueueTimer(long long long long)
+@ stdcall CheckNameLegalDOS8Dot3A(str str long long long)
+@ stdcall CheckNameLegalDOS8Dot3W(wstr str long long long)
+@ stdcall CheckRemoteDebuggerPresent(long ptr)
+@ stdcall ClearCommBreak(long)
+@ stdcall ClearCommError(long ptr ptr)
+@ stdcall CloseConsoleHandle(long)
+@ stdcall CloseHandle(long)
+@ stdcall CloseProfileUserMapping()
+@ stub CloseSystemHandle
+@ stdcall CmdBatNotification(long)
+@ stdcall CommConfigDialogA(str long ptr)
+@ stdcall CommConfigDialogW(wstr long ptr)
+@ stdcall CompareFileTime(ptr ptr)
+@ stdcall CompareStringA(long long str long str long)
+@ stdcall CompareStringW(long long wstr long wstr long)
+@ stdcall ConnectNamedPipe(long ptr)
+@ stdcall ConsoleMenuControl(long long long)
+@ stub ConsoleSubst
+@ stdcall ContinueDebugEvent(long long long)
+@ stdcall ConvertDefaultLocale (long)
+@ stdcall ConvertFiberToThread()
+@ stdcall ConvertThreadToFiber(ptr)
+@ stdcall ConvertThreadToFiberEx(ptr long)
+@ stdcall CopyFileA(str str long)
+@ stdcall CopyFileExA (str str ptr ptr ptr long)
+@ stdcall CopyFileExW (wstr wstr ptr ptr ptr long)
+@ stdcall CopyFileW(wstr wstr long)
+@ stdcall CopyLZFile(long long) LZCopy
+@ stdcall CreateActCtxA(ptr)
+@ stdcall CreateActCtxW(ptr)
+@ stdcall CreateConsoleScreenBuffer(long long ptr long ptr)
+@ stdcall CreateDirectoryA(str ptr)
+@ stdcall CreateDirectoryExA(str str ptr)
+@ stdcall CreateDirectoryExW(wstr wstr ptr)
+@ stdcall CreateDirectoryW(wstr ptr)
+@ stdcall CreateEventA(ptr long long str)
+@ stdcall CreateEventW(ptr long long wstr)
+@ stdcall CreateFiber(long ptr ptr)
+@ stdcall CreateFiberEx(long long long ptr ptr)
+@ stdcall CreateFileA(str long long ptr long long long)
+@ stdcall CreateFileMappingA(long ptr long long long str)
+@ stdcall CreateFileMappingW(long ptr long long long wstr)
+@ stdcall CreateFileW(wstr long long ptr long long long)
+@ stdcall CreateHardLinkA(str str ptr)
+@ stdcall CreateHardLinkW(wstr wstr ptr)
+@ stdcall CreateIoCompletionPort(long long long long)
+@ stdcall CreateJobObjectA(ptr str)
+@ stdcall CreateJobObjectW(ptr wstr)
+@ stdcall CreateJobSet(long ptr long)
+@ stub CreateKernelThread
+@ stdcall CreateMailslotA(ptr long long ptr)
+@ stdcall CreateMailslotW(ptr long long ptr)
+@ stdcall CreateMemoryResourceNotification(ptr)
+@ stdcall CreateMutexA(ptr long str)
+@ stdcall CreateMutexW(ptr long wstr)
+@ stdcall CreateNamedPipeA(str long long long long long long ptr)
+@ stdcall CreateNamedPipeW(wstr long long long long long long ptr)
+@ stdcall CreateNlsSecurityDescriptor(ptr long long)
+@ stdcall CreatePipe(ptr ptr ptr long)
+@ stdcall CreateProcessA(str str ptr ptr long long ptr str ptr ptr)
+@ stdcall CreateProcessInternalA(ptr str str ptr ptr long long ptr str ptr ptr long)
+@ stdcall CreateProcessInternalW(ptr wstr wstr ptr ptr long long ptr wstr ptr ptr long)
+@ stub CreateProcessInternalWSecure
+@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
+@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
+@ stdcall CreateSemaphoreA(ptr long long str)
+@ stdcall CreateSemaphoreW(ptr long long wstr)
+@ stdcall CreateSemaphoreExA(ptr long long str long long)
+@ stdcall CreateSemaphoreExW(ptr long long wstr long long)
+@ stdcall CreateSocketHandle()
+@ stdcall CreateSymbolicLinkA(str str long)
+@ stdcall CreateSymbolicLinkW(wstr wstr long)
+@ stdcall CreateTapePartition(long long long long)
+@ stdcall CreateThread(ptr long ptr long long ptr)
+@ stdcall CreateTimerQueue ()
+@ stdcall CreateTimerQueueTimer(ptr long ptr ptr long long long)
+@ stdcall CreateToolhelp32Snapshot(long long)
+@ stdcall CreateVirtualBuffer(long long long)
+@ stdcall CreateWaitableTimerA(ptr long str)
+@ stdcall CreateWaitableTimerW(ptr long wstr)
+@ stdcall CreateWaitableTimerExA (ptr str long long)
+@ stdcall CreateWaitableTimerExW (ptr wstr long long)
+@ stdcall DeactivateActCtx(long ptr)
+@ stdcall DebugActiveProcess(long)
+@ stdcall DebugActiveProcessStop(long)
+@ stdcall DebugBreak() ntdll.DbgBreakPoint
+@ stdcall DebugBreakProcess(long)
+@ stdcall DebugSetProcessKillOnExit(long)
+@ stdcall DecodePointer(ptr) ntdll.RtlDecodePointer
+@ stub DecodeSystemPointer
+@ stdcall DefineDosDeviceA(long str str)
+@ stdcall DefineDosDeviceW(long wstr wstr)
+@ stdcall DelayLoadFailureHook(str str)
+@ stdcall DeleteAtom(long)
+@ stdcall DeleteCriticalSection(ptr) ntdll.RtlDeleteCriticalSection
+@ stdcall DeleteFiber(ptr)
+@ stdcall DeleteFileA(str)
+@ stdcall DeleteFileW(wstr)
+@ stdcall DeleteTimerQueue(long)
+@ stdcall DeleteTimerQueueEx (long long)
+@ stdcall DeleteTimerQueueTimer(long long long)
+@ stdcall DeleteVolumeMountPointA(str) #check
+@ stdcall DeleteVolumeMountPointW(wstr) #check
+@ stdcall DeviceIoControl(long long ptr long ptr long ptr ptr)
+@ stdcall DisableThreadLibraryCalls(long)
+@ stdcall DisconnectNamedPipe(long)
+@ stdcall DnsHostnameToComputerNameA (str ptr ptr)
+@ stdcall DnsHostnameToComputerNameW (wstr ptr ptr)
+@ stdcall DosDateTimeToFileTime(long long ptr)
+@ stdcall DosPathToSessionPathA(long str str)
+@ stdcall DosPathToSessionPathW(long wstr wstr)
+@ stdcall DuplicateConsoleHandle(long long long long)
+@ stdcall DuplicateHandle(long long long ptr long long long)
+@ stdcall EncodePointer(ptr) ntdll.RtlEncodePointer
+@ stub EncodeSystemPointer
+@ stdcall EndUpdateResourceA(long long)
+@ stdcall EndUpdateResourceW(long long)
+@ stdcall EnterCriticalSection(ptr) ntdll.RtlEnterCriticalSection
+@ stdcall EnumCalendarInfoA(ptr long long long)
+@ stdcall EnumCalendarInfoExA(ptr long long long)
+@ stdcall EnumCalendarInfoExW(ptr long long long)
+@ stdcall EnumCalendarInfoW(ptr long long long)
+@ stdcall EnumDateFormatsA(ptr long long)
+@ stdcall EnumDateFormatsExA(ptr long long)
+@ stdcall EnumDateFormatsExW(ptr long long)
+@ stdcall EnumDateFormatsW(ptr long long)
+@ stdcall EnumLanguageGroupLocalesA(ptr long long ptr)
+@ stdcall EnumLanguageGroupLocalesW(ptr long long ptr)
+@ stdcall EnumResourceLanguagesA(long str str ptr long)
+@ stdcall EnumResourceLanguagesW(long wstr wstr ptr long)
+@ stdcall EnumResourceNamesA(long str ptr long)
+@ stdcall EnumResourceNamesW(long wstr ptr long)
+@ stdcall EnumResourceTypesA(long ptr long)
+@ stdcall EnumResourceTypesW(long ptr long)
+@ stdcall EnumSystemCodePagesA(ptr long)
+@ stdcall EnumSystemCodePagesW(ptr long)
+@ stdcall EnumSystemGeoID(long long ptr)
+@ stdcall EnumSystemLanguageGroupsA(ptr long ptr)
+@ stdcall EnumSystemLanguageGroupsW(ptr long ptr)
+@ stdcall EnumSystemLocalesA(ptr long)
+@ stdcall EnumSystemLocalesW(ptr long)
+@ stdcall EnumTimeFormatsA(ptr long long)
+@ stdcall EnumTimeFormatsW(ptr long long)
+@ stdcall EnumUILanguagesA(ptr long long)
+@ stdcall EnumUILanguagesW(ptr long long)
+@ stub EnumerateLocalComputerNamesA
+@ stub EnumerateLocalComputerNamesW
+@ stdcall EraseTape(ptr long long)
+@ stdcall EscapeCommFunction(long long)
+@ stdcall ExitProcess(long)
+@ stdcall ExitThread(long)
+@ stub ExitVDM
+@ stdcall ExpandEnvironmentStringsA(str ptr long)
+@ stdcall ExpandEnvironmentStringsW(wstr ptr long)
+@ stdcall ExpungeConsoleCommandHistoryA(long)
+@ stdcall ExpungeConsoleCommandHistoryW(long)
+@ stdcall ExtendVirtualBuffer(long long)
+@ stdcall FatalAppExitA(long str)
+@ stdcall FatalAppExitW(long wstr)
+@ stdcall FatalExit(long)
+@ stdcall FileTimeToDosDateTime(ptr ptr ptr)
+@ stdcall FileTimeToLocalFileTime(ptr ptr)
+@ stdcall FileTimeToSystemTime(ptr ptr)
+@ stdcall FillConsoleOutputAttribute(long long long long ptr)
+@ stdcall FillConsoleOutputCharacterA(long long long long ptr)
+@ stdcall FillConsoleOutputCharacterW(long long long long ptr)
+@ stdcall FindActCtxSectionGuid(long ptr long ptr ptr)
+@ stdcall FindActCtxSectionStringA(long ptr long str ptr)
+@ stdcall FindActCtxSectionStringW(long ptr long wstr ptr)
+@ stdcall FindAtomA(str)
+@ stdcall FindAtomW(wstr)
+@ stdcall FindClose(long)
+@ stdcall FindCloseChangeNotification(long)
+@ stdcall FindFirstChangeNotificationA(str long long)
+@ stdcall FindFirstChangeNotificationW(wstr long long)
+@ stdcall FindFirstFileA(str ptr)
+@ stdcall FindFirstFileExA(str long ptr long ptr long)
+@ stdcall FindFirstFileExW(wstr long ptr long ptr long)
+@ stdcall FindFirstFileW(wstr ptr)
+@ stdcall FindFirstStreamW(wstr ptr ptr long)
+@ stdcall FindFirstVolumeA(ptr long)
+@ stdcall FindFirstVolumeMountPointA(str ptr long)
+@ stdcall FindFirstVolumeMountPointW(wstr ptr long)
+@ stdcall FindFirstVolumeW(ptr long)
+@ stdcall FindNextChangeNotification(long)
+@ stdcall FindNextFileA(long ptr)
+@ stdcall FindNextFileW(long ptr)
+@ stdcall FindNextVolumeA(long ptr long)
+@ stdcall FindNextVolumeMountPointA(long str long)
+@ stdcall FindNextVolumeMountPointW(long wstr long)
+@ stdcall FindNextVolumeW(long ptr long)
+@ stdcall FindResourceA(long str str)
+@ stdcall FindResourceExA(long str str long)
+@ stdcall FindResourceExW(long wstr wstr long)
+@ stdcall FindResourceW(long wstr wstr)
+@ stdcall FindVolumeClose(ptr)
+@ stdcall FindVolumeMountPointClose(ptr)
+@ stdcall FlsAlloc(ptr)
+@ stdcall FlsFree(long)
+@ stdcall FlsGetValue(long)
+@ stdcall FlsSetValue(long ptr)
+@ stdcall FlushConsoleInputBuffer(long)
+@ stdcall FlushFileBuffers(long)
+@ stdcall FlushInstructionCache(long long long)
+@ stdcall FlushViewOfFile(ptr long)
+@ stdcall FoldStringA(long str long ptr long)
+@ stdcall FoldStringW(long wstr long ptr long)
+@ stdcall FormatMessageA(long ptr long long ptr long ptr)
+@ stdcall FormatMessageW(long ptr long long ptr long ptr)
+@ stdcall FreeConsole()
+@ stdcall FreeEnvironmentStringsA(ptr)
+@ stdcall FreeEnvironmentStringsW(ptr)
+@ stdcall FreeLibrary(long)
+@ stdcall FreeLibraryAndExitThread(long long)
+@ stdcall FreeResource(long)
+@ stdcall FreeUserPhysicalPages(long long long)
+@ stdcall FreeVirtualBuffer(ptr)
+@ stdcall GenerateConsoleCtrlEvent(long long)
+@ stdcall GetACP()
+@ stdcall GetAtomNameA(long ptr long)
+@ stdcall GetAtomNameW(long ptr long)
+@ stdcall GetBinaryType(str ptr) GetBinaryTypeA
+@ stdcall GetBinaryTypeA(str ptr)
+@ stdcall GetBinaryTypeW(wstr ptr)
+@ stdcall GetCPFileNameFromRegistry(long wstr long) #check
+@ stdcall GetCPInfo(long ptr)
+@ stdcall GetCPInfoExA(long long ptr)
+@ stdcall GetCPInfoExW(long long ptr)
+@ stdcall GetCalendarInfoA(long long long ptr long ptr)
+@ stdcall GetCalendarInfoW(long long long ptr long ptr)
+@ stub GetComPlusPackageInstallStatus
+@ stdcall GetCommConfig(long ptr long)
+@ stdcall GetCommMask(long ptr)
+@ stdcall GetCommModemStatus(long ptr)
+@ stdcall GetCommProperties(long ptr)
+@ stdcall GetCommState(long ptr)
+@ stdcall GetCommTimeouts(long ptr)
+@ stdcall GetCommandLineA()
+@ stdcall GetCommandLineW()
+@ stdcall GetCompressedFileSizeA(long ptr)
+@ stdcall GetCompressedFileSizeW(long ptr)
+@ stdcall GetComputerNameA(ptr ptr)
+@ stdcall GetComputerNameExA(long ptr ptr)
+@ stdcall GetComputerNameExW(long ptr ptr)
+@ stdcall GetComputerNameW(ptr ptr)
+@ stdcall GetConsoleAliasA(str str long str)
+@ stdcall GetConsoleAliasExesA(str long)
+@ stdcall GetConsoleAliasExesLengthA()
+@ stdcall GetConsoleAliasExesLengthW()
+@ stdcall GetConsoleAliasExesW(wstr long)
+@ stdcall GetConsoleAliasW(wstr wstr long wstr)
+@ stdcall GetConsoleAliasesA(str long str)
+@ stdcall GetConsoleAliasesLengthA(str)
+@ stdcall GetConsoleAliasesLengthW(wstr)
+@ stdcall GetConsoleAliasesW(wstr long wstr)
+@ stdcall GetConsoleCP()
+@ stub GetConsoleCharType
+@ stdcall GetConsoleCommandHistoryA(long long long) #check
+@ stdcall GetConsoleCommandHistoryLengthA(long)#check
+@ stdcall GetConsoleCommandHistoryLengthW(long)#check
+@ stdcall GetConsoleCommandHistoryW(long long long)#check
+@ stdcall GetConsoleCursorInfo(long ptr)
+@ stub GetConsoleCursorMode
+@ stdcall GetConsoleDisplayMode(ptr)
+@ stub GetConsoleFontInfo
+@ stub GetConsoleFontSize
+@ stub GetConsoleHardwareState
+@ stdcall GetConsoleInputExeNameA(long ptr)
+@ stdcall GetConsoleInputExeNameW(long ptr)
+@ stdcall GetConsoleInputWaitHandle()
+@ stdcall GetConsoleKeyboardLayoutNameA(ptr)
+@ stdcall GetConsoleKeyboardLayoutNameW(ptr)
+@ stdcall GetConsoleMode(long ptr)
+@ stub GetConsoleNlsMode
+@ stdcall GetConsoleOutputCP()
+@ stub GetConsoleProcessist
+@ stdcall GetConsoleScreenBufferInfo(long ptr)
+@ stub GetConsoleSelectionInfo
+@ stdcall GetConsoleTitleA(ptr long)
+@ stdcall GetConsoleTitleW(ptr long)
+@ stdcall GetConsoleWindow()
+@ stdcall GetCurrencyFormatA(long long str ptr str long)
+@ stdcall GetCurrencyFormatW(long long str ptr str long)
+@ stdcall GetCurrentActCtx(ptr)
+@ stub GetCurrentConsoleFont
+@ stdcall GetCurrentDirectoryA(long ptr)
+@ stdcall GetCurrentDirectoryW(long ptr)
+@ stdcall GetCurrentProcess()
+@ stdcall GetCurrentProcessId()
+@ stdcall GetCurrentThread()
+@ stdcall GetCurrentThreadId()
+@ stdcall GetDateFormatA(long long ptr str ptr long)
+@ stdcall GetDateFormatW(long long ptr wstr ptr long)
+@ stub GetDaylightFlag
+@ stdcall GetDefaultCommConfigA(str ptr long)
+@ stdcall GetDefaultCommConfigW(wstr ptr long)
+@ stub GetDefaultSortkeySize
+@ stdcall GetDevicePowerState(long ptr)
+@ stdcall GetDiskFreeSpaceA(str ptr ptr ptr ptr)
+@ stdcall GetDiskFreeSpaceExA (str ptr ptr ptr)
+@ stdcall GetDiskFreeSpaceExW (wstr ptr ptr ptr)
+@ stdcall GetDiskFreeSpaceW(wstr ptr ptr ptr ptr)
+@ stdcall GetDllDirectoryA(long ptr)
+@ stdcall GetDllDirectoryW(long ptr)
+@ stdcall GetDriveTypeA(str)
+@ stdcall GetDriveTypeW(wstr)
+@ stdcall GetEnvironmentStrings()
+@ stdcall GetEnvironmentStringsA() GetEnvironmentStrings
+@ stdcall GetEnvironmentStringsW()
+@ stdcall GetEnvironmentVariableA(str ptr long)
+@ stdcall GetEnvironmentVariableW(wstr ptr long)
+@ stub GetErrorMode
+@ stdcall GetExitCodeProcess(long ptr)
+@ stdcall GetExitCodeThread(long ptr)
+@ stdcall GetExpandedNameA(str ptr)
+@ stdcall GetExpandedNameW(wstr ptr)
+@ stdcall GetFileAttributesA(str)
+@ stdcall GetFileAttributesByHandle(long ptr long)
+@ stdcall GetFileAttributesExA(str long ptr)
+@ stdcall GetFileAttributesExW(wstr long ptr)
+@ stdcall GetFileAttributesW(wstr)
+@ stdcall GetFileBandwidthReservation(long ptr ptr ptr ptr ptr)
+@ stdcall GetFileInformationByHandle(long ptr)
+@ stdcall GetFileSize(long ptr)
+@ stdcall GetFileSizeEx(long ptr)
+@ stdcall GetFileTime(long ptr ptr ptr)
+@ stdcall GetFileType(long)
+@ stdcall GetFinalPathNameByHandleA(long str long long)
+@ stdcall GetFinalPathNameByHandleW(long wstr long long)
+@ stub GetFirmwareEnvironmentVariableA
+@ stub GetFirmwareEnvironmentVariableW
+@ stdcall GetFullPathNameA(str long ptr ptr)
+@ stdcall GetFullPathNameW(wstr long ptr ptr)
+@ stdcall GetGeoInfoA(long long ptr long long)
+@ stdcall GetGeoInfoW(long long ptr long long)
+@ stdcall GetHandleContext(long)
+@ stdcall GetHandleInformation(long ptr)
+@ stub GetSCallbackTarget
+@ stub GetSCallbackTemplate
+@ stdcall GetLargePageMinimum()
+@ stdcall GetLargestConsoleWindowSize(long)
+@ stdcall GetLastError()
+@ stub GetLinguistLangSize
+@ stdcall GetLocalTime(ptr)
+@ stdcall GetLocaleInfoA(long long ptr long)
+@ stdcall GetLocaleInfoW(long long ptr long)
+@ stdcall GetLocaleInfoEx(wstr long wstr long)
+@ stdcall GetLogicalDriveStringsA(long ptr)
+@ stdcall GetLogicalDriveStringsW(long ptr)
+@ stdcall GetLogicalDrives()
+@ stdcall GetLongPathNameA (str long long)
+@ stdcall GetLongPathNameW (wstr long long)
+@ stdcall GetMailslotInfo(long ptr ptr ptr ptr)
+@ stdcall GetModuleFileNameA(long ptr long)
+@ stdcall GetModuleFileNameW(long ptr long)
+@ stdcall GetModuleHandleA(str)
+@ stdcall GetModuleHandleExA(long ptr ptr)
+@ stdcall GetModuleHandleExW(long ptr ptr)
+@ stdcall GetModuleHandleW(wstr)
+@ stdcall GetNamedPipeHandleStateA(long ptr ptr ptr ptr str long)
+@ stdcall GetNamedPipeHandleStateW(long ptr ptr ptr ptr wstr long)
+@ stdcall GetNamedPipeInfo(long ptr ptr ptr ptr)
+@ stdcall GetNativeSystemInfo(ptr)
+@ stub GetNextVDMCommand
+@ stub GetNlsSectionName
+@ stub GetNumaAvailableMemory
+@ stub GetNumaAvailableMemoryNode
+@ stub GetNumaHighestNodeNumber
+@ stub GetNumaNodeProcessorMask
+@ stub GetNumaProcessorMap
+@ stub GetNumaProcessorNode
+@ stdcall GetNumberFormatA(long long str ptr ptr long)
+@ stdcall GetNumberFormatW(long long wstr ptr ptr long)
+@ stdcall GetNumberOfConsoleFonts()
+@ stdcall GetNumberOfConsoleInputEvents(long ptr)
+@ stdcall GetNumberOfConsoleMouseButtons(ptr)
+@ stdcall GetOEMCP()
+@ stdcall GetOverlappedResult(long ptr ptr long)
+@ stdcall GetPriorityClass(long)
+@ stdcall GetPrivateProfileIntA(str str long str)
+@ stdcall GetPrivateProfileIntW(wstr wstr long wstr)
+@ stdcall GetPrivateProfileSectionA(str ptr long str)
+@ stdcall GetPrivateProfileSectionNamesA(ptr long str)
+@ stdcall GetPrivateProfileSectionNamesW(ptr long wstr)
+@ stdcall GetPrivateProfileSectionW(wstr ptr long wstr)
+@ stdcall GetPrivateProfileStringA(str str str ptr long str)
+@ stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr)
+@ stdcall GetPrivateProfileStructA (str str ptr long str)
+@ stdcall GetPrivateProfileStructW(wstr wstr ptr long wstr)
+@ stdcall GetProcAddress(long str)
+@ stdcall GetProcessAffinityMask(long ptr ptr)
+@ stdcall GetProcessHandleCount(long ptr)
+@ stdcall GetProcessHeap()
+@ stdcall GetProcessHeaps(long ptr)
+@ stdcall GetProcessId(long)
+@ stdcall GetProcessIoCounters(long ptr)
+@ stdcall GetProcessPriorityBoost(long ptr)
+@ stdcall GetProcessShutdownParameters(ptr ptr)
+@ stdcall GetProcessTimes(long ptr ptr ptr ptr)
+@ stdcall GetProcessVersion(long)
+@ stdcall GetProcessWorkingSetSize(long ptr ptr)
+@ stub GetProductName
+@ stdcall GetProfileIntA(str str long)
+@ stdcall GetProfileIntW(wstr wstr long)
+@ stdcall GetProfileSectionA(str ptr long)
+@ stdcall GetProfileSectionW(wstr ptr long)
+@ stdcall GetProfileStringA(str str str ptr long)
+@ stdcall GetProfileStringW(wstr wstr wstr ptr long)
+@ stdcall GetQueuedCompletionStatus(long ptr ptr ptr long)
+@ stub GetLSCallbackTarget
+@ stub GetLSCallbackTemplate
+@ stdcall GetShortPathNameA(str ptr long)
+@ stdcall GetShortPathNameW(wstr ptr long)
+@ stdcall GetStartupInfoA(ptr)
+@ stdcall GetStartupInfoW(ptr)
+@ stdcall GetStdHandle(long)
+@ stdcall GetStringTypeA(long long str long ptr)
+@ stdcall GetStringTypeExA(long long str long ptr)
+@ stdcall GetStringTypeExW(long long wstr long ptr)
+@ stdcall GetStringTypeW(long wstr long ptr)
+@ stdcall GetSystemDefaultLCID()
+@ stdcall GetSystemDefaultLangID()
+@ stdcall GetSystemDefaultUILanguage()
+@ stdcall GetSystemDirectoryA(ptr long)
+@ stdcall GetSystemDirectoryW(ptr long)
+@ stdcall GetSystemInfo(ptr)
+@ stdcall GetSystemPowerStatus(ptr)
+@ stub GetSystemRegistryQuota
+@ stdcall GetSystemTime(ptr)
+@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
+@ stdcall GetSystemTimeAsFileTime(ptr)
+@ stub GetSystemTimes
+@ stdcall GetSystemWindowsDirectoryA(ptr long)
+@ stdcall GetSystemWindowsDirectoryW(ptr long)
+@ stdcall GetSystemWow64DirectoryA(ptr long)
+@ stdcall GetSystemWow64DirectoryW(ptr long)
+@ stdcall GetTapeParameters(ptr long ptr ptr)
+@ stdcall GetTapePosition(ptr long ptr ptr ptr)
+@ stdcall GetTapeStatus(ptr)
+@ stdcall GetTempFileNameA(str str long ptr)
+@ stdcall GetTempFileNameW(wstr wstr long ptr)
+@ stdcall GetTempPathA(long ptr)
+@ stdcall GetTempPathW(long ptr)
+@ stdcall GetThreadContext(long ptr)
+@ stdcall GetThreadId(ptr)
+@ stub GetThreadIOPendingFlag
+@ stdcall GetThreadLocale()
+@ stdcall GetThreadPriority(long)
+@ stdcall GetThreadPriorityBoost(long ptr)
+@ stdcall GetThreadSelectorEntry(long long ptr)
+@ stdcall GetThreadTimes(long ptr ptr ptr ptr)
+@ stdcall GetTickCount()
+@ stdcall -ret64 GetTickCount64()
+@ stdcall GetTimeFormatA(long long ptr str ptr long)
+@ stdcall GetTimeFormatW(long long ptr wstr ptr long)
+@ stdcall GetTimeZoneInformation(ptr)
+@ stdcall GetUserDefaultLCID()
+@ stdcall GetUserDefaultLangID()
+@ stdcall GetUserDefaultUILanguage()
+@ stdcall GetUserGeoID(long)
+@ stub GetVDMCurrentDirectories
+@ stdcall GetVersion()
+@ stdcall GetVersionExA(ptr)
+@ stdcall GetVersionExW(ptr)
+@ stdcall GetVolumeInformationA(str ptr long ptr ptr ptr ptr long)
+@ stdcall GetVolumeInformationW(wstr ptr long ptr ptr ptr ptr long)
+@ stdcall GetVolumeNameForVolumeMountPointA(str ptr long)
+@ stdcall GetVolumeNameForVolumeMountPointW(wstr ptr long)
+@ stdcall GetVolumePathNameA(str ptr long)
+@ stdcall GetVolumePathNameW(wstr ptr long)
+@ stub GetVolumePathNamesForVolumeNameA
+@ stub GetVolumePathNamesForVolumeNameW
+@ stdcall GetWindowsDirectoryA(ptr long)
+@ stdcall GetWindowsDirectoryW(ptr long)
+@ stub GetWriteWatch
+@ stdcall GlobalAddAtomA(str)
+@ stdcall GlobalAddAtomW(wstr)
+@ stdcall GlobalAlloc(long long)
+@ stdcall GlobalCompact(long)
+@ stdcall GlobalDeleteAtom(long)
+@ stdcall GlobalFindAtomA(str)
+@ stdcall GlobalFindAtomW(wstr)
+@ stdcall GlobalFix(long)
+@ stdcall GlobalFlags(long)
+@ stdcall GlobalFree(long)
+@ stdcall GlobalGetAtomNameA(long ptr long)
+@ stdcall GlobalGetAtomNameW(long ptr long)
+@ stdcall GlobalHandle(ptr)
+@ stdcall GlobalLock(long)
+@ stdcall GlobalMemoryStatus(ptr)
+@ stdcall GlobalMemoryStatusEx(ptr)
+@ stdcall GlobalReAlloc(long long long)
+@ stdcall GlobalSize(long)
+@ stdcall GlobalUnWire(long)
+@ stdcall GlobalUnfix(long)
+@ stdcall GlobalUnlock(long)
+@ stdcall GlobalWire(long)
+@ stub Heap32First
+@ stdcall Heap32ListFirst(long ptr)
+@ stub Heap32ListNext
+@ stub Heap32Next
+@ stdcall HeapAlloc(long long long) ntdll.RtlAllocateHeap
+@ stdcall HeapCompact(long long)
+@ stdcall HeapCreate(long long long)
+@ stub HeapCreateTagsW
+@ stdcall HeapDestroy(long)
+@ stub HeapExtend
+@ stdcall HeapFree(long long long) ntdll.RtlFreeHeap
+@ stdcall HeapLock(long)
+@ stub HeapQueryInformation
+@ stub HeapQueryTagW
+@ stdcall HeapReAlloc(long long ptr long) ntdll.RtlReAllocateHeap
+@ stub HeapSetFlags
+@ stdcall HeapSetInformation(ptr long ptr long)
+@ stdcall HeapSize(long long ptr) ntdll.RtlSizeHeap
+@ stub HeapSummary
+@ stdcall HeapUnlock(long)
+@ stub HeapUsage
+@ stdcall HeapValidate(long long ptr)
+@ stdcall HeapWalk(long ptr)
+@ stdcall InitAtomTable(long)
+@ stdcall InitializeCriticalSection(ptr)
+@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
+#@ stdcall InitializeCriticalSectionEx(ptr long long)
+@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
+@ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock
+@ stdcall InterlockedCompareExchange (ptr long long)
+@ stdcall InterlockedDecrement(ptr)
+@ stdcall InterlockedExchange(ptr long)
+@ stdcall InterlockedExchangeAdd (ptr long )
+@ stdcall InterlockedFlushSList(ptr) ntdll.RtlInterlockedFlushSList
+@ stdcall InterlockedIncrement(ptr)
+@ stdcall InterlockedPopEntrySList(ptr) ntdll.RtlInterlockedPopEntrySList
+@ stdcall InterlockedPushEntrySList(ptr ptr) ntdll.RtlInterlockedPushEntrySList
+@ stub InvalidateConsoleDIBits
+@ stub InvalidateNSCache
+@ stdcall IsBadCodePtr(ptr)
+@ stdcall IsBadHugeReadPtr(ptr long)
+@ stdcall IsBadHugeWritePtr(ptr long)
+@ stdcall IsBadReadPtr(ptr long)
+@ stdcall IsBadStringPtrA(ptr long)
+@ stdcall IsBadStringPtrW(ptr long)
+@ stdcall IsBadWritePtr(ptr long)
+@ stdcall IsDBCSLeadByte(long)
+@ stdcall IsDBCSLeadByteEx(long long)
+@ stdcall IsDebuggerPresent()
+@ stub IsProcessInJob
+@ stdcall IsProcessorFeaturePresent(long)
+@ stdcall IsSystemResumeAutomatic()
+@ stdcall IsValidCodePage(long)
+@ stdcall IsValidLanguageGroup(long long)
+@ stdcall IsValidLocale(long long)
+@ stub IsValidUILanguage
+@ stdcall IsWow64Process(ptr ptr)
+@ stub LCIDToLocaleName
+@ stdcall LCMapStringA(long long str long ptr long)
+@ stdcall LCMapStringW(long long wstr long ptr long)
+@ stdcall LeaveCriticalSection(ptr) ntdll.RtlLeaveCriticalSection
+@ stdcall LoadLibraryA(str)
+@ stdcall LoadLibraryExA( str long long)
+@ stdcall LoadLibraryExW(wstr long long)
+@ stdcall LoadLibraryW(wstr)
+@ stdcall LoadModule(str ptr)
+@ stdcall LoadResource(long long)
+@ stdcall LocalAlloc(long long)
+@ stdcall LocalCompact(long)
+@ stdcall LocalFileTimeToFileTime(ptr ptr)
+@ stdcall LocalFlags(long)
+@ stdcall LocalFree(long)
+@ stdcall LocalHandle(ptr)
+@ stdcall LocalLock(long)
+@ stdcall LocalReAlloc(long long long)
+@ stdcall LocalShrink(long long)
+@ stdcall LocalSize(long)
+@ stdcall LocalUnlock(long)
+@ stub LocaleNameToLCID
+@ stdcall LockFile(long long long long long)
+@ stdcall LockFileEx(long long long long long ptr)
+@ stdcall LockResource(long)
+@ stdcall LZClose(long)
+@ stdcall LZCopy(long long)
+@ stdcall LZDone()
+@ stdcall LZInit(long)
+@ stdcall LZOpenFileA(str ptr long)
+@ stdcall LZOpenFileW(wstr ptr long)
+@ stdcall LZRead(long str long) #check
+@ stdcall LZSeek(long long long) #check
+@ stdcall LZStart()
+@ stdcall MapUserPhysicalPages(ptr long ptr)
+@ stdcall MapUserPhysicalPagesScatter(ptr long ptr)
+@ stdcall MapViewOfFile(long long long long long)
+@ stdcall MapViewOfFileEx(long long long long long ptr)
+@ stdcall Module32First(long ptr)
+@ stdcall Module32FirstW(long ptr)
+@ stdcall Module32Next(long ptr)
+@ stdcall Module32NextW(long ptr)
+@ stdcall MoveFileA(str str)
+@ stdcall MoveFileExA(str str long)
+@ stdcall MoveFileExW(wstr wstr long)
+@ stdcall MoveFileW(wstr wstr)
+@ stdcall MoveFileWithProgressA(str str ptr ptr long)
+@ stdcall MoveFileWithProgressW(wstr wstr ptr ptr long)
+@ stdcall MulDiv(long long long)
+@ stdcall MultiByteToWideChar(long long str long ptr long)
+@ stdcall NeedCurrentDirectoryForExePathA(str)
+@ stdcall NeedCurrentDirectoryForExePathW(wstr)
+@ stub NlsConvertIntegerToString
+@ stub NlsGetCacheUpdateCount
+@ stub NlsResetProcessocale
+@ stub NotifyNLSUserCache
+@ stub NumaVirtualQueryNode
+@ stdcall OpenConsoleW(wstr long long long)
+@ stub OpenDataFile
+@ stdcall OpenEventA(long long str)
+@ stdcall OpenEventW(long long wstr)
+@ stdcall OpenFile(str ptr long)
+@ stdcall OpenFileMappingA(long long str)
+@ stdcall OpenFileMappingW(long long wstr)
+@ stub OpenJobObjectA
+@ stub OpenJobObjectW
+@ stdcall OpenMutexA(long long str)
+@ stdcall OpenMutexW(long long wstr)
+@ stdcall OpenProcess(long long long)
+@ stub OpenProfileUserMapping
+@ stdcall OpenSemaphoreA(long long str)
+@ stdcall OpenSemaphoreW(long long wstr)
+@ stdcall OpenThread(long long long)
+@ stdcall OpenWaitableTimerA(long long str)
+@ stdcall OpenWaitableTimerW(long long wstr)
+@ stdcall OutputDebugStringA(str)
+@ stdcall OutputDebugStringW(wstr)
+@ stdcall PeekConsoleInputA(ptr ptr long ptr)
+@ stdcall PeekConsoleInputW(ptr ptr long ptr)
+@ stdcall PeekNamedPipe(long ptr long ptr ptr ptr)
+@ stdcall PostQueuedCompletionStatus(long long ptr ptr)
+@ stdcall PrepareTape(ptr long long)
+@ stub PrivCopyFileExW
+@ stub PrivMoveFileIdentityW
+@ stdcall Process32First (ptr ptr)
+@ stdcall Process32FirstW (ptr ptr)
+@ stdcall Process32Next (ptr ptr)
+@ stdcall Process32NextW (ptr ptr)
+@ stdcall ProcessIdToSessionId(long ptr)
+@ stdcall PulseEvent(long)
+@ stdcall PurgeComm(long long)
+@ stdcall QueryActCtxW(long ptr ptr long ptr long ptr)
+@ stdcall QueryDepthSList(ptr) ntdll.RtlQueryDepthSList
+@ stdcall QueryDosDeviceA(str ptr long)
+@ stdcall QueryDosDeviceW(wstr ptr long)
+@ stub QueryInformationJobObject
+@ stub QueryMemoryResourceNotification
+@ stub QueryNumberOfEventogRecords
+@ stub QueryOldestEventogRecord
+@ stdcall QueryPerformanceCounter(ptr)
+@ stdcall QueryPerformanceFrequency(ptr)
+@ stub QueryWin31IniFilesMappedToRegistry
+@ stdcall QueueUserAPC(ptr long long)
+@ stdcall QueueUserWorkItem(ptr ptr long)
+@ stdcall RaiseException(long long long ptr)
+@ stdcall ReadConsoleA(long ptr long ptr ptr)
+@ stdcall ReadConsoleInputA(long ptr long ptr)
+@ stub ReadConsoleInputExA
+@ stub ReadConsoleInputExW
+@ stdcall ReadConsoleInputW(long ptr long ptr)
+@ stdcall ReadConsoleOutputA(long ptr long long ptr)
+@ stdcall ReadConsoleOutputAttribute(long ptr long long ptr)
+@ stdcall ReadConsoleOutputCharacterA(long ptr long long ptr)
+@ stdcall ReadConsoleOutputCharacterW(long ptr long long ptr)
+@ stdcall ReadConsoleOutputW(long ptr long long ptr)
+@ stdcall ReadConsoleW(long ptr long ptr ptr)
+@ stdcall ReadDirectoryChangesW(long ptr long long long ptr ptr ptr)
+@ stdcall ReadFile(long ptr long ptr ptr)
+@ stdcall ReadFileEx(long ptr long ptr ptr)
+@ stdcall ReadFileScatter(long ptr long ptr ptr)
+@ stdcall ReadProcessMemory(long ptr ptr long ptr)
+@ stdcall RegisterApplicationRestart(wstr long)
+@ stub RegisterConsoleIME
+@ stub RegisterConsoleOS2
+@ stub RegisterConsoleVDM
+@ stub RegisterServiceProcess
+@ stub RegisterSysMsgHandler
+@ stub RegisterWaitForInputIdle
+@ stdcall RegisterWaitForSingleObject(ptr long ptr ptr long long)
+@ stdcall RegisterWaitForSingleObjectEx(long ptr ptr long long)
+@ stub RegisterWowBaseHandlers
+@ stub RegisterWowExec
+@ stdcall ReleaseActCtx(ptr)
+@ stdcall ReleaseMutex(long)
+@ stdcall ReleaseSemaphore(long long ptr)
+@ stdcall ReleaseSRWLockExclusive(ptr) ntdll.RtlReleaseSRWLockExclusive
+@ stdcall ReleaseSRWLockShared(ptr) ntdll.RtlReleaseSRWLockShared
+@ stdcall RemoveDirectoryA(str)
+@ stdcall RemoveDirectoryW(wstr)
+@ stub RemoveLocalAlternateComputerNameA
+@ stub RemoveLocalAlternateComputerNameW
+@ stdcall RemoveVectoredExceptionHandler(ptr) ntdll.RtlRemoveVectoredExceptionHandler
+@ stdcall ReplaceFile(wstr wstr wstr long ptr ptr) ReplaceFileW
+@ stdcall ReplaceFileA(str str str long ptr ptr)
+@ stdcall ReplaceFileW(wstr wstr wstr long ptr ptr)
+@ stub RequestDeviceWakeup
+@ stdcall RequestWakeupLatency(long)
+@ stdcall ResetEvent(long)
+@ stub ResetWriteWatch
+@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
+@ stdcall ResumeThread(long)
+@ stdcall RtlCaptureContext(ptr) ntdll.RtlCaptureContext
+@ stdcall RtlCaptureStackBackTrace(long long ptr ptr) ntdll.RtlCaptureStackBackTrace
+@ stdcall RtlFillMemory(ptr long long) ntdll.RtlFillMemory
+@ stdcall RtlMoveMemory(ptr ptr long) ntdll.RtlMoveMemory
+@ stdcall RtlUnwind(ptr ptr ptr long) ntdll.RtlUnwind
+@ stdcall RtlZeroMemory(ptr long) ntdll.RtlZeroMemory
+@ stdcall ScrollConsoleScreenBufferA(long ptr ptr ptr ptr)
+@ stdcall ScrollConsoleScreenBufferW(long ptr ptr ptr ptr)
+@ stdcall SearchPathA(str str str long ptr ptr)
+@ stdcall SearchPathW(wstr wstr wstr long ptr ptr)
+@ stdcall SetCPGlobal(long)
+@ stdcall SetCalendarInfoA(long long long str)
+@ stdcall SetCalendarInfoW(long long long wstr)
+@ stub SetClientTimeZoneInformation
+@ stub SetComPlusPackageInstallStatus
+@ stdcall SetCommBreak(long)
+@ stdcall SetCommConfig(long ptr long)
+@ stdcall SetCommMask(long ptr)
+@ stdcall SetCommState(long ptr)
+@ stdcall SetCommTimeouts(long ptr)
+@ stdcall SetComputerNameA(str)
+@ stdcall SetComputerNameExA(long str)
+@ stdcall SetComputerNameExW(long wstr)
+@ stdcall SetComputerNameW(wstr)
+@ stdcall SetConsoleActiveScreenBuffer(long)
+@ stdcall SetConsoleCP(long)
+@ stub SetConsoleCommandHistoryMode
+@ stdcall SetConsoleCtrlHandler(ptr long)
+@ stub SetConsoleCursor
+@ stdcall SetConsoleCursorInfo(long ptr)
+@ stub SetConsoleCursorMode
+@ stdcall SetConsoleCursorPosition(long long)
+@ stdcall SetConsoleDisplayMode(long long ptr)
+@ stub SetConsoleFont
+@ stub SetConsoleHardwareState
+@ stub SetConsoleIcon
+@ stdcall SetConsoleInputExeNameA(ptr)
+@ stdcall SetConsoleInputExeNameW(ptr)
+@ stub SetConsoleKeyShortcuts
+@ stub SetConsoleLocalEUDC
+@ stub SetConsoleMaximumWindowSize
+@ stub SetConsoleMenuClose
+@ stdcall SetConsoleMode(long long)
+@ stub SetConsoleNlsMode
+@ stub SetConsoleNumberOfCommandsA
+@ stub SetConsoleNumberOfCommandsW
+@ stub SetConsoleOS2OemFormat
+@ stdcall SetConsoleOutputCP(long)
+@ stub SetConsolePalette
+@ stdcall SetConsoleScreenBufferSize(long long)
+@ stdcall SetConsoleTextAttribute(long long)
+@ stdcall SetConsoleTitleA(str)
+@ stdcall SetConsoleTitleW(wstr)
+@ stdcall SetConsoleWindowInfo(long long ptr)
+@ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount
+@ stdcall SetCurrentDirectoryA(str)
+@ stdcall SetCurrentDirectoryW(wstr)
+@ stub SetDaylightFlag
+@ stdcall SetDefaultCommConfigA(str ptr long)
+@ stdcall SetDefaultCommConfigW(wstr ptr long)
+@ stdcall SetDllDirectoryA(str)
+@ stdcall SetDllDirectoryW(wstr)
+@ stdcall SetEndOfFile(long)
+@ stdcall SetEnvironmentVariableA(str str)
+@ stdcall SetEnvironmentVariableW(wstr wstr)
+@ stdcall SetErrorMode(long)
+@ stdcall SetEvent(long)
+@ stdcall SetFileApisToANSI()
+@ stdcall SetFileApisToOEM()
+@ stdcall SetFileAttributesA(str long)
+@ stdcall SetFileAttributesW(wstr long)
+@ stdcall SetFilePointer(long long ptr long)
+@ stdcall SetFilePointerEx(long double ptr long)
+@ stub SetFileShortNameA
+@ stub SetFileShortNameW
+@ stdcall SetFileTime(long ptr ptr ptr)
+@ stub SetFileValidData
+@ stub SetFirmwareEnvironmentVariableA
+@ stub SetFirmwareEnvironmentVariableW
+@ stdcall SetHandleContext(long long)
+@ stdcall SetHandleCount(long)
+@ stdcall SetHandleInformation(long long long)
+@ stub SetInformationJobObject
+@ stub SetastConsoleEventActive
+@ stdcall SetLastError(long)
+@ stub SetocalPrimaryComputerNameA
+@ stub SetocalPrimaryComputerNameW
+@ stdcall SetLocalTime(ptr)
+@ stdcall SetLocaleInfoA(long long str)
+@ stdcall SetLocaleInfoW(long long wstr)
+@ stdcall SetMailslotInfo(long long)
+@ stub SetMessageWaitingIndicator
+@ stdcall SetNamedPipeHandleState(long ptr ptr ptr)
+@ stdcall SetPriorityClass(long long)
+@ stdcall SetProcessAffinityMask(long long)
+@ stdcall SetProcessPriorityBoost(long long)
+@ stdcall SetProcessShutdownParameters(long long)
+@ stdcall SetProcessWorkingSetSize(long long long)
+@ stdcall SetStdHandle(long long)
+@ stdcall SetSystemPowerState(long long)
+@ stdcall SetSystemTime(ptr)
+@ stdcall SetSystemTimeAdjustment(long long)
+@ stdcall SetTapeParameters(ptr long ptr)
+@ stdcall SetTapePosition(ptr long long long long long)
+@ stdcall SetTermsrvAppInstallMode(long)
+@ stdcall SetThreadAffinityMask(long long)
+@ stdcall SetThreadContext(long ptr)
+@ stdcall SetThreadExecutionState(long)
+@ stdcall SetThreadIdealProcessor(long long)
+@ stdcall SetThreadLocale(long)
+@ stdcall SetThreadPriority(long long)
+@ stdcall SetThreadPriorityBoost(long long)
+@ stdcall SetThreadUILanguage(long)
+@ stdcall SetTimeZoneInformation(ptr)
+@ stub SetTimerQueueTimer
+@ stdcall SetUnhandledExceptionFilter(ptr)
+@ stdcall SetUserGeoID(long)
+@ stub SetVDMCurrentDirectories
+@ stdcall SetVolumeLabelA(str str)
+@ stdcall SetVolumeLabelW(wstr wstr)
+@ stub SetVolumeMountPointA
+@ stub SetVolumeMountPointW
+@ stdcall SetWaitableTimer(long ptr long ptr ptr long)
+@ stdcall SetupComm(long long long)
+@ stub ShowConsoleCursor
+@ stdcall SignalObjectAndWait(long long long long)
+@ stdcall SizeofResource(long long)
+@ stdcall Sleep(long)
+@ stdcall SleepEx(long long)
+@ stdcall SuspendThread(long)
+@ stdcall SwitchToFiber(ptr)
+@ stdcall SwitchToThread()
+@ stdcall SystemTimeToFileTime(ptr ptr)
+@ stdcall SystemTimeToTzSpecificLocalTime (ptr ptr ptr)
+@ stub TerminateJobObject
+@ stdcall TerminateProcess(long long)
+@ stdcall TerminateThread(long long)
+@ stdcall TermsrvAppInstallMode()
+@ stdcall Thread32First(long ptr)
+@ stdcall Thread32Next(long ptr)
+@ stdcall TlsAlloc()
+@ stub TlsAllocInternal
+@ stdcall TlsFree(long)
+@ stub TlsFreeInternal
+@ stdcall TlsGetValue(long)
+@ stdcall TlsSetValue(long ptr)
+@ stdcall Toolhelp32ReadProcessMemory(long ptr ptr long ptr)
+@ stdcall TransactNamedPipe(long ptr long ptr long ptr ptr)
+@ stdcall TransmitCommChar(long long)
+@ stdcall TrimVirtualBuffer(ptr)
+@ stdcall TryEnterCriticalSection(ptr) ntdll.RtlTryEnterCriticalSection
+@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)
+@ stdcall UTRegister(long str str str ptr ptr ptr)
+@ stdcall UTUnRegister(long)
+@ stdcall UnhandledExceptionFilter(ptr)
+@ stdcall UnlockFile(long long long long long)
+@ stdcall UnlockFileEx(long long long long ptr)
+@ stdcall UnmapViewOfFile(ptr)
+@ stub UnregisterConsoleIME
+@ stdcall UnregisterWait(long)
+@ stdcall UnregisterWaitEx(long long)
+@ stdcall UpdateResourceA(long str str long ptr long)
+@ stdcall UpdateResourceW(long wstr wstr long ptr long)
+@ stub VDMConsoleOperation
+@ stub VDMOperationStarted
+@ stub ValidateCType
+@ stub ValidatLeocale
+@ stdcall VerLanguageNameA(long str long)
+@ stdcall VerLanguageNameW(long wstr long)
+@ stdcall -ret64 VerSetConditionMask(long long long long) ntdll.VerSetConditionMask
+@ stdcall VerifyConsoleIoHandle(long)
+@ stdcall VerifyVersionInfoA(long long double)
+@ stdcall VerifyVersionInfoW(long long double)
+@ stdcall VirtualAlloc(ptr long long long)
+@ stdcall VirtualAllocEx(long ptr long long long)
+@ stub VirtualBufferExceptionHandler
+@ stdcall VirtualFree(ptr long long)
+@ stdcall VirtualFreeEx(long ptr long long)
+@ stdcall VirtualLock(ptr long)
+@ stdcall VirtualProtect(ptr long long ptr)
+@ stdcall VirtualProtectEx(long ptr long long ptr)
+@ stdcall VirtualQuery(ptr ptr long)
+@ stdcall VirtualQueryEx(long ptr ptr long)
+@ stdcall VirtualUnlock(ptr long)
+@ stdcall WakeAllConditionVariable(ptr) ntdll.RtlWakeAllConditionVariable
+@ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable
+@ stdcall WaitCommEvent(long ptr ptr)
+@ stdcall WaitForDebugEvent(ptr long)
+@ stdcall WaitForMultipleObjects(long ptr long long)
+@ stdcall WaitForMultipleObjectsEx(long ptr long long long)
+@ stdcall WaitForSingleObject(long long)
+@ stdcall WaitForSingleObjectEx(long long long)
+@ stdcall WaitNamedPipeA (str long)
+@ stdcall WaitNamedPipeW (wstr long)
+@ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr)
+@ stdcall WinExec(str long)
+@ stdcall Wow64EnableWow64FsRedirection(long)
+@ stdcall Wow64DisableWow64FsRedirection(long)
+@ stdcall Wow64RevertWow64FsRedirection(long)
+@ stdcall WriteConsoleA(long ptr long ptr ptr)
+@ stdcall WriteConsoleInputA(long ptr long ptr)
+@ stub WriteConsoleInputVDMA
+@ stub WriteConsoleInputVDMW
+@ stdcall WriteConsoleInputW(long ptr long ptr)
+@ stdcall WriteConsoleOutputA(long ptr long long ptr)
+@ stdcall WriteConsoleOutputAttribute(long ptr long long ptr)
+@ stdcall WriteConsoleOutputCharacterA(long ptr long long ptr)
+@ stdcall WriteConsoleOutputCharacterW(long ptr long long ptr)
+@ stdcall WriteConsoleOutputW(long ptr long long ptr)
+@ stdcall WriteConsoleW(long ptr long ptr ptr)
+@ stdcall WriteFile(long ptr long ptr ptr)
+@ stdcall WriteFileEx(long ptr long ptr ptr)
+@ stdcall WriteFileGather(long ptr long ptr ptr)
+@ stdcall WritePrivateProfileSectionA(str str str)
+@ stdcall WritePrivateProfileSectionW(wstr wstr wstr)
+@ stdcall WritePrivateProfileStringA(str str str str)
+@ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr)
+@ stdcall WritePrivateProfileStructA (str str ptr long str)
+@ stdcall WritePrivateProfileStructW(wstr wstr ptr long wstr)
+@ stdcall WriteProcessMemory(long ptr ptr long ptr)
+@ stdcall WriteProfileSectionA(str str)
+@ stdcall WriteProfileSectionW(str str)
+@ stdcall WriteProfileStringA(str str str)
+@ stdcall WriteProfileStringW(wstr wstr wstr)
+@ stdcall WriteTapemark(ptr long long long)
+@ stdcall WTSGetActiveConsoleSessionId()
+@ stdcall ZombifyActCtx(ptr)
+@ stub _DebugOut
+@ stub _DebugPrintf
+@ stdcall _hread(long ptr long)
+@ stdcall _hwrite(long ptr long)
+@ stdcall _lclose(long)
+@ stdcall _lcreat(str long)
+@ stdcall _llseek(long long long)
+@ stdcall _lopen(str long)
+@ stdcall _lread(long ptr long) _hread
+@ stdcall _lwrite(long ptr long) _hwrite
+@ stub dprintf
+@ stdcall lstrcat(str str) lstrcatA
+@ stdcall lstrcatA(str str)
+@ stdcall lstrcatW(wstr wstr)
+@ stdcall lstrcmp(str str) lstrcmpA
+@ stdcall lstrcmpA(str str)
+@ stdcall lstrcmpW(wstr wstr)
+@ stdcall lstrcmpi(str str) lstrcmpiA
+@ stdcall lstrcmpiA(str str)
+@ stdcall lstrcmpiW(wstr wstr)
+@ stdcall lstrcpy(ptr str) lstrcpyA
+@ stdcall lstrcpyA(ptr str)
+@ stdcall lstrcpyW(ptr wstr)
+@ stdcall lstrcpyn(ptr str long) lstrcpynA
+@ stdcall lstrcpynA(ptr str long)
+@ stdcall lstrcpynW(ptr wstr long)
+@ stdcall lstrlen(str) lstrlenA
+@ stdcall lstrlenA(str)
+@ stdcall lstrlenW(wstr)
+
+#EOF
return _InterlockedDecrement(lpAddend);
}
+#undef InterlockedExchange
LONG
WINAPI
InterlockedExchange(IN OUT LONG volatile *Target,
DWORD Flags;
Ppb = NtCurrentPeb()->ProcessParameters;
- switch ((ULONG)hObject)
+ switch ((ULONG_PTR)hObject)
{
case STD_INPUT_HANDLE:
hObject = Ppb->StandardInput;
STUB;
return FALSE;
}
+
+BOOL WINAPI TermsrvAppInstallMode(void)
+{
+ STUB;
+ return FALSE;
+}
+
+DWORD WINAPI SetTermsrvAppInstallMode(BOOL bInstallMode)
+{
+ STUB;
+ return 0;
+}
#include <k32.h>
#ifdef _M_IX86
#include "i386/ketypes.h"
+#elif defined _M_AMD64
+#include "amd64/ketypes.h"
#endif
#define NDEBUG
IN PVOID StackAddress,
IN ULONG ContextType)
{
-#ifdef _M_IX86
+#ifdef __i386__
DPRINT("BasepInitializeContext: %p\n", Context);
/* Setup the Initial Win32 Thread Context */
}
else if (ContextType == 2) /* For Fibers */
{
- //Context->Eip = (ULONG)BaseFiberStartup;
+ Context->Eip = (ULONG)BaseFiberStartup;
}
else /* For first thread in a Process */
{
/* Give it some room for the Parameter */
Context->Esp -= sizeof(PVOID);
+#elif defined(__x86_64__)
+ DPRINT("BasepInitializeContext: %p\n", Context);
+
+ /* Setup the Initial Win32 Thread Context */
+ Context->Rax = (ULONG_PTR)StartAddress;
+ Context->Rbx = (ULONG_PTR)Parameter;
+ Context->Rsp = (ULONG_PTR)StackAddress;
+ /* The other registers are undefined */
+
+ /* Setup the Segments */
+ Context->SegFs = KGDT_R3_TEB | RPL_MASK;
+ Context->SegEs = KGDT_R3_DATA | RPL_MASK;
+ Context->SegDs = KGDT_R3_DATA | RPL_MASK;
+ Context->SegCs = KGDT_R3_CODE | RPL_MASK;
+ Context->SegSs = KGDT_R3_DATA | RPL_MASK;
+ Context->SegGs = 0;
+
+ /* Set the EFLAGS */
+ Context->EFlags = 0x3000; /* IOPL 3 */
+
+ if (ContextType == 1) /* For Threads */
+ {
+ Context->Rip = (ULONG_PTR)BaseThreadStartupThunk;
+ }
+ else if (ContextType == 2) /* For Fibers */
+ {
+ Context->Rip = (ULONG_PTR)BaseFiberStartup;
+ }
+ else /* For first thread in a Process */
+ {
+ Context->Rip = (ULONG_PTR)BaseProcessStartThunk;
+ }
+
+ /* Set the Context Flags */
+ Context->ContextFlags = CONTEXT_FULL;
+
+ /* Give it some room for the Parameter */
+ Context->Rsp -= sizeof(PVOID);
#else
#warning Unknown architecture
UNIMPLEMENTED;
return FALSE;
}
- ClientId.UniqueProcess = (HANDLE)dwProcessId;
+ ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)dwProcessId;
ClientId.UniqueThread = 0;
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
return TRUE;
}
+/*
+ * @implemented
+ */
+#if 0
+BOOL WINAPI InitializeCriticalSectionEx( CRITICAL_SECTION *crit, DWORD spincount, DWORD flags )
+{
+ NTSTATUS ret = RtlInitializeCriticalSectionEx( crit, spincount, flags );
+ if (ret) RtlRaiseStatus( ret );
+ return !ret;
+}
+#endif
/* EOF */
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/kernel32/thread/i386/fiber.S
+ * PURPOSE: Fiber context switch code for the x86 architecture
+ * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
+ * KJK::Hyperion <noog@libero.it>
+ */
+
+#include <ndk/asm.h>
+
+#define CONTEXT_FULL 0x10007
+#define CONTEXT_FLOATING_POINT 0xF
+
+.globl _SwitchToFiber@4
+.intel_syntax noprefix
+
+_SwitchToFiber@4:
+ /* Get the TEB */
+ mov edx, fs:[KGDT_R3_TEB]
+
+ /* Get the Fiber */
+ mov eax, [edx+TEB_FIBER_DATA]
+
+ /* Save the non-volatile registers */
+ mov [eax+FIBER_CONTEXT_EBX], ebx
+ mov [eax+FIBER_CONTEXT_ESI], esi
+ mov [eax+FIBER_CONTEXT_EDI], edi
+ mov [eax+FIBER_CONTEXT_EBP], ebp
+
+ /* Check if we're to save FPU State */
+ cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL + CONTEXT_FLOATING_POINT
+ jnz NoFpuStateSave
+
+ /* Save the FPU State (Status and Control)*/
+ fstsw [eax+FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD]
+ fstcw [eax+FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD]
+
+ /* Check if the CPU supports SIMD MXCSR State Save */
+ cmp byte ptr ds:[PROCESSOR_FEATURE_FXSR], 0
+ jnz NoFpuStateSave
+ stmxcsr [eax+FIBER_CONTEXT_DR6]
+
+NoFpuStateSave:
+
+ /* Save stack since we're not touching it anymore */
+ mov [eax+FIBER_CONTEXT_ESP], esp
+
+ /* Transfer some data from the TEB */
+ mov ecx, [edx+TEB_FLS_DATA]
+ mov [eax+FIBER_FLS_DATA], ecx
+ mov ecx, [edx+TEB_ACTIVATION_CONTEXT_STACK_POINTER]
+ mov [eax+FIBER_ACTIVATION_CONTEXT_STACK], ecx
+
+ /* Transfer some data related to the Stack */
+ mov ecx, [edx+TEB_EXCEPTION_LIST]
+ mov [eax+FIBER_EXCEPTION_LIST], ecx
+ mov ecx, [edx+TEB_STACK_LIMIT]
+ mov [eax+FIBER_STACK_LIMIT], ecx
+ mov ecx, [edx+TEB_GUARANTEED_STACK_BYTES]
+ mov [eax+FIBER_GUARANTEED_STACK_BYTES], ecx
+
+ /* Switch to the new fiber */
+ mov ecx, [esp+4]
+ mov [edx+TEB_FIBER_DATA], ecx
+
+ /* Switch Fiber Data */
+ mov esi, [ecx+FIBER_EXCEPTION_LIST]
+ mov [edx+TEB_EXCEPTION_LIST], esi
+ mov esi, [ecx+FIBER_STACK_BASE]
+ mov [edx+TEB_STACK_BASE], esi
+ mov esi, [ecx+FIBER_STACK_LIMIT]
+ mov [edx+TEB_STACK_LIMIT], esi
+ mov esi, [ecx+FIBER_DEALLOCATION_STACK]
+ mov [edx+TEB_DEALLOCATION_STACK], esi
+ mov esi, [ecx+FIBER_GUARANTEED_STACK_BYTES]
+ mov [edx+TEB_GUARANTEED_STACK_BYTES], esi
+ mov esi, [ecx+FIBER_ACTIVATION_CONTEXT_STACK]
+ mov [edx+TEB_ACTIVATION_CONTEXT_STACK_POINTER], esi
+
+ /* Restore FPU State */
+ cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL + CONTEXT_FLOATING_POINT
+ jnz NoFpuStateRestore
+
+ /* Check if the Status Word Changed */
+ mov esi, [eax+FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD]
+ cmp si, word ptr [ecx+FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD]
+ jnz StatusWordChanged
+
+ /* Check if the Control Word Changed */
+ mov esi, [eax+FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD]
+ cmp si, word ptr [ecx+FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD]
+ jz ControlWordEqual
+
+StatusWordChanged:
+
+ /* Load the new one */
+ mov word ptr [ecx+FIBER_CONTEXT_FLOAT_SAVE_TAG_WORD], 0xFFFF
+ fldenv [ecx+FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD]
+
+ControlWordEqual:
+
+ /* Load the new one */
+ cmp byte ptr ds:[PROCESSOR_FEATURE_FXSR], 0
+ jnz NoFpuStateRestore
+ ldmxcsr [ecx+FIBER_CONTEXT_DR6]
+
+NoFpuStateRestore:
+
+ /* Restore non-volatile registers */
+ mov esi, [ecx+FIBER_CONTEXT_ESI]
+ mov edi, [ecx+FIBER_CONTEXT_EDI]
+ mov ebx, [ecx+FIBER_CONTEXT_EBX]
+ mov ebp, [ecx+FIBER_CONTEXT_EBP]
+ mov esp, [ecx+FIBER_CONTEXT_ESP]
+
+ /* Restore FLS Data */
+ mov eax, [ecx+FIBER_FLS_DATA]
+ mov [edx+TEB_FLS_DATA], eax
+
+ /* Return */
+ ret 4
+
+/* EOF */
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/kernel32/thread/i386/thread.S
+ * PURPOSE: Thread Start Thunks
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+.globl _BaseThreadStartupThunk@0
+.globl _BaseProcessStartThunk@0
+.intel_syntax noprefix
+
+_BaseThreadStartupThunk@0:
+
+ /* Start out fresh */
+ xor rbp, rbp
+
+ push rbx /* lpParameter */
+ push rax /* lpStartAddress */
+ push 0 /* Return RIP */
+ jmp _BaseThreadStartup
+
+_BaseProcessStartThunk@0:
+
+ /* Start out fresh */
+ xor rbp, rbp
+
+ push rax /* lpStartAddress */
+ push 0 /* Return RIP */
+ jmp _BaseProcessStartup
+
+/* EOF */
DPRINT1("Starting Fiber\n");
BaseThreadStartup((LPTHREAD_START_ROUTINE)Fiber->Context.Eax,
(LPVOID)Fiber->Context.Ebx);
+#elif defined(__x86_64__)
+ PFIBER Fiber = GetFiberData();
+
+ /* Call the Thread Startup Routine */
+ DPRINT1("Starting Fiber\n");
+ BaseThreadStartup((LPTHREAD_START_ROUTINE)Fiber->Context.Rax,
+ (LPVOID)Fiber->Context.Rbx);
#else
#warning Unknown architecture
UNIMPLEMENTED;
IN DWORD dwSelector,
OUT LPLDT_ENTRY lpSelectorEntry)
{
+#ifdef _M_IX86
DESCRIPTOR_TABLE_ENTRY DescriptionTableEntry;
NTSTATUS Status;
*lpSelectorEntry = DescriptionTableEntry.Descriptor;
return TRUE;
+#else
+ DPRINT1("Calling GetThreadSelectorEntry!\n");
+ return FALSE;
+#endif
}
/*
<include base="bootvid">.</include>
<library>ntoskrnl</library>
<library>hal</library>
- <if property="ARCH" value="i386">
+ <if property="PLATFORM" value="PC">
<directory name="i386">
<file>bootvid.c</file>
<file>bootdata.c</file>
--- /dev/null
+LIBRARY BOOTVID.DLL
+
+EXPORTS
+VidBitBlt
+VidBufferToScreenBlt
+VidCleanUp
+VidDisplayString
+VidDisplayStringXY
+VidInitialize
+VidResetDisplay
+VidScreenToBufferBlt
+VidSetScrollRegion
+VidSetTextColor
+VidSolidColorFill
+
NTAPI
VidInitialize(IN BOOLEAN SetMode)
{
- ULONG Context = 0;
+ ULONG_PTR Context = 0;
PHYSICAL_ADDRESS TranslatedAddress;
PHYSICAL_ADDRESS NullAddress = {{0}};
ULONG AddressSpace = 1;
do
{
/* Write value in the new position so that we can do the scroll */
- WRITE_REGISTER_UCHAR((PUCHAR)j,
- READ_REGISTER_UCHAR((PUCHAR)j + i));
+ WRITE_REGISTER_UCHAR(UlongToPtr(j),
+ READ_REGISTER_UCHAR(UlongToPtr(j + i)));
/* Move to the next memory location to write to */
j++;
__outpw(0x3CE, 7);
/* Calculate pixel position for the read */
- Offset = VgaBase + (Top * 80) + (PUCHAR)LeftOffset;
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)LeftOffset;
/* Select the bitmask register and write the mask */
__outpw(0x3CE, (USHORT)lMask);
if (Distance)
{
/* Calculate new pixel position */
- Offset = VgaBase + (Top * 80) + (PUCHAR)RightOffset;
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)RightOffset;
Distance--;
/* Select the bitmask register and write the mask */
if (Distance)
{
/* Calculate new pixel position */
- Offset = VgaBase + (Top * 80) + (PUCHAR)(LeftOffset + 1);
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)(LeftOffset + 1);
/* Set the bitmask to 0xFF for all 4 planes */
__outpw(0x3CE, 0xFF08);
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: drivers/base/kdcom/kdbg.c
+ * PURPOSE: Serial i/o functions for the kernel debugger.
+ * PROGRAMMER: Alex Ionescu
+ * Hervé Poussineau
+ */
+
+/* INCLUDES *****************************************************************/
+
+#define NOEXTAPI
+#include <ntddk.h>
+#define NDEBUG
+#include <halfuncs.h>
+#include <stdio.h>
+#include <debug.h>
+#include "arc/arc.h"
+#include "windbgkd.h"
+#include <kddll.h>
+#include <ioaccess.h> /* port intrinsics */
+
+typedef struct _KD_PORT_INFORMATION
+{
+ ULONG ComPort;
+ ULONG BaudRate;
+ ULONG BaseAddress;
+} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
+
+BOOLEAN
+NTAPI
+KdPortInitializeEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ IN ULONG Unknown1,
+ IN ULONG Unknown2);
+
+BOOLEAN
+NTAPI
+KdPortGetByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ OUT PUCHAR ByteReceived);
+
+BOOLEAN
+NTAPI
+KdPortPollByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ OUT PUCHAR ByteReceived);
+
+VOID
+NTAPI
+KdPortPutByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ IN UCHAR ByteToSend);
+
+#define DEFAULT_BAUD_RATE 19200
+
+#ifdef _M_IX86
+const ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
+#elif defined(_M_PPC)
+const ULONG BaseArray[2] = {0, 0x800003f8};
+#elif defined(_M_MIPS)
+const ULONG BaseArray[3] = {0, 0x80006000, 0x80007000};
+#elif defined(_M_ARM)
+const ULONG BaseArray[2] = {0, 0xF1012000};
+#elif defined(_M_AMD64)
+const ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
+#else
+#error Unknown architecture
+#endif
+
+/* MACROS *******************************************************************/
+
+#define SER_RBR(x) ((PUCHAR)(x)+0)
+#define SER_THR(x) ((PUCHAR)(x)+0)
+#define SER_DLL(x) ((PUCHAR)(x)+0)
+#define SER_IER(x) ((PUCHAR)(x)+1)
+#define SR_IER_ERDA 0x01
+#define SR_IER_ETHRE 0x02
+#define SR_IER_ERLSI 0x04
+#define SR_IER_EMS 0x08
+#define SR_IER_ALL 0x0F
+#define SER_DLM(x) ((PUCHAR)(x)+1)
+#define SER_IIR(x) ((PUCHAR)(x)+2)
+#define SER_FCR(x) ((PUCHAR)(x)+2)
+#define SR_FCR_ENABLE_FIFO 0x01
+#define SR_FCR_CLEAR_RCVR 0x02
+#define SR_FCR_CLEAR_XMIT 0x04
+#define SER_LCR(x) ((PUCHAR)(x)+3)
+#define SR_LCR_CS5 0x00
+#define SR_LCR_CS6 0x01
+#define SR_LCR_CS7 0x02
+#define SR_LCR_CS8 0x03
+#define SR_LCR_ST1 0x00
+#define SR_LCR_ST2 0x04
+#define SR_LCR_PNO 0x00
+#define SR_LCR_POD 0x08
+#define SR_LCR_PEV 0x18
+#define SR_LCR_PMK 0x28
+#define SR_LCR_PSP 0x38
+#define SR_LCR_BRK 0x40
+#define SR_LCR_DLAB 0x80
+#define SER_MCR(x) ((PUCHAR)(x)+4)
+#define SR_MCR_DTR 0x01
+#define SR_MCR_RTS 0x02
+#define SR_MCR_OUT1 0x04
+#define SR_MCR_OUT2 0x08
+#define SR_MCR_LOOP 0x10
+#define SER_LSR(x) ((PUCHAR)(x)+5)
+#define SR_LSR_DR 0x01
+#define SR_LSR_TBE 0x20
+#define SER_MSR(x) ((PUCHAR)(x)+6)
+#define SR_MSR_CTS 0x10
+#define SR_MSR_DSR 0x20
+#define SER_SCR(x) ((PUCHAR)(x)+7)
+
+
+/* GLOBAL VARIABLES *********************************************************/
+
+/* STATIC VARIABLES *********************************************************/
+
+//static KD_PORT_INFORMATION DefaultPort = { 0, 0, 0 };
+
+/* The com port must only be initialized once! */
+//static BOOLEAN PortInitialized = FALSE;
+
+
+/* STATIC FUNCTIONS *********************************************************/
+
+/*
+static BOOLEAN
+KdpDoesComPortExist(
+ IN ULONG BaseAddress)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+*/
+
+/* FUNCTIONS ****************************************************************/
+
+NTSTATUS
+DriverEntry(
+ IN PDRIVER_OBJECT DriverObject,
+ IN PUNICODE_STRING RegistryPath)
+{
+ return STATUS_SUCCESS;
+}
+
+/* HAL.KdPortInitialize */
+BOOLEAN
+NTAPI
+KdPortInitialize(
+ IN PKD_PORT_INFORMATION PortInformation,
+ IN ULONG Unknown1,
+ IN ULONG Unknown2)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/* HAL.KdPortInitializeEx */
+BOOLEAN
+NTAPI
+KdPortInitializeEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ IN ULONG Unknown1,
+ IN ULONG Unknown2)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/* HAL.KdPortGetByte */
+BOOLEAN
+NTAPI
+KdPortGetByte(
+ OUT PUCHAR ByteReceived)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/* HAL.KdPortGetByteEx */
+BOOLEAN
+NTAPI
+KdPortGetByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ OUT PUCHAR ByteReceived)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/* HAL.KdPortPollByte */
+BOOLEAN
+NTAPI
+KdPortPollByte(
+ OUT PUCHAR ByteReceived)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/* HAL.KdPortPollByteEx */
+BOOLEAN
+NTAPI
+KdPortPollByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ OUT PUCHAR ByteReceived)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+/* HAL.KdPortPutByte */
+VOID
+NTAPI
+KdPortPutByte(
+ IN UCHAR ByteToSend)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/* HAL.KdPortPutByteEx */
+VOID
+NTAPI
+KdPortPutByteEx(
+ IN PKD_PORT_INFORMATION PortInformation,
+ IN UCHAR ByteToSend)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+
+/* HAL.KdPortRestore */
+VOID
+NTAPI
+KdPortRestore(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+
+/* HAL.KdPortSave */
+VOID
+NTAPI
+KdPortSave(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+
+/* HAL.KdPortDisableInterrupts */
+BOOLEAN
+NTAPI
+KdPortDisableInterrupts(VOID)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+
+/* HAL.KdPortEnableInterrupts */
+BOOLEAN
+NTAPI
+KdPortEnableInterrupts(VOID)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+NTAPI
+KdDebuggerInitialize0(
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+NTAPI
+KdDebuggerInitialize1(
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/*
+ * @implemented
+ */
+NTSTATUS
+NTAPI
+KdSave(
+ IN BOOLEAN SleepTransition)
+{
+ /* Nothing to do on COM ports */
+ return STATUS_SUCCESS;
+}
+
+/*
+ * @implemented
+ */
+NTSTATUS
+NTAPI
+KdRestore(
+ IN BOOLEAN SleepTransition)
+{
+ /* Nothing to do on COM ports */
+ return STATUS_SUCCESS;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
+KdSendPacket(
+ IN ULONG PacketType,
+ IN PSTRING MessageHeader,
+ IN PSTRING MessageData,
+ IN OUT PKD_CONTEXT Context)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/*
+ * @unimplemented
+ */
+KDSTATUS
+NTAPI
+KdReceivePacket(
+ IN ULONG PacketType,
+ OUT PSTRING MessageHeader,
+ OUT PSTRING MessageData,
+ OUT PULONG DataLength,
+ IN OUT PKD_CONTEXT Context)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/* EOF */
</directory>
</if>
<if property="ARCH" value="arm">
- <directory name="arm">
+ <directory name="arm">
+ <file>kdbg.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
<file>kdbg.c</file>
</directory>
</if>
/* Register GUID_DEVICE_SYS_BUTTON interface and report capability */
if (DeviceExtension->NewCaps != DeviceExtension->ReportedCaps)
{
- WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL);
+ WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL);
if (WaitingIrp)
{
/* Cancel the current power irp, as capability changed */
}
/* Directly complete the IOCTL_GET_SYS_BUTTON_EVENT Irp (if any) */
- WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL);
+ WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL);
if (WaitingIrp)
{
PULONG pEvent = (PULONG)WaitingIrp->AssociatedIrp.SystemBuffer;
else
{
WaitingIrp = InterlockedCompareExchangePointer(
- &DeviceExtension->PowerIrp,
+ (PVOID)&DeviceExtension->PowerIrp,
Irp,
NULL);
/* Check if an Irp is already pending */
PowerKey = InterlockedExchange((PLONG)&DeviceExtension->LastPowerKey, 0);
if (PowerKey != 0)
{
- (VOID)InterlockedCompareExchangePointer(&DeviceExtension->PowerIrp, NULL, Irp);
+ (VOID)InterlockedCompareExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL, Irp);
*(PULONG)Irp->AssociatedIrp.SystemBuffer = PowerKey;
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].Flags = CM_RESOURCE_INTERRUPT_LATCHED;
AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level = KEYBOARD_IRQ;
AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector = 0;
- AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (KAFFINITY)-1;
+ AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (LONG_PTR)(KAFFINITY)-1;
/* Create default resource list translated */
AllocatedResourcesTranslated = ExAllocatePoolWithTag(PagedPool, ResourceListSize, I8042PRT_TAG);
AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level,
AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector,
(PKIRQL)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level,
- &AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity);
+ (PVOID)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity);
/* Send IRP_MN_START_DEVICE */
TopDeviceObject = IoGetAttachedDeviceReference(Pdo);
--- /dev/null
+; NDIS Kernel Module - ReactOS Operating System
+
+LIBRARY NDIS.SYS
+
+EXPORTS
+ArcFilterDprIndicateReceive
+ArcFilterDprIndicateReceiveComplete
+EthFilterDprIndicateReceive
+EthFilterDprIndicateReceiveComplete
+FddiFilterDprIndicateReceive
+FddiFilterDprIndicateReceiveComplete
+NDIS_BUFFER_TO_SPAN_PAGES
+NdisAcquireReadWriteLock
+NdisAcquireSpinLock
+NdisAdjustBufferLength
+NdisAllocateBuffer
+NdisAllocateBufferPool
+NdisAllocateDmaChannel
+NdisAllocateMemory
+NdisAllocateMemoryWithTag
+NdisAllocatePacket
+NdisAllocatePacketPool
+NdisAllocatePacketPoolEx
+NdisAllocateSharedMemory
+NdisAllocateSpinLock
+NdisAnsiStringToUnicodeString
+NdisBufferLength
+NdisBufferVirtualAddress
+NdisCancelTimer
+NdisClAddParty
+NdisClCloseAddressFamily
+NdisClCloseCall
+NdisClDeregisterSap
+NdisClDropParty
+NdisClIncomingCallComplete
+NdisClMakeCall
+NdisClModifyCallQoS
+NdisClOpenAddressFamily
+NdisClRegisterSap
+NdisCloseAdapter
+NdisCloseConfiguration
+NdisCloseFile
+NdisCmActivateVc
+NdisCmAddPartyComplete
+NdisCmCloseAddressFamilyComplete
+NdisCmCloseCallComplete
+NdisCmDeactivateVc
+NdisCmDeregisterSapComplete
+NdisCmDispatchCallConnected
+NdisCmDispatchIncomingCall
+NdisCmDispatchIncomingCallQoSChange
+NdisCmDispatchIncomingCloseCall
+NdisCmDispatchIncomingDropParty
+NdisCmDropPartyComplete
+NdisCmMakeCallComplete
+NdisCmModifyCallQoSComplete
+NdisCmOpenAddressFamilyComplete
+NdisCmRegisterAddressFamily
+NdisCmRegisterSapComplete
+NdisCoCreateVc
+NdisCoDeleteVc
+NdisCoRequest
+NdisCoRequestComplete
+NdisCoSendPackets
+;NdisCompareAnsiString ?
+;NdisCompareUnicodeString ?
+NdisCompleteBindAdapter
+NdisCompleteCloseAdapter
+NdisCompleteDmaTransfer
+NdisCompleteOpenAdapter
+NdisCompletePnPEvent
+NdisCompleteQueryStatistics
+NdisCompleteUnbindAdapter
+NdisConvertStringToAtmAddress
+NdisCopyBuffer
+NdisCopyFromPacketToPacket
+NdisDeregisterAdapter
+NdisDeregisterAdapterShutdownHandler
+NdisDeregisterMac
+NdisDeregisterProtocol
+NdisDprAcquireSpinLock
+NdisDprAllocatePacket
+NdisDprAllocatePacketNonInterlocked
+NdisDprFreePacket
+NdisDprFreePacketNonInterlocked
+NdisDprReleaseSpinLock
+NdisEqualString
+NdisFreeBuffer
+NdisFreeBufferPool
+NdisFreeDmaChannel
+NdisFreeMemory
+NdisFreePacket
+NdisFreePacketPool
+NdisFreeSharedMemory
+NdisFreeSpinLock
+NdisGetBufferPhysicalArraySize
+NdisGetCurrentProcessorCounts
+NdisGetCurrentProcessorCpuUsage
+NdisGetCurrentSystemTime
+NdisGetDriverHandle
+NdisGetFirstBufferFromPacket
+NdisGetReceivedPacket
+NdisGetSystemUpTime
+NdisIMAssociateMiniport
+NdisIMCancelInitializeDeviceInstance
+NdisIMCopySendCompletePerPacketInfo
+NdisIMCopySendPerPacketInfo
+NdisIMDeInitializeDeviceInstance
+NdisIMDeregisterLayeredMiniport
+NdisIMGetBindingContext
+NdisIMGetDeviceContext
+NdisIMInitializeDeviceInstance
+NdisIMInitializeDeviceInstanceEx
+NdisImmediateReadPciSlotInformation
+NdisImmediateReadPortUchar
+NdisImmediateReadPortUlong
+NdisImmediateReadPortUshort
+NdisImmediateReadSharedMemory
+NdisImmediateWritePciSlotInformation
+NdisImmediateWritePortUchar
+NdisImmediateWritePortUlong
+NdisImmediateWritePortUshort
+NdisImmediateWriteSharedMemory
+NdisIMQueueMiniportCallback
+NdisIMRegisterLayeredMiniport
+NdisIMRevertBack
+NdisIMSwitchToMiniport
+NdisInitAnsiString
+NdisInitializeEvent
+NdisInitializeReadWriteLock
+NdisInitializeString
+NdisInitializeTimer
+NdisInitializeWrapper
+NdisInitUnicodeString
+;NdisInterlockedAddLargeInterger ?
+NdisInterlockedAddUlong
+NdisInterlockedDecrement
+NdisInterlockedIncrement
+NdisInterlockedInsertHeadList
+NdisInterlockedInsertTailList
+NdisInterlockedPopEntrySList
+NdisInterlockedPushEntrySList
+NdisInterlockedRemoveHeadList
+NdisMAllocateMapRegisters
+NdisMAllocateSharedMemory
+NdisMAllocateSharedMemoryAsync
+NdisMapFile
+NdisMapIoSpace
+;NdisMatchPdoWithPacket ?
+NdisMCancelTimer
+NdisMCloseLog
+NdisMCmActivateVc
+NdisMCmCreateVc
+NdisMCmDeactivateVc
+NdisMCmDeleteVc
+NdisMCmRegisterAddressFamily
+NdisMCmRequest
+NdisMCoActivateVcComplete
+NdisMCoDeactivateVcComplete
+NdisMCoIndicateReceivePacket
+NdisMCoIndicateStatus
+NdisMCompleteBufferPhysicalMapping
+NdisMCoReceiveComplete
+NdisMCoRequestComplete
+NdisMCoSendComplete
+NdisMCreateLog
+NdisMDeregisterAdapterShutdownHandler
+NdisMDeregisterDevice
+NdisMDeregisterDmaChannel
+NdisMDeregisterInterrupt
+NdisMDeregisterIoPortRange
+NdisMFlushLog
+NdisMFreeMapRegisters
+NdisMFreeSharedMemory
+NdisMGetDeviceProperty
+NdisMGetDmaAlignment
+NdisMIndicateStatus
+NdisMIndicateStatusComplete
+NdisMInitializeScatterGatherDma
+NdisMInitializeTimer
+NdisMMapIoSpace
+NdisMPciAssignResources
+NdisMPromoteMiniport
+NdisMQueryAdapterInstanceName
+NdisMQueryAdapterResources
+NdisMQueryInformationComplete
+NdisMReadDmaCounter
+NdisMRegisterAdapterShutdownHandler
+NdisMRegisterDevice
+NdisMRegisterDmaChannel
+NdisMRegisterInterrupt
+NdisMRegisterIoPortRange
+NdisMRegisterMiniport
+NdisMRegisterUnloadHandler
+NdisMRemoveMiniport
+NdisMResetComplete
+NdisMSendComplete
+NdisMSendResourcesAvailable
+NdisMSetAttributes
+NdisMSetAttributesEx
+NdisMSetInformationComplete
+NdisMSetMiniportSecondary
+NdisMSetPeriodicTimer
+NdisMSetTimer
+NdisMSleep
+NdisMStartBufferPhysicalMapping
+NdisMSynchronizeWithInterrupt
+NdisMTransferDataComplete
+NdisMUnmapIoSpace
+NdisMWanIndicateReceive
+NdisMWanIndicateReceiveComplete
+NdisMWanSendComplete
+NdisMWriteLogData
+NdisOpenAdapter
+NdisOpenConfiguration
+NdisOpenConfigurationKeyByIndex
+NdisOpenConfigurationKeyByName
+NdisOpenFile
+NdisOpenProtocolConfiguration
+;NdisOverrideBusNumber ?
+NdisPacketPoolUsage
+NdisPciAssignResources
+NdisQueryAdapterInstanceName
+;NdisQueryBindInstanceName?
+NdisQueryBuffer
+NdisQueryBufferOffset
+NdisQueryBufferSafe
+NdisQueryMapRegisterCount
+NdisReadConfiguration
+NdisReadEisaSlotInformation
+NdisReadEisaSlotInformationEx
+NdisReadMcaPosInformation
+NdisReadNetworkAddress
+NdisReadPciSlotInformation
+NdisReadPcmciaAttributeMemory
+;NdisReEnumerateProtocolBindings ?
+NdisRegisterAdapter
+NdisRegisterAdapterShutdownHandler
+NdisRegisterProtocol
+;NdisRegisterTdiCallBack ?
+NdisReleaseAdapterResources
+NdisReleaseReadWriteLock
+NdisReleaseSpinLock
+NdisRequest
+NdisReset
+NdisResetEvent
+NdisReturnPackets
+NdisSend
+NdisSendPackets
+NdisSetEvent
+;NdisSetPacketPoolProtocolId ?
+;NdisSetProtocolFilter ?
+NdisSetTimer
+NdisSetupDmaTransfer
+NdisSystemProcessorCount
+NdisTerminateWrapper
+NdisTransferData
+NdisUnchainBufferAtBack
+NdisUnchainBufferAtFront
+NdisUnicodeStringToAnsiString
+NdisUnmapFile
+NdisUpcaseUnicodeString
+NdisUpdateSharedMemory
+NdisWaitEvent
+NdisWriteConfiguration
+NdisWriteErrorLogEntry
+NdisWritePciSlotInformation
+NdisWritePcmciaAttributeMemory
+TrFilterDprIndicateReceive
+TrFilterDprIndicateReceiveComplete
+NdisScheduleWorkItem
+
+; EOF
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="ndis" type="kernelmodedriver" installbase="system32/drivers" installname="ndis.sys">
- <importlibrary definition="ndis.def"></importlibrary>
+ <importlibrary definition="ndis-$(ARCH).def"></importlibrary>
<include base="ndis">include</include>
<define name="NDIS_WRAPPER" />
<define name="NDIS50" />
OUT PUCHAR Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_UCHAR((PUCHAR)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_UCHAR(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
OUT PULONG Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_ULONG((PULONG)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_ULONG(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
OUT PUSHORT Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_USHORT((PUSHORT)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_USHORT(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN UCHAR Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_UCHAR((PUCHAR)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_UCHAR(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN ULONG Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_ULONG((PULONG)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_ULONG(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN USHORT Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_USHORT((PUSHORT)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_USHORT(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress);
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
break;
AddressInfo = (PTDI_CONNECTION_INFORMATION)
MmGetSystemAddressForMdl(Irp->MdlAddress);
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
break;
(*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)));
if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send) )
+ {
+ ULONG DataUsed = 0;
Status = (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)(
Request.Handle.AddressHandle,
DgramInfo->SendDatagramInformation,
DataBuffer,
BufferSize,
- &Irp->IoStatus.Information);
+ &DataUsed);
+ Irp->IoStatus.Information = DataUsed;
+ }
else
Status = STATUS_UNSUCCESSFUL;
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
Info = (PTCP_REQUEST_SET_INFORMATION_EX)Irp->AssociatedIrp.SystemBuffer;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
/* Fill the read buffer */
TRACE_(SERENUM, "Fill the read buffer\n");
- Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count);
+ Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count);
if (!NT_SUCCESS(Status)) goto ByeBye;
RtlInitUnicodeString(&DeviceId, L"Serenum\\Mouse");
// of original IRP.
//
- nextIrpStack->Parameters.Others.Argument1 = (PVOID) irpCount;
+ nextIrpStack->Parameters.Others.Argument1 = (PVOID)(ULONG_PTR) irpCount;
for (i = 0; i < irpCount; i++) {
srb,
irpStack->MajorFunction,
irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0,
- MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4),
+ MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4),
&status);
//
retry = TRUE;
}
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) {
+ if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
//
// Retry request.
srb,
irpStack->MajorFunction,
irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0,
- MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4),
+ MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4),
&status);
//
retry = TRUE;
}
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) {
+ if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
//
// Retry request. If the class driver has supplied a StartIo,
if(AddressSpace == 0)
gControllerInfo[gNumberOfControllers].BaseAddress = MmMapIoSpace(TranslatedAddress, FDC_PORT_BYTES, MmNonCached);
else
- gControllerInfo[gNumberOfControllers].BaseAddress = (PUCHAR)TranslatedAddress.u.LowPart;
+ gControllerInfo[gNumberOfControllers].BaseAddress = (PUCHAR)(ULONG_PTR)TranslatedAddress.QuadPart;
}
else if(PartialDescriptor->Type == CmResourceTypeDma)
{
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1];
- PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1];
+ //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1];
ULONG i;
UCHAR errorByte;
UCHAR srbStatus;
// is clear and then just wait for an arbitrary amount of time!
//
if (deviceExtension->DeviceFlags[i] & DFLAGS_ATAPI_DEVICE) {
- PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1];
+ //PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1];
PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[i >> 1];
ULONG waitCount;
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
PULONG adapterCount = (PULONG)Context;
PUCHAR ioSpace;
- ULONG i,j;
+ ULONG i;
ULONG irq;
ULONG portBase;
ULONG retryCount;
--*/
{
- PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension;
- ULONG rangeNumber = 0;
+ //PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension;
+ //ULONG rangeNumber = 0;
ULONG pciBuffer;
ULONG slotNumber;
ULONG functionNumber;
- ULONG status;
+ //ULONG status;
PCI_SLOT_NUMBER slotData;
PPCI_COMMON_CONFIG pciData;
UCHAR vendorString[5];
vendorStrPtr = vendorString;
deviceStrPtr = deviceString;
- AtapiHexToString(pciData->VendorID, &vendorStrPtr);
- AtapiHexToString(pciData->DeviceID, &deviceStrPtr);
+ AtapiHexToString(pciData->VendorID, (PVOID)&vendorStrPtr);
+ AtapiHexToString(pciData->DeviceID, (PVOID)&deviceStrPtr);
DebugPrint((2,
"FindBrokenController: Bus %x Slot %x Function %x Vendor %s Product %s\n",
{
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
- ULONG nativeModeAdapterTableIndex = (ULONG)Context;
+ ULONG nativeModeAdapterTableIndex = (ULONG_PTR)Context;
ULONG channel;
PUCHAR ioSpace;
BOOLEAN atapiOnly,
vendorStrPtr = vendorString;
deviceStrPtr = deviceString;
- AtapiHexToString(pciData.VendorID, &vendorStrPtr);
- AtapiHexToString(pciData.DeviceID, &deviceStrPtr);
+ AtapiHexToString(pciData.VendorID, (PVOID)&vendorStrPtr);
+ AtapiHexToString(pciData.DeviceID, (PVOID)&deviceStrPtr);
//
// Compare strings.
ULONG status;
ULONG i;
UCHAR statusByte,interruptReason;
- BOOLEAN commandComplete = FALSE;
+ //BOOLEAN commandComplete = FALSE;
BOOLEAN atapiDev = FALSE;
if (srb) {
{
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1];
- PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1];
+ //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1];
ULONG startingSector;
ULONG sectors;
ULONG endSector;
{
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
- ULONG status;
+ //ULONG status;
PSENSE_DATA senseBuffer = (PSENSE_DATA)Srb->DataBuffer;
newStatus = ScsiPortInitialize(DriverObject,
Argument2,
&hwInitializationData,
- (PVOID) i);
+ (PVOID)(ULONG_PTR)i);
if (newStatus < statusToReturn)
statusToReturn = newStatus;
}
+++ /dev/null
-LIBRARY pciidex.sys
-
-EXPORTS
-PciIdeXGetBusData@16
-PciIdeXInitialize@16
-PciIdeXSetBusData@20
-
-;EOF
\ No newline at end of file
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
<module name="pciidex" type="kernelmodedriver" installbase="system32/drivers" installname="pciidex.sys">
- <importlibrary definition="pciidex.def" />
+ <importlibrary definition="pciidex.spec.def" />
<library>ntoskrnl</library>
+ <file>pciidex.spec</file>
<file>fdo.c</file>
<file>miniport.c</file>
<file>misc.c</file>
--- /dev/null
+
+@ stdcall PciIdeXGetBusData(ptr ptr long long)
+@ stdcall PciIdeXInitialize(ptr ptr ptr long)
+@ stdcall PciIdeXSetBusData(ptr ptr ptr long long)
+
}
else // hint-name
{
- Name = (PCHAR)((ULONG)DriverBase +
- *FunctionNameList + 2);
- Hint = *(PUSHORT)((ULONG)DriverBase + *FunctionNameList);
+ Name = (PCHAR)((ULONG_PTR)DriverBase +
+ (ULONG_PTR)*FunctionNameList + 2);
+ Hint = *(PUSHORT)((ULONG_PTR)DriverBase + (ULONG_PTR)*FunctionNameList);
}
#if 0
DPRINT(" Hint:%04x Name:%s\n", Hint, pName);
<xi:include href="halarm/directory.rbuild" />
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="halamd64">
+ <xi:include href="halamd64/directory.rbuild" />
+ </directory>
+ </if>
</group>
KEBUGCHECK(0);
return Interval;
}
-
+#if 0
VOID
FASTCALL
ExAcquireFastMutex(
return TRUE;
}
-
+#endif
VOID
NTAPI
VOID
NTAPI
HalRequestIpi(
- ULONG Unknown)
+ KAFFINITY TargetSet)
{
UNIMPLEMENTED;
}
UNIMPLEMENTED;
}
-
+#if !defined(_M_AMD64)
VOID
NTAPI
READ_PORT_BUFFER_UCHAR(
{
UNIMPLEMENTED;
}
+#endif
KIRQL
FASTCALL
--- /dev/null
+; Hardware Abstraction Layer - ReactOS Operating System
+
+LIBRARY hal.dll
+
+EXPORTS
+HalAcquireDisplayOwnership
+HalAdjustResourceList
+HalAllProcessorsStarted
+HalAllocateAdapterChannel
+HalAllocateCommonBuffer
+HalAllocateCrashDumpRegisters
+HalAssignSlotResources
+HalCalibratePerformanceCounter
+;HalCallBios
+HalClearSoftwareInterrupt
+HalDisableSystemInterrupt
+HalDisplayString
+HalEnableSystemInterrupt
+HalFlushCommonBuffer
+HalFreeCommonBuffer
+HalGetAdapter
+HalGetBusData
+HalGetBusDataByOffset
+HalGetEnvironmentVariable
+HalGetInterruptVector
+;HalHandleMcheck
+HalHandleNMI
+HalInitSystem
+HalInitializeProcessor
+;HalIsHyperThreadingEnabled
+HalMakeBeep
+HalProcessorIdle
+HalQueryDisplayParameters
+HalQueryRealTimeClock
+HalReadDmaCounter
+HalReportResourceUsage
+HalRequestIpi
+HalRequestSoftwareInterrupt
+HalReturnToFirmware
+;HalSendNMI
+;HalSendSoftwareInterrupt
+HalSetBusData
+HalSetBusDataByOffset
+HalSetDisplayParameters
+HalSetEnvironmentVariable
+HalSetProfileInterval
+HalSetRealTimeClock
+HalSetTimeIncrement
+HalStartNextProcessor
+HalStartProfileInterrupt
+HalStopProfileInterrupt
+HalSystemVectorDispatchEntry
+HalTranslateBusAddress
+;IoAssignDriveLetters
+IoFlushAdapterBuffers
+IoFreeAdapterChannel
+IoFreeMapRegisters
+IoMapTransfer
+;IoReadPartitionTable
+;IoSetPartitionInformation
+;IoWritePartitionTable
+KdComPortInUse=_KdComPortInUse DATA
+KeFlushWriteBuffer
+KeQueryPerformanceCounter
+KeStallExecutionProcessor
+;x86BiosExecuteInterrupt
+;x86BiosInitializeBiosEx
+;x86BiosTranslateAddress
+;DllEntryPoint
--- /dev/null
+; Hardware Abstraction Layer - ReactOS Operating System
+
+LIBRARY hal.dll
+
+EXPORTS
+@ExAcquireFastMutex@4=@ExiAcquireFastMutex@4
+@ExReleaseFastMutex@4=@ExiReleaseFastMutex@4
+@ExTryToAcquireFastMutex@4=@ExiTryToAcquireFastMutex@4
+@HalClearSoftwareInterrupt@4
+@HalRequestSoftwareInterrupt@4
+@HalSystemVectorDispatchEntry@12
+@KeAcquireInStackQueuedSpinLock@8
+@KeAcquireInStackQueuedSpinLockRaiseToSynch@8
+@KeAcquireSpinLockRaiseToSynch@4
+@KeAcquireQueuedSpinLock@4
+@KeAcquireQueuedSpinLockRaiseToSynch@4
+@KeReleaseInStackQueuedSpinLock@4
+@KeReleaseQueuedSpinLock@8
+@KeTryToAcquireQueuedSpinLock@8
+@KeTryToAcquireQueuedSpinLockRaiseToSynch@8
+@KfAcquireSpinLock@4
+@KfLowerIrql@4
+@KfRaiseIrql@4
+@KfReleaseSpinLock@8
+
+HalAcquireDisplayOwnership@4
+HalAdjustResourceList@4
+HalAllProcessorsStarted@0
+HalAllocateAdapterChannel@16
+HalAllocateCommonBuffer@16
+HalAllocateCrashDumpRegisters@8
+HalAssignSlotResources@32
+HalBeginSystemInterrupt@12
+HalCalibratePerformanceCounter@12
+HalDisableSystemInterrupt@8
+HalDisplayString@4
+HalEnableSystemInterrupt@12
+HalEndSystemInterrupt@8
+HalFlushCommonBuffer@20
+HalFreeCommonBuffer@24
+HalGetAdapter@8
+HalGetBusData@20
+HalGetBusDataByOffset@24
+HalGetEnvironmentVariable@12
+HalGetInterruptVector@24
+HalHandleNMI@4
+HalInitSystem@8
+HalInitializeProcessor@8
+HalMakeBeep@4
+HalProcessorIdle@0
+HalQueryDisplayParameters@16
+HalQueryRealTimeClock@4
+HalReadDmaCounter@4
+HalReportResourceUsage@0
+HalRequestIpi@4
+HalReturnToFirmware@4
+HalSetBusData@20
+HalSetBusDataByOffset@24
+HalSetDisplayParameters@8
+HalSetEnvironmentVariable@8
+HalSetProfileInterval@4
+HalSetRealTimeClock@4
+HalSetTimeIncrement@4
+HalStartNextProcessor@8
+HalStartProfileInterrupt@4
+HalStopProfileInterrupt@4
+HalTranslateBusAddress@24
+IoAssignDriveLetters@16=HalpAssignDriveLetters@16
+IoFlushAdapterBuffers@24
+IoFreeAdapterChannel@4
+IoFreeMapRegisters@12
+IoMapTransfer@24
+IoReadPartitionTable@16=HalpReadPartitionTable@16
+IoSetPartitionInformation@16=HalpSetPartitionInformation@16
+IoWritePartitionTable@20=HalpWritePartitionTable@20
+KeAcquireSpinLock@8
+KdComPortInUse=_KdComPortInUse DATA
+KeFlushWriteBuffer@0
+KeGetCurrentIrql@0
+KeLowerIrql@4
+KeQueryPerformanceCounter@4
+KeRaiseIrql@8
+KeRaiseIrqlToDpcLevel@0
+KeRaiseIrqlToSynchLevel@0
+KeReleaseSpinLock@8
+KeStallExecutionProcessor@4
+READ_PORT_BUFFER_UCHAR@12
+READ_PORT_BUFFER_ULONG@12
+READ_PORT_BUFFER_USHORT@12
+READ_PORT_UCHAR@4
+READ_PORT_ULONG@4
+READ_PORT_USHORT@4
+WRITE_PORT_BUFFER_UCHAR@12
+WRITE_PORT_BUFFER_ULONG@12
+WRITE_PORT_BUFFER_USHORT@12
+WRITE_PORT_UCHAR@8
+WRITE_PORT_ULONG@8
+WRITE_PORT_USHORT@8
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
+<group xmlns:xi="http://www.w3.org/2001/XInclude">
+ <directory name="generic">
+ <xi:include href="generic/generic.rbuild" />
+ </directory>
+ <directory name="up">
+ <xi:include href="up/halup.rbuild" />
+ </directory>
+</group>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="halamd64_generic" type="objectlibrary">
+ <include base="halamd64_generic">../include</include>
+ <include base="ntoskrnl">include</include>
+ <define name="_DISABLE_TIDENTS" />
+ <define name="_NTHAL_" />
+ <file>hal.c</file>
+ <pch>../include/hal.h</pch>
+</module>
--- /dev/null
+/*
+ * PROJECT: ReactOS HAL
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: hal/halarm/generic/hal.c
+ * PURPOSE: Hardware Abstraction Layer
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <hal.h>
+#define NDEBUG
+#include <debug.h>
+#include <ndk/inbvfuncs.h>
+
+#undef ExAcquireFastMutex
+#undef ExReleaseFastMutex
+#undef ExTryToAcquireFastMutex
+#undef KeAcquireSpinLock
+#undef KeLowerIrql
+#undef KeRaiseIrql
+#undef KeReleaseSpinLock
+
+#define READ_REGISTER_ULONG(r) (*(volatile ULONG * const)(r))
+#define WRITE_REGISTER_ULONG(r, v) (*(volatile ULONG *)(r) = (v))
+
+/* DATA **********************************************************************/
+
+ULONG HalpCurrentTimeIncrement, HalpNextTimeIncrement, HalpNextIntervalCount;
+ULONG _KdComPortInUse = 0;
+
+ULONG HalpIrqlTable[HIGH_LEVEL + 1] =
+{
+ 0xFFFFFFFF, // IRQL 0 PASSIVE_LEVEL
+ 0xFFFFFFFD, // IRQL 1 APC_LEVEL
+ 0xFFFFFFF9, // IRQL 2 DISPATCH_LEVEL
+ 0xFFFFFFD9, // IRQL 3
+ 0xFFFFFF99, // IRQL 4
+ 0xFFFFFF19, // IRQL 5
+ 0xFFFFFE19, // IRQL 6
+ 0xFFFFFC19, // IRQL 7
+ 0xFFFFF819, // IRQL 8
+ 0xFFFFF019, // IRQL 9
+ 0xFFFFE019, // IRQL 10
+ 0xFFFFC019, // IRQL 11
+ 0xFFFF8019, // IRQL 12
+ 0xFFFF0019, // IRQL 13
+ 0xFFFE0019, // IRQL 14
+ 0xFFFC0019, // IRQL 15
+};
+
+UCHAR HalpMaskTable[HIGH_LEVEL + 1] =
+{
+ PROFILE_LEVEL, // INT 0 WATCHDOG
+ APC_LEVEL, // INT 1 SOFTWARE INTERRUPT
+ DISPATCH_LEVEL,// INT 2 COMM RX
+ IPI_LEVEL, // INT 3 COMM TX
+ CLOCK_LEVEL, // INT 4 TIMER 0
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13
+};
+
+/* FUNCTIONS *****************************************************************/
+
+NTSTATUS
+NTAPI
+DriverEntry(
+ PDRIVER_OBJECT DriverObject,
+ PUNICODE_STRING RegistryPath)
+{
+ UNIMPLEMENTED;
+
+ return STATUS_SUCCESS;
+}
+
+/*
+* @unimplemented
+*/
+VOID
+NTAPI
+HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+/*
+* @unimplemented
+*/
+VOID
+NTAPI
+HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+/*
+* @unimplemented
+*/
+ULONG_PTR
+NTAPI
+HalSetProfileInterval(IN ULONG_PTR Interval)
+{
+ KEBUGCHECK(0);
+ return Interval;
+}
+
+NTSTATUS
+NTAPI
+HalAdjustResourceList(
+ PCM_RESOURCE_LIST Resources)
+{
+ UNIMPLEMENTED;
+
+ return STATUS_SUCCESS;
+}
+
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+HalAllProcessorsStarted(VOID)
+{
+ /* Do nothing */
+ return TRUE;
+}
+
+
+NTSTATUS
+NTAPI
+HalAllocateAdapterChannel(
+ PADAPTER_OBJECT AdapterObject,
+ PWAIT_CONTEXT_BLOCK WaitContextBlock,
+ ULONG NumberOfMapRegisters,
+ PDRIVER_CONTROL ExecutionRoutine)
+{
+ UNIMPLEMENTED;
+
+ return STATUS_SUCCESS;
+}
+
+
+PVOID
+NTAPI
+HalAllocateCommonBuffer(
+ PADAPTER_OBJECT AdapterObject,
+ ULONG Length,
+ PPHYSICAL_ADDRESS LogicalAddress,
+ BOOLEAN CacheEnabled)
+{
+ UNIMPLEMENTED;
+
+ return NULL;
+}
+
+
+PVOID
+NTAPI
+HalAllocateCrashDumpRegisters(
+ PADAPTER_OBJECT AdapterObject,
+ PULONG NumberOfMapRegisters)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+
+NTSTATUS
+NTAPI
+HalAssignSlotResources(
+ PUNICODE_STRING RegistryPath,
+ PUNICODE_STRING DriverClassName,
+ PDRIVER_OBJECT DriverObject,
+ PDEVICE_OBJECT DeviceObject,
+ INTERFACE_TYPE BusType,
+ ULONG BusNumber,
+ ULONG SlotNumber,
+ PCM_RESOURCE_LIST *AllocatedResources)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+BOOLEAN
+NTAPI
+HalBeginSystemInterrupt (KIRQL Irql,
+ ULONG Vector,
+ PKIRQL OldIrql)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+HalCalibratePerformanceCounter(
+ volatile LONG *Count,
+ ULONGLONG NewCount)
+{
+ UNIMPLEMENTED;
+}
+
+
+BOOLEAN
+NTAPI
+HalDisableSystemInterrupt(
+ ULONG Vector,
+ KIRQL Irql)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+VOID
+NTAPI
+HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters)
+{
+ //
+ // Stub since Windows XP implemented Inbv
+ //
+ return;
+}
+
+VOID
+NTAPI
+HalDisplayString(IN PCH String)
+{
+ //
+ // Call the Inbv driver
+ //
+ InbvDisplayString(String);
+}
+
+VOID
+NTAPI
+HalQueryDisplayParameters(OUT PULONG DispSizeX,
+ OUT PULONG DispSizeY,
+ OUT PULONG CursorPosX,
+ OUT PULONG CursorPosY)
+{
+ //
+ // Stub since Windows XP implemented Inbv
+ //
+ return;
+}
+
+VOID
+NTAPI
+HalSetDisplayParameters(IN ULONG CursorPosX,
+ IN ULONG CursorPosY)
+{
+ //
+ // Stub since Windows XP implemented Inbv
+ //
+ return;
+}
+
+BOOLEAN
+NTAPI
+HalEnableSystemInterrupt(
+ ULONG Vector,
+ KIRQL Irql,
+ KINTERRUPT_MODE InterruptMode)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+HalEndSystemInterrupt(
+ KIRQL Irql,
+ ULONG Unknown2)
+{
+ UNIMPLEMENTED;
+}
+
+
+BOOLEAN
+NTAPI
+HalFlushCommonBuffer(
+ ULONG Unknown1,
+ ULONG Unknown2,
+ ULONG Unknown3,
+ ULONG Unknown4,
+ ULONG Unknown5)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+HalFreeCommonBuffer(
+ PADAPTER_OBJECT AdapterObject,
+ ULONG Length,
+ PHYSICAL_ADDRESS LogicalAddress,
+ PVOID VirtualAddress,
+ BOOLEAN CacheEnabled)
+{
+ UNIMPLEMENTED;
+}
+
+
+PADAPTER_OBJECT
+NTAPI
+HalGetAdapter(
+ PDEVICE_DESCRIPTION DeviceDescription,
+ PULONG NumberOfMapRegisters)
+{
+ UNIMPLEMENTED;
+
+ return (PADAPTER_OBJECT)NULL;
+}
+
+
+ULONG
+NTAPI
+HalGetBusData(
+ BUS_DATA_TYPE BusDataType,
+ ULONG BusNumber,
+ ULONG SlotNumber,
+ PVOID Buffer,
+ ULONG Length)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+ULONG
+NTAPI
+HalGetBusDataByOffset(
+ BUS_DATA_TYPE BusDataType,
+ ULONG BusNumber,
+ ULONG SlotNumber,
+ PVOID Buffer,
+ ULONG Offset,
+ ULONG Length)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+ARC_STATUS
+NTAPI
+HalGetEnvironmentVariable(
+ PCH Name,
+ USHORT ValueLength,
+ PCH Value)
+{
+ UNIMPLEMENTED;
+
+ return ENOENT;
+}
+
+
+ULONG
+NTAPI
+HalGetInterruptVector(
+ INTERFACE_TYPE InterfaceType,
+ ULONG BusNumber,
+ ULONG BusInterruptLevel,
+ ULONG BusInterruptVector,
+ PKIRQL Irql,
+ PKAFFINITY Affinity)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+VOID
+NTAPI
+HalHandleNMI(
+ PVOID NmiData)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ PCHAR CommandLine;
+
+ /* Make sure we have a loader block and command line */
+ if ((LoaderBlock) && (LoaderBlock->LoadOptions))
+ {
+ /* Read the command line */
+ CommandLine = LoaderBlock->LoadOptions;
+
+ /* Check for initial breakpoint */
+ if (strstr(CommandLine, "BREAK")) DbgBreakPoint();
+ }
+}
+
+ULONG
+HalGetInterruptSource(VOID)
+{
+ KEBUGCHECK(0);
+ return 0;
+}
+
+VOID
+HalpClockInterrupt(VOID)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+VOID
+HalpStallInterrupt(VOID)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+VOID
+HalpInitializeInterrupts(VOID)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+HalInitSystem(IN ULONG BootPhase,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+
+VOID
+NTAPI
+HalInitializeProcessor(IN ULONG ProcessorNumber,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ //
+ // Nothing to do
+ //
+ return;
+}
+
+
+BOOLEAN
+NTAPI
+HalMakeBeep(
+ ULONG Frequency)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+HalProcessorIdle(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+
+#define RTC_DATA (PVOID)0xE00E8000
+
+BOOLEAN
+NTAPI
+HalQueryRealTimeClock(IN PTIME_FIELDS Time)
+{
+ KEBUGCHECK(0);
+ return TRUE;
+}
+
+ULONG
+NTAPI
+HalReadDmaCounter(
+ PADAPTER_OBJECT AdapterObject)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+VOID
+NTAPI
+HalReportResourceUsage(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+
+VOID
+NTAPI
+HalRequestIpi(
+ KAFFINITY TargetSet)
+{
+ UNIMPLEMENTED;
+}
+
+
+VOID
+FASTCALL
+HalRequestSoftwareInterrupt(IN KIRQL Request)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+VOID
+FASTCALL
+HalClearSoftwareInterrupt(IN KIRQL Request)
+{
+ KEBUGCHECK(0);
+ return;
+}
+
+VOID
+NTAPI
+HalReturnToFirmware(
+ FIRMWARE_REENTRY Action)
+{
+ UNIMPLEMENTED;
+}
+
+
+ULONG
+NTAPI
+HalSetBusData(
+ BUS_DATA_TYPE BusDataType,
+ ULONG BusNumber,
+ ULONG SlotNumber,
+ PVOID Buffer,
+ ULONG Length)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+ULONG
+NTAPI
+HalSetBusDataByOffset(
+ BUS_DATA_TYPE BusDataType,
+ ULONG BusNumber,
+ ULONG SlotNumber,
+ PVOID Buffer,
+ ULONG Offset,
+ ULONG Length)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+ARC_STATUS
+NTAPI
+HalSetEnvironmentVariable(
+ PCH Name,
+ PCH Value)
+{
+ UNIMPLEMENTED;
+
+ return ESUCCESS;
+}
+
+
+BOOLEAN
+NTAPI
+HalSetRealTimeClock(
+ PTIME_FIELDS Time)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+ULONG
+NTAPI
+HalSetTimeIncrement(
+ ULONG Increment)
+{
+ UNIMPLEMENTED;
+
+ return Increment;
+}
+
+
+BOOLEAN
+NTAPI
+HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
+ IN PKPROCESSOR_STATE ProcessorState)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+ULONG
+FASTCALL
+HalSystemVectorDispatchEntry(
+ ULONG Unknown1,
+ ULONG Unknown2,
+ ULONG Unknown3)
+{
+ UNIMPLEMENTED;
+
+ return 0;
+}
+
+
+BOOLEAN
+NTAPI
+HalTranslateBusAddress(
+ INTERFACE_TYPE InterfaceType,
+ ULONG BusNumber,
+ PHYSICAL_ADDRESS BusAddress,
+ PULONG AddressSpace,
+ PPHYSICAL_ADDRESS TranslatedAddress)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+HalpAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
+ IN PSTRING NtDeviceName,
+ OUT PUCHAR NtSystemPath,
+ OUT PSTRING NtSystemPathString)
+{
+ /* Call the kernel */
+ IoAssignDriveLetters(LoaderBlock,
+ NtDeviceName,
+ NtSystemPath,
+ NtSystemPathString);
+}
+
+NTSTATUS
+NTAPI
+HalpReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
+ IN ULONG SectorSize,
+ IN BOOLEAN ReturnRecognizedPartitions,
+ IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
+{
+ /* Call the kernel */
+ return IoReadPartitionTable(DeviceObject,
+ SectorSize,
+ ReturnRecognizedPartitions,
+ PartitionBuffer);
+}
+
+NTSTATUS
+NTAPI
+HalpWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
+ IN ULONG SectorSize,
+ IN ULONG SectorsPerTrack,
+ IN ULONG NumberOfHeads,
+ IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
+{
+ /* Call the kernel */
+ return IoWritePartitionTable(DeviceObject,
+ SectorSize,
+ SectorsPerTrack,
+ NumberOfHeads,
+ PartitionBuffer);
+}
+
+NTSTATUS
+NTAPI
+HalpSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
+ IN ULONG SectorSize,
+ IN ULONG PartitionNumber,
+ IN ULONG PartitionType)
+{
+ /* Call the kernel */
+ return IoSetPartitionInformation(DeviceObject,
+ SectorSize,
+ PartitionNumber,
+ PartitionType);
+}
+
+
+BOOLEAN
+NTAPI
+IoFlushAdapterBuffers(
+ PADAPTER_OBJECT AdapterObject,
+ PMDL Mdl,
+ PVOID MapRegisterBase,
+ PVOID CurrentVa,
+ ULONG Length,
+ BOOLEAN WriteToDevice)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+VOID
+NTAPI
+IoFreeAdapterChannel(
+ PADAPTER_OBJECT AdapterObject)
+{
+ UNIMPLEMENTED;
+}
+
+
+VOID
+NTAPI
+IoFreeMapRegisters(
+ PADAPTER_OBJECT AdapterObject,
+ PVOID MapRegisterBase,
+ ULONG NumberOfMapRegisters)
+{
+ UNIMPLEMENTED;
+}
+
+
+PHYSICAL_ADDRESS
+NTAPI
+IoMapTransfer(
+ PADAPTER_OBJECT AdapterObject,
+ PMDL Mdl,
+ PVOID MapRegisterBase,
+ PVOID CurrentVa,
+ PULONG Length,
+ BOOLEAN WriteToDevice)
+{
+ PHYSICAL_ADDRESS Address;
+
+ UNIMPLEMENTED;
+
+ Address.QuadPart = 0;
+
+ return Address;
+}
+
+VOID
+NTAPI
+KeFlushWriteBuffer(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+LARGE_INTEGER
+NTAPI
+KeQueryPerformanceCounter(
+ PLARGE_INTEGER PerformanceFreq)
+{
+ LARGE_INTEGER Value;
+
+ UNIMPLEMENTED;
+
+ Value.QuadPart = 0;
+
+ return Value;
+}
+
+VOID
+NTAPI
+KeStallExecutionProcessor(IN ULONG Microseconds)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+VOID
+FASTCALL
+KfLowerIrql(IN KIRQL NewIrql)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+KIRQL
+FASTCALL
+KfRaiseIrql(IN KIRQL NewIrql)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+
+
+KIRQL
+KeRaiseIrqlToDpcLevel(VOID)
+{
+ //
+ // Call the generic routine
+ //
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+KIRQL
+KeRaiseIrqlToSynchLevel(VOID)
+{
+ //
+ // Call the generic routine
+ //
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+BOOLEAN HalpProcessorIdentified;
+BOOLEAN HalpTestCleanSupported;
+
+VOID
+HalpIdentifyProcessor(VOID)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+VOID
+HalSweepDcache(VOID)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+VOID
+HalSweepIcache(VOID)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/*
+ * @implemented
+ */
+#undef KeGetCurrentIrql
+KIRQL
+NTAPI
+KeGetCurrentIrql(VOID)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeLowerIrql(KIRQL NewIrql)
+{
+ /* Call the fastcall function */
+ KfLowerIrql(NewIrql);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeRaiseIrql(KIRQL NewIrql,
+ PKIRQL OldIrql)
+{
+ /* Call the fastcall function */
+ *OldIrql = KfRaiseIrql(NewIrql);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeAcquireSpinLock(PKSPIN_LOCK SpinLock,
+ PKIRQL OldIrql)
+{
+ /* Call the fastcall function */
+ *OldIrql = KfAcquireSpinLock(SpinLock);
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+FASTCALL
+KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock)
+{
+ /* Simply raise to dispatch */
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeReleaseSpinLock(PKSPIN_LOCK SpinLock,
+ KIRQL NewIrql)
+{
+ /* Call the fastcall function */
+ KfReleaseSpinLock(SpinLock, NewIrql);
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+FASTCALL
+KfAcquireSpinLock(PKSPIN_LOCK SpinLock)
+{
+ /* Simply raise to dispatch */
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+VOID
+FASTCALL
+KfReleaseSpinLock(PKSPIN_LOCK SpinLock,
+ KIRQL OldIrql)
+{
+ /* Simply lower IRQL back */
+ KfLowerIrql(OldIrql);
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+FASTCALL
+KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
+{
+ /* Simply raise to dispatch */
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+FASTCALL
+KeAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
+{
+ /* Simply raise to dispatch */
+ return KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+VOID
+FASTCALL
+KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+ /* Simply raise to dispatch */
+ LockHandle->OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+VOID
+FASTCALL
+KeAcquireInStackQueuedSpinLockRaiseToSynch(IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+ /* Simply raise to synch */
+ LockHandle->OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
+}
+
+/*
+ * @implemented
+ */
+VOID
+FASTCALL
+KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ IN KIRQL OldIrql)
+{
+ /* Simply lower IRQL back */
+ KfLowerIrql(OldIrql);
+}
+
+/*
+ * @implemented
+ */
+VOID
+FASTCALL
+KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+ /* Simply lower IRQL back */
+ KfLowerIrql(LockHandle->OldIrql);
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+FASTCALL
+KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ IN PKIRQL OldIrql)
+{
+ /* Simply raise to dispatch */
+ *OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
+
+ /* Always return true on UP Machines */
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+LOGICAL
+FASTCALL
+KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ OUT PKIRQL OldIrql)
+{
+ /* Simply raise to dispatch */
+ *OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
+
+ /* Always return true on UP Machines */
+ return TRUE;
+}
+
+/* EOF */
--- /dev/null
+/*
+ * PROJECT: ReactOS HAL
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: hal/halarm/include/hal.h
+ * PURPOSE: Hardware Abstraction Layer Header
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES ******************************************************************/
+
+/* C Headers */
+#include <stdio.h>
+
+/* WDK HAL Compilation hack */
+#ifdef _MSC_VER
+#include <excpt.h>
+#include <ntdef.h>
+#undef _NTHAL_
+#undef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT
+#define __declspec(dllimport)
+#endif
+
+/* IFS/DDK/NDK Headers */
+#include <ntifs.h>
+#include <bugcodes.h>
+#include <ntdddisk.h>
+#include <arc/arc.h>
+#include <iotypes.h>
+#include <kefuncs.h>
+#include <intrin.h>
+#include <halfuncs.h>
+#include <iofuncs.h>
+#include <ldrtypes.h>
+#include <obfuncs.h>
+
+/* Internal HAL Headers */
+#include "halp.h"
+
+/* Helper Header */
+#include <reactos/helper.h>
+
+/* EOF */
--- /dev/null
+#ifndef __INTERNAL_HAL_HAL_H
+#define __INTERNAL_HAL_HAL_H
+
+//
+// amd64 Headers
+//
+#include <internal/amd64/ke.h>
+#include <internal/amd64/intrin_i.h>
+
+
+//
+// WDK Hack
+//
+#define KdComPortInUse _KdComPortInUse
+
+#endif /* __INTERNAL_HAL_HAL_H */
--- /dev/null
+/* $Id: halinit_up.c 24964 2006-11-29 08:28:20Z ion $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/hal/x86/halinit.c
+ * PURPOSE: Initalize the x86 hal
+ * PROGRAMMER: David Welch (welch@cwcom.net)
+ * UPDATE HISTORY:
+ * 11/06/98: Created
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <hal.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ***************************************************************/
+
+VOID
+HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+
+}
+
+VOID
+HalpInitPhase1(VOID)
+{
+
+}
+
+/* EOF */
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="halarm_up" type="kernelmodedll" installbase="system32" installname="hal.dll">
+ <importlibrary definition="../../hal/hal_amd64.def" />
+ <bootstrap installbase="$(CDOUTPUT)" nameoncd="hal.dll" />
+ <include base="halamd64_generic">../include</include>
+ <include base="ntoskrnl">include</include>
+ <define name="_DISABLE_TIDENTS" />
+ <define name="_NTHAL_" />
+ <library>halamd64_generic</library>
+ <library>ntoskrnl</library>
+ <file>halinit_up.c</file>
+ <file>halup.rc</file>
+</module>
--- /dev/null
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "AMD64 Uniprocessor Hardware Abstraction Layer\0"
+#define REACTOS_STR_INTERNAL_NAME "halup\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "halup.dll\0"
+#include <reactos/version.rc>
# define __MSVCRT_VERSION__ 0x0600
#endif
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED
+#undef size_t
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef unsigned int size_t __attribute__ ((mode (DI)));
+#else
+ typedef unsigned __int64 size_t;
+#endif
+#else
+ typedef unsigned int size_t;
+#endif
+#endif
+
#define __MINGW32_VERSION 3.13
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 13
* _findclose calls. _findnext also returns -1 if no match could be found,
* and 0 if a match was found. Call _findclose when you are finished.
*/
-/* FIXME: Should these all use intptr_t, as per recent MSDN docs? */
-_CRTIMP long __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnext (long, struct _finddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (long);
+
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findnext (intptr_t, struct _finddata_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (intptr_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int);
#ifdef __MSVCRT__
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(long, struct _finddatai64_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(intptr_t, struct _finddatai64_t*);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, __int64, int);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int);
/* These require newer versions of msvcrt.dll (6.1 or higher). */
_CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext(long, struct _wfinddata_t *);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext(intptr_t, struct _wfinddata_t *);
_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...);
_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(long, struct _wfinddatai64_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
#ifndef NO_PORT_MACROS
-#if defined(_X86_)
+#if defined(_X86_) || defined(_M_AMD64)
#define READ_REGISTER_UCHAR(r) (*(volatile UCHAR *)(r))
#define READ_REGISTER_USHORT(r) (*(volatile USHORT *)(r))
#define READ_REGISTER_ULONG(r) (*(volatile ULONG *)(r))
* IN ULONG ReceiveFlags);
*/
-#ifdef _M_IX86
+#if defined(_M_IX86) || defined(_M_AMD64)
#define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \
RtlCopyMemory(Destination, Source, Length)
#else
#define ZwCurrentProcess() NtCurrentProcess()
#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 )
#define ZwCurrentThread() NtCurrentThread()
-
+
#if (_M_IX86)
#define KIP0PCRADDRESS 0xffdff000
#endif
IN PVOID Context);
-typedef struct _EXCEPTION_RECORD32
-{
- NTSTATUS ExceptionCode;
- ULONG ExceptionFlags;
- ULONG ExceptionRecord;
- ULONG ExceptionAddress;
- ULONG NumberParameters;
- ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32;
-
-typedef struct _EXCEPTION_RECORD64
-{
- NTSTATUS ExceptionCode;
- ULONG ExceptionFlags;
- ULONG64 ExceptionRecord;
- ULONG64 ExceptionAddress;
- ULONG NumberParameters;
- ULONG __unusedAlignment;
- ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
-
typedef EXCEPTION_DISPOSITION
(DDKAPI *PEXCEPTION_ROUTINE)(
IN struct _EXCEPTION_RECORD *ExceptionRecord,
*/
#define PCR_MINOR_VERSION 1
#define PCR_MAJOR_VERSION 1
-
+
#ifdef _X86_
typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
#error Unknown compiler
#endif
}
-
+
NTHALAPI
KIRQL
DDKAPI
KeGetCurrentIrql(
VOID);
-
+
NTKERNELAPI
PRKTHREAD
NTAPI
KeGetCurrentThread(
VOID);
-
+
#define KI_USER_SHARED_DATA 0xffdf0000
#elif defined(__x86_64__)
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define CLOCK_LEVEL 13
+#define IPI_LEVEL 14
+#define POWER_LEVEL 14
+#define PROFILE_LEVEL 15
+#define HIGH_LEVEL 15
+
+#define KI_USER_SHARED_DATA 0xFFFFF78000000000
+
typedef struct _KFLOATING_SAVE {
ULONG Dummy;
} KFLOATING_SAVE, *PKFLOATING_SAVE;
+NTKERNELAPI
+KIRQL
+KeGetCurrentIrql (
+ VOID
+ );
+
+NTKERNELAPI
+PRKTHREAD
+NTAPI
+KeGetCurrentThread(
+ VOID);
+
#elif defined(__PowerPC__)
typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
#elif defined(_MIPS_)
#error MIPS Headers are totally incorrect
-
+
typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
#define PASSIVE_LEVEL 0
// NT-ARM is not documented, need DDK-ARM
//
#include <armddk.h>
-
+
#else
#error Unknown architecture
#endif
-
+
#define PAGE_SIZE 0x1000
#define PAGE_SHIFT 12L
#define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA)
-
+
extern NTKERNELAPI PVOID MmHighestUserAddress;
extern NTKERNELAPI PVOID MmSystemRangeStart;
extern NTKERNELAPI ULONG_PTR MmUserProbeAddress;
#if !defined(__INTERLOCKED_DECLARED)
#define __INTERLOCKED_DECLARED
+#if defined (_X86_)
+#if defined(NO_INTERLOCKED_INTRINSICS)
NTKERNELAPI
LONG
FASTCALL
IN OUT LONG volatile *Addend,
IN LONG Value);
+#else // !defined(NO_INTERLOCKED_INTRINSICS)
+
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange (LONG)_InterlockedCompareExchange
+#define InterlockedOr _InterlockedOr
+#define InterlockedAnd _InterlockedAnd
+#define InterlockedXor _InterlockedXor
+
+#endif // !defined(NO_INTERLOCKED_INTRINSICS)
+
+#endif // defined (_X86_)
+
+#if !defined (_WIN64)
/*
* PVOID
* InterlockedExchangePointer(
#define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a)
#define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a)
+#endif // !defined (_WIN64)
+
+#if defined (_M_AMD64)
+
+#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG *)a, b)
+#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONGLONG *)a)
+#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONGLONG *)a)
+#define InterlockedAnd _InterlockedAnd
+#define InterlockedOr _InterlockedOr
+#define InterlockedXor _InterlockedXor
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedAdd _InterlockedAdd
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedAnd64 _InterlockedAnd64
+#define InterlockedOr64 _InterlockedOr64
+#define InterlockedXor64 _InterlockedXor64
+#define InterlockedIncrement64 _InterlockedIncrement64
+#define InterlockedDecrement64 _InterlockedDecrement64
+#define InterlockedAdd64 _InterlockedAdd64
+#define InterlockedExchange64 _InterlockedExchange64
+#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
+#define InterlockedExchangePointer _InterlockedExchangePointer
+
+#endif // _M_AMD64
+
#endif /* !__INTERLOCKED_DECLARED */
NTKERNELAPI
KefReleaseSpinLockFromDpcLevel(
IN PKSPIN_LOCK SpinLock);
+#if defined(_M_AMD64)
+NTKERNELAPI
+KIRQL
+FASTCALL
+KfAcquireSpinLock(
+ IN PKSPIN_LOCK SpinLock);
+
+NTKERNELAPI
+VOID
+FASTCALL
+KfReleaseSpinLock(
+ IN PKSPIN_LOCK SpinLock,
+ IN KIRQL NewIrql);
+#else
NTHALAPI
KIRQL
FASTCALL
KfReleaseSpinLock(
IN PKSPIN_LOCK SpinLock,
IN KIRQL NewIrql);
+#endif
NTKERNELAPI
BOOLEAN
IN PVOID Context
);
+/** Io access routines **/
+
+#if !defined(_M_AMD64)
NTHALAPI
VOID
NTAPI
IN PUSHORT Register,
IN USHORT Value);
+#else
+
+FORCEINLINE
+VOID
+READ_PORT_BUFFER_UCHAR(
+ IN PUCHAR Port,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ __inbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+READ_PORT_BUFFER_ULONG(
+ IN PULONG Port,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ __indwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+READ_PORT_BUFFER_USHORT(
+ IN PUSHORT Port,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ __inwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+UCHAR
+READ_PORT_UCHAR(
+ IN PUCHAR Port)
+{
+ return __inbyte((USHORT)(ULONG_PTR)Port);
+}
+
+FORCEINLINE
+ULONG
+READ_PORT_ULONG(
+ IN PULONG Port)
+{
+ return __indword((USHORT)(ULONG_PTR)Port);
+}
+
+FORCEINLINE
+USHORT
+READ_PORT_USHORT(
+ IN PUSHORT Port)
+{
+ return __inword((USHORT)(ULONG_PTR)Port);
+}
+
+FORCEINLINE
+VOID
+READ_REGISTER_BUFFER_UCHAR(
+ IN PUCHAR Register,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ __movsb(Register, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+READ_REGISTER_BUFFER_ULONG(
+ IN PULONG Register,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ __movsd(Register, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+READ_REGISTER_BUFFER_USHORT(
+ IN PUSHORT Register,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ __movsw(Register, Buffer, Count);
+}
+
+FORCEINLINE
+UCHAR
+READ_REGISTER_UCHAR(
+ IN PUCHAR Register)
+{
+ return *Register;
+}
+
+FORCEINLINE
+ULONG
+READ_REGISTER_ULONG(
+ IN PULONG Register)
+{
+ return *Register;
+}
+
+FORCEINLINE
+USHORT
+READ_REGISTER_USHORT(
+ IN PUSHORT Register)
+{
+ return *Register;
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_BUFFER_UCHAR(
+ IN PUCHAR Port,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ __outbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_BUFFER_ULONG(
+ IN PULONG Port,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ __outdwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_BUFFER_USHORT(
+ IN PUSHORT Port,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ __outwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_UCHAR(
+ IN PUCHAR Port,
+ IN UCHAR Value)
+{
+ __outbyte((USHORT)(ULONG_PTR)Port, Value);
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_ULONG(
+ IN PULONG Port,
+ IN ULONG Value)
+{
+ __outdword((USHORT)(ULONG_PTR)Port, Value);
+}
+
+FORCEINLINE
+VOID
+WRITE_PORT_USHORT(
+ IN PUSHORT Port,
+ IN USHORT Value)
+{
+ __outword((USHORT)(ULONG_PTR)Port, Value);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_BUFFER_UCHAR(
+ IN PUCHAR Register,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ LONG Synch;
+ __movsb(Register, Buffer, Count);
+ InterlockedOr(&Synch, 1);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_BUFFER_ULONG(
+ IN PULONG Register,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ LONG Synch;
+ __movsd(Register, Buffer, Count);
+ InterlockedOr(&Synch, 1);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_BUFFER_USHORT(
+ IN PUSHORT Register,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ LONG Synch;
+ __movsw(Register, Buffer, Count);
+ InterlockedOr(&Synch, 1);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_UCHAR(
+ IN PUCHAR Register,
+ IN UCHAR Value)
+{
+ LONG Synch;
+ *Register = Value;
+ InterlockedOr(&Synch, 1);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_ULONG(
+ IN PULONG Register,
+ IN ULONG Value)
+{
+ LONG Synch;
+ *Register = Value;
+ InterlockedOr(&Synch, 1);
+}
+
+FORCEINLINE
+VOID
+WRITE_REGISTER_USHORT(
+ IN PUSHORT Register,
+ IN USHORT Value)
+{
+ LONG Sync;
+ *Register = Value;
+ InterlockedOr(&Sync, 1);
+}
+
+#endif
+
/** I/O manager routines **/
NTKERNELAPI
/** Kernel routines **/
+#if defined (_M_AMD64)
+NTKERNELAPI
+VOID
+FASTCALL
+KeAcquireInStackQueuedSpinLock(
+ IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle);
+
+NTKERNELAPI
+VOID
+FASTCALL
+KeReleaseInStackQueuedSpinLock(
+ IN PKLOCK_QUEUE_HANDLE LockHandle);
+#else
NTHALAPI
VOID
FASTCALL
IN PKSPIN_LOCK SpinLock,
IN PKLOCK_QUEUE_HANDLE LockHandle);
+NTHALAPI
+VOID
+FASTCALL
+KeReleaseInStackQueuedSpinLock(
+ IN PKLOCK_QUEUE_HANDLE LockHandle);
+#endif
+
NTKERNELAPI
VOID
FASTCALL
IN ULONG Length,
IN PUCHAR Component);
-NTHALAPI
-VOID
-FASTCALL
-KeReleaseInStackQueuedSpinLock(
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-
NTKERNELAPI
VOID
FASTCALL
DDKAPI
KeRaiseIrqlToSynchLevel(
VOID);
-
+
#elif defined(_M_ARM)
-
+
#include <armddk.h>
#else
--- /dev/null
+/*++ NDK Version: 0098
+
+Copyright (c) Alex Ionescu. All rights reserved.
+
+Header Name:
+
+ ketypes.h (X86)
+
+Abstract:
+
+ amd64 Type definitions for the Kernel services.
+
+Author:
+
+ Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
+
+--*/
+
+#ifndef _AMD64_KETYPES_H
+#define _AMD64_KETYPES_H
+
+//
+// Dependencies
+//
+
+//
+// KPCR Access for non-IA64 builds
+//
+//#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
+//#define PCR ((volatile KPCR * const)K0IPCR)
+//#if defined(CONFIG_SMP) || defined(NT_BUILD)
+//#undef KeGetPcr
+//#define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C))
+//#endif
+
+//
+// Machine Types
+//
+#define MACHINE_TYPE_ISA 0x0000
+#define MACHINE_TYPE_EISA 0x0001
+#define MACHINE_TYPE_MCA 0x0002
+
+//
+// X86 80386 Segment Types
+//
+#define I386_TASK_GATE 0x5
+#define I386_TSS 0x9
+#define I386_ACTIVE_TSS 0xB
+#define I386_CALL_GATE 0xC
+#define I386_INTERRUPT_GATE 0xE
+#define I386_TRAP_GATE 0xF
+
+//
+// Selector Names
+//
+#define RPL_MASK 0x0003
+#define MODE_MASK 0x0001
+#define KGDT_R0_CODE 0x8
+#define KGDT_R0_DATA 0x10
+#define KGDT_R3_CODE 0x18
+#define KGDT_R3_DATA 0x20
+#define KGDT_TSS 0x28
+#define KGDT_R0_PCR 0x30
+#define KGDT_R3_TEB 0x38
+#define KGDT_LDT 0x48
+#define KGDT_DF_TSS 0x50
+#define KGDT_NMI_TSS 0x58
+
+//
+// CR4
+//
+#define CR4_VME 0x1
+#define CR4_PVI 0x2
+#define CR4_TSD 0x4
+#define CR4_DE 0x8
+#define CR4_PSE 0x10
+#define CR4_PAE 0x20
+#define CR4_MCE 0x40
+#define CR4_PGE 0x80
+#define CR4_FXSR 0x200
+#define CR4_XMMEXCPT 0x400
+
+//
+// EFlags
+//
+#define EFLAGS_CF 0x01L
+#define EFLAGS_ZF 0x40L
+#define EFLAGS_TF 0x100L
+#define EFLAGS_INTERRUPT_MASK 0x200L
+#define EFLAGS_DF 0x400L
+#define EFLAGS_NESTED_TASK 0x4000L
+#define EFLAGS_V86_MASK 0x20000
+#define EFLAGS_ALIGN_CHECK 0x40000
+#define EFLAGS_VIF 0x80000
+#define EFLAGS_VIP 0x100000
+#define EFLAGS_USER_SANITIZE 0x3F4DD7
+#define EFLAG_SIGN 0x8000
+#define EFLAG_ZERO 0x4000
+
+//
+// IPI Types
+//
+#define IPI_APC 1
+#define IPI_DPC 2
+#define IPI_FREEZE 4
+#define IPI_PACKET_READY 8
+#define IPI_SYNCH_REQUEST 16
+
+//
+// PRCB Flags
+//
+#define PRCB_MAJOR_VERSION 1
+#define PRCB_BUILD_DEBUG 1
+#define PRCB_BUILD_UNIPROCESSOR 2
+
+//
+// HAL Variables
+//
+#define INITIAL_STALL_COUNT 0x64
+
+//
+// IOPM Definitions
+//
+#define IO_ACCESS_MAP_NONE 0
+#define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap)
+#define KiComputeIopmOffset(MapNumber) \
+ (MapNumber == IO_ACCESS_MAP_NONE) ? \
+ (USHORT)(sizeof(KTSS)) : \
+ (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap))
+
+//
+// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
+//
+#define KSEG0_BASE 0xffff080000000000ULL
+
+//
+// Synchronization-level IRQL
+//
+#ifndef CONFIG_SMP
+#define SYNCH_LEVEL DISPATCH_LEVEL
+#else
+#define SYNCH_LEVEL (IPI_LEVEL - 1)
+#endif
+
+//
+// Trap Frame Definition
+//
+typedef struct _KTRAP_FRAME
+{
+ ULONG DbgEbp;
+ ULONG DbgEip;
+ ULONG DbgArgMark;
+ ULONG DbgArgPointer;
+ ULONG TempSegCs;
+ ULONG TempEsp;
+ ULONG Dr0;
+ ULONG Dr1;
+ ULONG Dr2;
+ ULONG Dr3;
+ ULONG Dr6;
+ ULONG Dr7;
+ ULONG SegGs;
+ ULONG SegEs;
+ ULONG SegDs;
+ ULONG Edx;
+ ULONG Ecx;
+ ULONG Eax;
+ ULONG PreviousPreviousMode;
+ struct _EXCEPTION_REGISTRATION_RECORD FAR *ExceptionList;
+ ULONG SegFs;
+ ULONG Edi;
+ ULONG Esi;
+ ULONG Ebx;
+ ULONG Ebp;
+ ULONG ErrCode;
+ ULONG Eip;
+ ULONG SegCs;
+ ULONG EFlags;
+ ULONG HardwareEsp;
+ ULONG HardwareSegSs;
+ ULONG V86Es;
+ ULONG V86Ds;
+ ULONG V86Fs;
+ ULONG V86Gs;
+} KTRAP_FRAME, *PKTRAP_FRAME;
+
+//
+// LDT Entry Definition
+//
+#ifndef _LDT_ENTRY_DEFINED
+#define _LDT_ENTRY_DEFINED
+typedef struct _LDT_ENTRY
+{
+ USHORT LimitLow;
+ USHORT BaseLow;
+ union
+ {
+ struct
+ {
+ UCHAR BaseMid;
+ UCHAR Flags1;
+ UCHAR Flags2;
+ UCHAR BaseHi;
+ } Bytes;
+ struct
+ {
+ ULONG BaseMid:8;
+ ULONG Type:5;
+ ULONG Dpl:2;
+ ULONG Pres:1;
+ ULONG LimitHi:4;
+ ULONG Sys:1;
+ ULONG Reserved_0:1;
+ ULONG Default_Big:1;
+ ULONG Granularity:1;
+ ULONG BaseHi:8;
+ } Bits;
+ } HighWord;
+} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
+#endif
+
+//
+// GDT Entry Definition
+//
+typedef struct _KGDTENTRY
+{
+ USHORT LimitLow;
+ USHORT BaseLow;
+ union
+ {
+ struct
+ {
+ UCHAR BaseMid;
+ UCHAR Flags1;
+ UCHAR Flags2;
+ UCHAR BaseHi;
+ } Bytes;
+ struct
+ {
+ ULONG BaseMid:8;
+ ULONG Type:5;
+ ULONG Dpl:2;
+ ULONG Pres:1;
+ ULONG LimitHi:4;
+ ULONG Sys:1;
+ ULONG Reserved_0:1;
+ ULONG Default_Big:1;
+ ULONG Granularity:1;
+ ULONG BaseHi:8;
+ } Bits;
+ } HighWord;
+} KGDTENTRY, *PKGDTENTRY;
+
+//
+// IDT Entry Access Definition
+//
+typedef struct _KIDT_ACCESS
+{
+ union
+ {
+ struct
+ {
+ UCHAR Reserved;
+ UCHAR SegmentType:4;
+ UCHAR SystemSegmentFlag:1;
+ UCHAR Dpl:2;
+ UCHAR Present:1;
+ };
+ USHORT Value;
+ };
+} KIDT_ACCESS, *PKIDT_ACCESS;
+
+//
+// IDT Entry Definition
+//
+typedef struct _KIDTENTRY
+{
+ USHORT Offset;
+ USHORT Selector;
+ USHORT Access;
+ USHORT ExtendedOffset;
+} KIDTENTRY, *PKIDTENTRY;
+
+typedef struct _DESCRIPTOR
+{
+ USHORT Pad;
+ USHORT Limit;
+ ULONG Base;
+} KDESCRIPTOR, *PKDESCRIPTOR;
+
+#ifndef NTOS_MODE_USER
+//
+// Macro to get current KPRCB
+//
+FORCEINLINE
+struct _KPRCB *
+KeGetCurrentPrcb(VOID)
+{
+// return (struct _KPRCB *)(ULONG_PTR)__readgsqword(FIELD_OFFSET(KPCR, Prcb));
+ return 0;
+}
+
+//
+// FN/FX (FPU) Save Area Structures
+//
+typedef struct _FNSAVE_FORMAT
+{
+ ULONG ControlWord;
+ ULONG StatusWord;
+ ULONG TagWord;
+ ULONG ErrorOffset;
+ ULONG ErrorSelector;
+ ULONG DataOffset;
+ ULONG DataSelector;
+ UCHAR RegisterArea[80];
+} FNSAVE_FORMAT, *PFNSAVE_FORMAT;
+
+typedef struct _FXSAVE_FORMAT
+{
+ USHORT ControlWord;
+ USHORT StatusWord;
+ USHORT TagWord;
+ USHORT ErrorOpcode;
+ ULONG ErrorOffset;
+ ULONG ErrorSelector;
+ ULONG DataOffset;
+ ULONG DataSelector;
+ ULONG MXCsr;
+ ULONG MXCsrMask;
+ UCHAR RegisterArea[128];
+ UCHAR Reserved3[128];
+ UCHAR Reserved4[224];
+ UCHAR Align16Byte[8];
+} FXSAVE_FORMAT, *PFXSAVE_FORMAT;
+
+typedef struct _FX_SAVE_AREA
+{
+ union
+ {
+ FNSAVE_FORMAT FnArea;
+ FXSAVE_FORMAT FxArea;
+ } U;
+ ULONG NpxSavedCpu;
+ ULONG Cr0NpxState;
+} FX_SAVE_AREA, *PFX_SAVE_AREA;
+
+//
+// Special Registers Structure (outside of CONTEXT)
+//
+typedef struct _KSPECIAL_REGISTERS
+{
+ ULONG Cr0;
+ ULONG Cr2;
+ ULONG Cr3;
+ ULONG Cr4;
+ ULONG KernelDr0;
+ ULONG KernelDr1;
+ ULONG KernelDr2;
+ ULONG KernelDr3;
+ ULONG KernelDr6;
+ ULONG KernelDr7;
+ KDESCRIPTOR Gdtr;
+ KDESCRIPTOR Idtr;
+ USHORT Tr;
+ USHORT Ldtr;
+ ULONG Reserved[6];
+} KSPECIAL_REGISTERS, *PKSPECIAL_REGISTERS;
+
+//
+// Processor State Data
+//
+typedef struct _KPROCESSOR_STATE
+{
+ CONTEXT ContextFrame;
+ KSPECIAL_REGISTERS SpecialRegisters;
+} KPROCESSOR_STATE, *PKPROCESSOR_STATE;
+
+//
+// Processor Region Control Block
+//
+#pragma pack(push,4)
+typedef struct _KPRCB
+{
+ USHORT MinorVersion;
+ USHORT MajorVersion;
+ struct _KTHREAD *CurrentThread;
+ struct _KTHREAD *NextThread;
+ struct _KTHREAD *IdleThread;
+ UCHAR Number;
+ UCHAR Reserved;
+ USHORT BuildType;
+ KAFFINITY SetMember;
+ UCHAR CpuType;
+ UCHAR CpuID;
+ USHORT CpuStep;
+ KPROCESSOR_STATE ProcessorState;
+ ULONG KernelReserved[16];
+ ULONG HalReserved[16];
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ ULONG CFlushSize;
+ UCHAR PrcbPad0[88];
+#else
+ UCHAR PrcbPad0[92];
+#endif
+ KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock];
+ struct _KTHREAD *NpxThread;
+ ULONG InterruptCount;
+ ULONG KernelTime;
+ ULONG UserTime;
+ ULONG DpcTime;
+ ULONG DebugDpcTime;
+ ULONG InterruptTime;
+ ULONG AdjustDpcThreshold;
+ ULONG PageColor;
+ UCHAR SkipTick;
+ UCHAR DebuggerSavedIRQL;
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ UCHAR NodeColor;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ UCHAR PollSlot;
+#else
+ UCHAR Spare1;
+#endif
+ ULONG NodeShiftedColor;
+#else
+ UCHAR Spare1[6];
+#endif
+ struct _KNODE *ParentNode;
+ ULONG MultiThreadProcessorSet;
+ struct _KPRCB *MultiThreadSetMaster;
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ ULONG SecondaryColorMask;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ ULONG DpcTimeLimit;
+#else
+ LONG Sleeping;
+#endif
+#else
+ ULONG ThreadStartCount[2];
+#endif
+ ULONG CcFastReadNoWait;
+ ULONG CcFastReadWait;
+ ULONG CcFastReadNotPossible;
+ ULONG CcCopyReadNoWait;
+ ULONG CcCopyReadWait;
+ ULONG CcCopyReadNoWaitMiss;
+#if (NTDDI_VERSION < NTDDI_LONGHORN)
+ ULONG KeAlignmentFixupCount;
+#endif
+ ULONG SpareCounter0;
+#if (NTDDI_VERSION < NTDDI_LONGHORN)
+ ULONG KeDcacheFlushCount;
+ ULONG KeExceptionDispatchCount;
+ ULONG KeFirstLevelTbFills;
+ ULONG KeFloatingEmulationCount;
+ ULONG KeIcacheFlushCount;
+ ULONG KeSecondLevelTbFills;
+ ULONG KeSystemCalls;
+#endif
+ volatile ULONG IoReadOperationCount;
+ volatile ULONG IoWriteOperationCount;
+ volatile ULONG IoOtherOperationCount;
+ LARGE_INTEGER IoReadTransferCount;
+ LARGE_INTEGER IoWriteTransferCount;
+ LARGE_INTEGER IoOtherTransferCount;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ ULONG CcFastMdlReadNoWait;
+ ULONG CcFastMdlReadWait;
+ ULONG CcFastMdlReadNotPossible;
+ ULONG CcMapDataNoWait;
+ ULONG CcMapDataWait;
+ ULONG CcPinMappedDataCount;
+ ULONG CcPinReadNoWait;
+ ULONG CcPinReadWait;
+ ULONG CcMdlReadNoWait;
+ ULONG CcMdlReadWait;
+ ULONG CcLazyWriteHotSpots;
+ ULONG CcLazyWriteIos;
+ ULONG CcLazyWritePages;
+ ULONG CcDataFlushes;
+ ULONG CcDataPages;
+ ULONG CcLostDelayedWrites;
+ ULONG CcFastReadResourceMiss;
+ ULONG CcCopyReadWaitMiss;
+ ULONG CcFastMdlReadResourceMiss;
+ ULONG CcMapDataNoWaitMiss;
+ ULONG CcMapDataWaitMiss;
+ ULONG CcPinReadNoWaitMiss;
+ ULONG CcPinReadWaitMiss;
+ ULONG CcMdlReadNoWaitMiss;
+ ULONG CcMdlReadWaitMiss;
+ ULONG CcReadAheadIos;
+ ULONG KeAlignmentFixupCount;
+ ULONG KeExceptionDispatchCount;
+ ULONG KeSystemCalls;
+ ULONG PrcbPad1[3];
+#else
+ ULONG SpareCounter1[8];
+#endif
+ PP_LOOKASIDE_LIST PPLookasideList[16];
+ PP_LOOKASIDE_LIST PPNPagedLookasideList[32];
+ PP_LOOKASIDE_LIST PPPagedLookasideList[32];
+ volatile ULONG PacketBarrier;
+ volatile ULONG ReverseStall;
+ PVOID IpiFrame;
+ UCHAR PrcbPad2[52];
+ volatile PVOID CurrentPacket[3];
+ volatile ULONG TargetSet;
+ volatile PKIPI_WORKER WorkerRoutine;
+ volatile ULONG IpiFrozen;
+ UCHAR PrcbPad3[40];
+ volatile ULONG RequestSummary;
+ volatile struct _KPRCB *SignalDone;
+ UCHAR PrcbPad4[56];
+ struct _KDPC_DATA DpcData[2];
+ PVOID DpcStack;
+ ULONG MaximumDpcQueueDepth;
+ ULONG DpcRequestRate;
+ ULONG MinimumDpcRate;
+ volatile UCHAR DpcInterruptRequested;
+ volatile UCHAR DpcThreadRequested;
+ volatile UCHAR DpcRoutineActive;
+ volatile UCHAR DpcThreadActive;
+ ULONG PrcbLock;
+ ULONG DpcLastCount;
+ volatile ULONG TimerHand;
+ volatile ULONG TimerRequest;
+ PVOID DpcThread;
+ KEVENT DpcEvent;
+ UCHAR ThreadDpcEnable;
+ volatile BOOLEAN QuantumEnd;
+ UCHAR PrcbPad50;
+ volatile UCHAR IdleSchedule;
+ LONG DpcSetEventRequest;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ LONG Sleeping;
+ ULONG PeriodicCount;
+ ULONG PeriodicBias;
+ UCHAR PrcbPad5[6];
+#else
+ UCHAR PrcbPad5[18];
+#endif
+ LONG TickOffset;
+ KDPC CallDpc;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ LONG ClockKeepAlive;
+ UCHAR ClockCheckSlot;
+ UCHAR ClockPollCycle;
+ UCHAR PrcbPad6[2];
+ LONG DpcWatchdogPeriod;
+ LONG DpcWatchDogCount;
+ LONG ThreadWatchdogPeriod;
+ LONG ThreadWatchDogCount;
+ ULONG PrcbPad70[2];
+#else
+ ULONG PrcbPad7[8];
+#endif
+ LIST_ENTRY WaitListHead;
+ ULONG ReadySummary;
+ ULONG QueueIndex;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ SINGLE_LIST_ENTRY DeferredReadyListHead;
+ ULONGLONG StartCycles;
+ ULONGLONG CycleTime;
+ ULONGLONG PrcbPad71[3];
+ LIST_ENTRY DispatcherReadyListHead[32];
+#else
+ LIST_ENTRY DispatcherReadyListHead[32];
+ SINGLE_LIST_ENTRY DeferredReadyListHead;
+ ULONG PrcbPad72[11];
+#endif
+ PVOID ChainedInterruptList;
+ LONG LookasideIrpFloat;
+ volatile LONG MmPageFaultCount;
+ volatile LONG MmCopyOnWriteCount;
+ volatile LONG MmTransitionCount;
+ volatile LONG MmCacheTransitionCount;
+ volatile LONG MmDemandZeroCount;
+ volatile LONG MmPageReadCount;
+ volatile LONG MmPageReadIoCount;
+ volatile LONG MmCacheReadCount;
+ volatile LONG MmCacheIoCount;
+ volatile LONG MmDirtyPagesWriteCount;
+ volatile LONG MmDirtyWriteIoCount;
+ volatile LONG MmMappedPagesWriteCount;
+ volatile LONG MmMappedWriteIoCount;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ ULONG CachedCommit;
+ ULONG CachedResidentAvailable;
+ PVOID HyperPte;
+ UCHAR CpuVendor;
+ UCHAR PrcbPad9[3];
+#else
+ ULONG SpareFields0[1];
+#endif
+ CHAR VendorString[13];
+ UCHAR InitialApicId;
+ UCHAR LogicalProcessorsPerPhysicalProcessor;
+ ULONG MHz;
+ ULONG FeatureBits;
+ LARGE_INTEGER UpdateSignature;
+ volatile LARGE_INTEGER IsrTime;
+ LARGE_INTEGER SpareField1;
+ FX_SAVE_AREA NpxSaveArea;
+ PROCESSOR_POWER_STATE PowerState;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ KDPC DpcWatchdogDoc;
+ KTIMER DpcWatchdogTimer;
+ PVOID WheaInfo;
+ PVOID EtwSupport;
+ SLIST_HEADER InterruptObjectPool;
+ LARGE_INTEGER HyperCallPagePhysical;
+ LARGE_INTEGER HyperCallPageVirtual;
+ PVOID RateControl;
+ CACHE_DESCRIPTOR Cache[5];
+ ULONG CacheCount;
+ ULONG CacheProcessorMask[5];
+ UCHAR LogicalProcessorsPerCore;
+ UCHAR PrcbPad8[3];
+ ULONG PackageProcessorSet;
+ ULONG CoreProcessorSet;
+#endif
+} KPRCB, *PKPRCB;
+
+//
+// Processor Control Region
+//
+typedef struct _KIPCR
+{
+ union
+ {
+ NT_TIB NtTib;
+ struct
+ {
+ struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList;
+ PVOID Used_StackBase;
+ PVOID PerfGlobalGroupMask;
+ PVOID TssCopy;
+ ULONG ContextSwitches;
+ KAFFINITY SetMemberCopy;
+ PVOID Used_Self;
+ };
+ };
+ struct _KPCR *Self;
+ struct _KPRCB *Prcb;
+ KIRQL Irql;
+ ULONG IRR;
+ ULONG IrrActive;
+ ULONG IDR;
+ PVOID KdVersionBlock;
+ PKIDTENTRY IDT;
+ PKGDTENTRY GDT;
+ struct _KTSS *TSS;
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ KAFFINITY SetMember;
+ ULONG StallScaleFactor;
+ UCHAR SparedUnused;
+ UCHAR Number;
+ UCHAR Reserved;
+ UCHAR L2CacheAssociativity;
+ ULONG VdmAlert;
+ ULONG KernelReserved[14];
+ ULONG SecondLevelCacheSize;
+ ULONG HalReserved[16];
+ ULONG InterruptMode;
+ UCHAR Spare1;
+ ULONG KernelReserved2[17];
+ KPRCB PrcbData;
+} KIPCR, *PKIPCR;
+#pragma pack(pop)
+
+//
+// TSS Definition
+//
+typedef struct _KiIoAccessMap
+{
+ UCHAR DirectionMap[32];
+ UCHAR IoMap[8196];
+} KIIO_ACCESS_MAP;
+
+typedef struct _KTSS
+{
+ USHORT Backlink;
+ USHORT Reserved0;
+ ULONG Esp0;
+ USHORT Ss0;
+ USHORT Reserved1;
+ ULONG NotUsed1[4];
+ ULONG CR3;
+ ULONG Eip;
+ ULONG EFlags;
+ ULONG Eax;
+ ULONG Ecx;
+ ULONG Edx;
+ ULONG Ebx;
+ ULONG Esp;
+ ULONG Ebp;
+ ULONG Esi;
+ ULONG Edi;
+ USHORT Es;
+ USHORT Reserved2;
+ USHORT Cs;
+ USHORT Reserved3;
+ USHORT Ss;
+ USHORT Reserved4;
+ USHORT Ds;
+ USHORT Reserved5;
+ USHORT Fs;
+ USHORT Reserved6;
+ USHORT Gs;
+ USHORT Reserved7;
+ USHORT LDT;
+ USHORT Reserved8;
+ USHORT Flags;
+ USHORT IoMapBase;
+ KIIO_ACCESS_MAP IoMaps[1];
+ UCHAR IntDirectionMap[32];
+} KTSS, *PKTSS;
+
+//
+// i386 CPUs don't have exception frames
+//
+typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
+#endif
+#endif
--- /dev/null
+/*++ NDK Version: 0095
+
+Copyright (c) Alex Ionescu. All rights reserved.
+
+Header Name:
+
+ mmtypes.h (X86)
+
+Abstract:
+
+ i386 Type definitions for the Memory Manager
+
+Author:
+
+ Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
+
+--*/
+
+#ifndef _AMD64_MMTYPES_H
+#define _AMD64_MMTYPES_H
+
+//
+// Dependencies
+//
+
+//
+// Page-related Macros
+//
+#define PAGE_SIZE 0x1000
+#define PAGE_SHIFT 12L
+#define MM_ALLOCATION_GRANULARITY 0x10000
+#define MM_ALLOCATION_GRANULARITY_SHIFT 16L
+
+//
+// Sanity checks for Paging Macros
+//
+#ifdef C_ASSERT
+C_ASSERT(PAGE_SIZE == (1 << PAGE_SHIFT));
+C_ASSERT(MM_ALLOCATION_GRANULARITY == (1 << MM_ALLOCATION_GRANULARITY_SHIFT));
+C_ASSERT(MM_ALLOCATION_GRANULARITY &&
+ !(MM_ALLOCATION_GRANULARITY & (MM_ALLOCATION_GRANULARITY - 1)));
+C_ASSERT(MM_ALLOCATION_GRANULARITY >= PAGE_SIZE);
+#endif
+
+//
+// PAE SEG0 Base?
+//
+#define KSEG0_BASE_PAE 0xE0000000
+
+//
+// Page Table Entry Definitions
+//
+typedef struct _HARDWARE_PTE_X86
+{
+ ULONG Valid:1;
+ ULONG Write:1;
+ ULONG Owner:1;
+ ULONG WriteThrough:1;
+ ULONG CacheDisable:1;
+ ULONG Accessed:1;
+ ULONG Dirty:1;
+ ULONG LargePage:1;
+ ULONG Global:1;
+ ULONG CopyOnWrite:1;
+ ULONG Prototype: 1;
+ ULONG reserved: 1;
+ ULONG PageFrameNumber:20;
+} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
+
+typedef struct _MMPTE_SOFTWARE
+{
+ ULONG Valid:1;
+ ULONG PageFileLow:4;
+ ULONG Protection:5;
+ ULONG Prototype:1;
+ ULONG Transition:1;
+ ULONG PageFileHigh:20;
+} MMPTE_SOFTWARE;
+
+typedef struct _MMPTE_TRANSITION
+{
+ ULONG Valid:1;
+ ULONG Write:1;
+ ULONG Owner:1;
+ ULONG WriteThrough:1;
+ ULONG CacheDisable:1;
+ ULONG Protection:5;
+ ULONG Prototype:1;
+ ULONG Transition:1;
+ ULONG PageFrameNumber:20;
+} MMPTE_TRANSITION;
+
+typedef struct _MMPTE_PROTOTYPE
+{
+ ULONG Valid:1;
+ ULONG ProtoAddressLow:7;
+ ULONG ReadOnly:1;
+ ULONG WhichPool:1;
+ ULONG Prototype:1;
+ ULONG ProtoAddressHigh:21;
+} MMPTE_PROTOTYPE;
+
+typedef struct _MMPTE_SUBSECTION
+{
+ ULONG Valid:1;
+ ULONG SubsectionAddressLow:4;
+ ULONG Protection:5;
+ ULONG Prototype:1;
+ ULONG SubsectionAddressHigh:20;
+ ULONG WhichPool:1;
+} MMPTE_SUBSECTION;
+
+typedef struct _MMPTE_LIST
+{
+ ULONG Valid:1;
+ ULONG OneEntry:1;
+ ULONG filler0:8;
+ ULONG NextEntry:20;
+ ULONG Prototype:1;
+ ULONG filler1:1;
+} MMPTE_LIST;
+
+#ifndef CONFIG_SMP
+
+typedef struct _MMPTE_HARDWARE
+{
+ ULONG Valid:1;
+ ULONG Write:1;
+ ULONG Owner:1;
+ ULONG WriteThrough:1;
+ ULONG CacheDisable:1;
+ ULONG Accessed:1;
+ ULONG Dirty:1;
+ ULONG LargePage:1;
+ ULONG Global:1;
+ ULONG CopyOnWrite:1;
+ ULONG Prototype:1;
+ ULONG reserved:1;
+ ULONG PageFrameNumber:20;
+} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
+
+#else
+
+typedef struct _MMPTE_HARDWARE
+{
+ ULONG Valid:1;
+ ULONG Writable:1;
+ ULONG Owner:1;
+ ULONG WriteThrough:1;
+ ULONG CacheDisable:1;
+ ULONG Accessed:1;
+ ULONG Dirty:1;
+ ULONG LargePage:1;
+ ULONG Global:1;
+ ULONG CopyOnWrite:1;
+ ULONG Prototype:1;
+ ULONG Write:1;
+ ULONG PageFrameNumber:20;
+} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
+
+#endif
+
+//
+// Use the right PTE structure
+//
+#define HARDWARE_PTE HARDWARE_PTE_X86
+#define PHARDWARE_PTE PHARDWARE_PTE_X86
+
+#endif
//
#ifdef _M_IX86
#include <i386/ketypes.h>
+#elif defined(_M_AMD64)
+#include <amd64/ketypes.h>
#elif defined(_M_PPC)
#include <powerpc/ketypes.h>
#elif defined(_M_ARM)
//
typedef struct _LDR_RESOURCE_INFO
{
- ULONG Type;
- ULONG Name;
+ ULONG_PTR Type;
+ ULONG_PTR Name;
ULONG Language;
} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
#ifndef __int64
#define __int64 long long
#endif
+#if defined(_M_AMD64) || defined(__x86_64__)
+#if defined(_X86_)
+#undef _X86_
+#endif
+#endif
#endif
#if defined(_WIN64)
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
-#if 0 /* TODO when WIN64 is here */
-inline unsigned long HandleToUlong(const void* h )
- { return((unsigned long) h ); }
-inline long HandleToLong( const void* h )
- { return((long) h ); }
-inline void* ULongToHandle( const long h )
+#if !defined(__midl) && !defined(__WIDL__)
+static inline unsigned long HandleToUlong(const void* h )
+ { return((unsigned long)(ULONG_PTR) h ); }
+static inline long HandleToLong( const void* h )
+ { return((long)(LONG_PTR) h ); }
+static inline void* ULongToHandle( const long h )
{ return((void*) (UINT_PTR) h ); }
-inline void* LongToHandle( const long h )
+static inline void* LongToHandle( const long h )
{ return((void*) (INT_PTR) h ); }
-inline unsigned long PtrToUlong( const void* p)
- { return((unsigned long) p ); }
-inline unsigned int PtrToUint( const void* p )
- { return((unsigned int) p ); }
-inline unsigned short PtrToUshort( const void* p )
- { return((unsigned short) p ); }
-inline long PtrToLong( const void* p )
- { return((long) p ); }
-inline int PtrToInt( const void* p )
- { return((int) p ); }
-inline short PtrToShort( const void* p )
- { return((short) p ); }
-inline void* IntToPtr( const int i )
+static inline unsigned long PtrToUlong( const void* p)
+ { return((unsigned long)(ULONG_PTR) p ); }
+static inline unsigned int PtrToUint( const void* p )
+ { return((unsigned int)(UINT_PTR) p ); }
+static inline unsigned short PtrToUshort( const void* p )
+ { return((unsigned short)(ULONG_PTR) p ); }
+static inline long PtrToLong( const void* p )
+ { return((long)(LONG_PTR) p ); }
+static inline int PtrToInt( const void* p )
+ { return((int)(INT_PTR) p ); }
+static inline short PtrToShort( const void* p )
+ { return((short)(INT_PTR) p ); }
+static inline void* IntToPtr( const int i )
{ return( (void*)(INT_PTR)i ); }
-inline void* UIntToPtr(const unsigned int ui)
+static inline void* UIntToPtr(const unsigned int ui)
{ return( (void*)(UINT_PTR)ui ); }
-inline void* LongToPtr( const long l )
+static inline void* LongToPtr( const long l )
{ return( (void*)(LONG_PTR)l ); }
-inline void* ULongToPtr( const unsigned long ul )
+static inline void* ULongToPtr( const unsigned long ul )
{ return( (void*)(ULONG_PTR)ul ); }
-#endif /* 0_ */
-
+#endif /* !__midl */
#else /* !_WIN64 */
typedef int INT_PTR, *PINT_PTR;
typedef unsigned int UINT_PTR, *PUINT_PTR;
(LPARAM)(HTREEITEM)(hitem))
#define TreeView_EnsureVisible(hwnd, hitem) \
- (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
+ (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))
#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
(BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
#include "intrin_arm.h"
#elif defined(__x86_64__)
/* TODO: the x64 architecture shares most of the i386 intrinsics. It should be easy to support */
-#include "intrin_x86_64.h"
+#include "intrin_x86.h"
#else
#error Unsupported architecture
#endif
return __sync_lock_test_and_set(Target, Value);
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) long long _InterlockedExchange64(volatile long long * const Target, const long long Value)
+{
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
+ __sync_synchronize();
+ return __sync_lock_test_and_set(Target, Value);
+}
+#endif
+
static __inline__ __attribute__((always_inline)) void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
{
/* NOTE: ditto */
return __sync_fetch_and_and(value, mask);
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) long _InterlockedAnd64(volatile long long * const value, const long long mask)
+{
+ return __sync_fetch_and_and(value, mask);
+}
+#endif
+
static __inline__ __attribute__((always_inline)) char _InterlockedOr8(volatile char * const value, const char mask)
{
return __sync_fetch_and_or(value, mask);
return __sync_fetch_and_or(value, mask);
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) long _InterlockedOr64(volatile long long * const value, const long long mask)
+{
+ return __sync_fetch_and_or(value, mask);
+}
+#endif
+
static __inline__ __attribute__((always_inline)) char _InterlockedXor8(volatile char * const value, const char mask)
{
return __sync_fetch_and_xor(value, mask);
return retval;
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b)
+{
+ unsigned char retval;
+ __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory");
+ return retval;
+}
+#endif
+
static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b)
{
unsigned char retval;
return retval;
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b)
+{
+ unsigned char retval;
+ __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory");
+ return retval;
+}
+#endif
/*** String operations ***/
/* NOTE: we don't set a memory clobber in the __stosX functions because Visual C++ doesn't */
);
}
+#if defined(_M_AMD64)
+/*** GS segment addressing ***/
+
+static __inline__ __attribute__((always_inline)) void __writegsbyte(const unsigned long Offset, const unsigned char Data)
+{
+ __asm__("movb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+static __inline__ __attribute__((always_inline)) void __writegsword(const unsigned long Offset, const unsigned short Data)
+{
+ __asm__("movw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+static __inline__ __attribute__((always_inline)) void __writegsdword(const unsigned long Offset, const unsigned long Data)
+{
+ __asm__("movl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+static __inline__ __attribute__((always_inline)) void __writegsqword(const unsigned long Offset, const unsigned __int64 Data)
+{
+ __asm__("movq %q[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+static __inline__ __attribute__((always_inline)) unsigned char __readgsbyte(const unsigned long Offset)
+{
+ unsigned char value;
+ __asm__("movb %%gs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
+ return value;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned short __readgsword(const unsigned long Offset)
+{
+ unsigned short value;
+ __asm__("movw %%gs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
+ return value;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned long __readgsdword(const unsigned long Offset)
+{
+ unsigned long value;
+ __asm__("movl %%gs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
+ return value;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned __int64 __readgsqword(const unsigned long Offset)
+{
+ unsigned long value;
+ __asm__("movq %%gs:%a[Offset], %q[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
+ return value;
+}
+
+static __inline__ __attribute__((always_inline)) void __incgsbyte(const unsigned long Offset)
+{
+ __asm__("incb %%gs:%a[Offset]" : : [Offset] "ir" (Offset));
+}
+
+static __inline__ __attribute__((always_inline)) void __incgsword(const unsigned long Offset)
+{
+ __asm__("incw %%gs:%a[Offset]" : : [Offset] "ir" (Offset));
+}
+
+static __inline__ __attribute__((always_inline)) void __incgsdword(const unsigned long Offset)
+{
+ __asm__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset));
+}
+
+/* NOTE: the bizarre implementation of __addgsxxx mimics the broken Visual C++ behavior */
+static __inline__ __attribute__((always_inline)) void __addgsbyte(const unsigned long Offset, const unsigned char Data)
+{
+ if(!__builtin_constant_p(Offset))
+ __asm__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset));
+ else
+ __asm__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+static __inline__ __attribute__((always_inline)) void __addgsword(const unsigned long Offset, const unsigned short Data)
+{
+ if(!__builtin_constant_p(Offset))
+ __asm__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset));
+ else
+ __asm__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+static __inline__ __attribute__((always_inline)) void __addgsdword(const unsigned long Offset, const unsigned int Data)
+{
+ if(!__builtin_constant_p(Offset))
+ __asm__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset));
+ else
+ __asm__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
+}
+
+#else
/*** FS segment addressing ***/
static __inline__ __attribute__((always_inline)) void __writefsbyte(const unsigned long Offset, const unsigned char Data)
{
else
__asm__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
+#endif
/*** Bit manipulation ***/
}
#ifndef __MSVCRT__
-static __inline__ __attribute__((always_inline)) unsigned long _rotl(const unsigned long value, const unsigned char shift)
+static __inline__ __attribute__((always_inline)) unsigned int _rotl(const unsigned int value, const int shift)
{
unsigned long retval;
__asm__("roll %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
+
+static __inline__ __attribute__((always_inline)) unsigned long _rotr(const unsigned int value, const unsigned char shift)
+{
+ unsigned long retval;
+ __asm__("rorl %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
+ return retval;
+}
#endif
static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char value, const unsigned char shift)
#define FILE_SYSTEM_NOT_SUPPORT 6
#define FILE_USER_DISALLOWED 7
#define FILE_READ_ONLY 8
-#define FILE_DIR_DISALOWED 9
+#define FILE_DIR_DISALOWED 9
#define COMMPROP_INITIALIZED 0xE73CF52E
#define SP_SERIALCOMM 1
typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID);
typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID);
typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
+typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR);
typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
#endif
#ifndef __INTERLOCKED_DECLARED
#define __INTERLOCKED_DECLARED
+
+#if defined (_M_AMD64) || defined (_M_IA64)
+
+#define InterlockedAnd _InterlockedAnd
+#define InterlockedOr _InterlockedOr
+#define InterlockedXor _InterlockedXor
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedDecrementAcquire InterlockedDecrement
+#define InterlockedDecrementRelease InterlockedDecrement
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
+#define InterlockedCompareExchangeRelease InterlockedCompareExchange
+#define InterlockedExchangePointer _InterlockedExchangePointer
+#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
+#define InterlockedAnd64 _InterlockedAnd64
+#define InterlockedOr64 _InterlockedOr64
+#define InterlockedXor64 _InterlockedXor64
+#define InterlockedIncrement64 _InterlockedIncrement64
+#define InterlockedDecrement64 _InterlockedDecrement64
+#define InterlockedExchange64 _InterlockedExchange64
+#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
+#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
+
+#else // !(defined (_M_AMD64) || defined (_M_IA64))
+
+LONG WINAPI InterlockedOr(IN OUT LONG volatile *,LONG);
+LONG WINAPI InterlockedAnd(IN OUT LONG volatile *,LONG);
LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG);
-/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *);
LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG);
-/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
-#define InterlockedExchangePointer(t,v) \
+#if defined(_WIN64)
+ /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
+ #define InterlockedExchangePointer(t,v) \
+ (PVOID)_InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v))
+ /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
+ #define InterlockedCompareExchangePointer(d,e,c) \
+ (PVOID)_InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c))
+#else
+ /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
+ #define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
+ /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
+ #define InterlockedCompareExchangePointer(d,e,c) \
+ (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
+#endif
LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
#endif
+
+#endif // !(defined (_M_AMD64) || defined (_M_IA64))
+
+#if !defined(InterlockedAnd)
+#define InterlockedAnd InterlockedAnd_Inline
+FORCEINLINE
+LONG
+InterlockedAnd_Inline(IN OUT volatile LONG *Target,
+ IN LONG Set)
+{
+ LONG i;
+ LONG j;
+
+ j = *Target;
+ do {
+ i = j;
+ j = _InterlockedCompareExchange((PLONG)Target,
+ i & Set,
+ i);
+
+ } while (i != j);
+
+ return j;
+}
+#endif
+
+#if !defined(InterlockedOr)
+#define InterlockedOr InterlockedOr_Inline
+FORCEINLINE
+LONG
+InterlockedOr_Inline(IN OUT volatile LONG *Target,
+ IN LONG Set)
+{
+ LONG i;
+ LONG j;
+
+ j = *Target;
+ do {
+ i = j;
+ j = _InterlockedCompareExchange((PLONG)Target,
+ i | Set,
+ i);
+
+ } while (i != j);
+
+ return j;
+}
+#endif
+
#endif /* __INTERLOCKED_DECLARED */
+
BOOL WINAPI IsBadCodePtr(FARPROC);
-BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT);
-BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT);
-BOOL WINAPI IsBadReadPtr(PCVOID,UINT);
-BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
-BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
-BOOL WINAPI IsBadWritePtr(PVOID,UINT);
+BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT_PTR);
+BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT_PTR);
+BOOL WINAPI IsBadReadPtr(PCVOID,UINT_PTR);
+BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT_PTR);
+BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT_PTR);
+BOOL WINAPI IsBadWritePtr(PVOID,UINT_PTR);
BOOL WINAPI IsDebuggerPresent(void);
#if (_WIN32_WINNT >= 0x0501)
BOOL WINAPI IsProcessInJob(HANDLE,HANDLE,PBOOL);
BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD);
BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
-BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
+BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
#if (_WIN32_WINNT >= 0x0600)
VOID WINAPI SetSecurityAccessMask(SECURITY_INFORMATION,LPDWORD);
#endif
#define pascal __stdcall
#define _pascal __stdcall
#define __pascal __stdcall
-#define PASCAL _pascal
+
#define CDECL _cdecl
+#define PASCAL _pascal
+
+#if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
#define STDCALL __stdcall
-#define WINAPI __stdcall
-#define WINAPIV __cdecl
-#define APIENTRY __stdcall
-#define CALLBACK __stdcall
-#define APIPRIVATE __stdcall
+#define CALLBACK __stdcall
+#define WINAPI __stdcall
+#define WINAPIV __cdecl
+#define APIENTRY WINAPI
+#define APIPRIVATE __stdcall
+#define PASCAL __stdcall
+#else
+#define STDCALL
+#define CALLBACK
+#define WINAPI
+#define WINAPIV
+#define APIENTRY WINAPI
+#define APIPRIVATE
+#define PASCAL pascal
+#endif
#define DECLSPEC_IMPORT __declspec(dllimport)
#define DECLSPEC_EXPORT __declspec(dllexport)
#endif
#endif
-/* i386 context definitions */
-#ifdef __i386__
-
-#define EXCEPTION_READ_FAULT 0
-#define EXCEPTION_WRITE_FAULT 1
-#define EXCEPTION_EXECUTE_FAULT 8
-
-#endif /* __i386__ */
-
#ifndef VOID
#define VOID void
#endif
#define THREAD_DIRECT_IMPERSONATION 0x200
#endif
#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
-#define EXCEPTION_NONCONTINUABLE 1
-#define EXCEPTION_MAXIMUM_PARAMETERS 15
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
#ifndef __NTDDK_H
#define MUTANT_QUERY_STATE 0x0001
#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
-#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
+#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
#define IMAGE_DIRECTORY_ENTRY_IMPORT 1
#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
#define IMAGE_REL_BASED_HIGHLOW 3
#define IMAGE_REL_BASED_HIGHADJ 4
#define IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
+#define IMAGE_REL_BASED_IA64_IMM64 9
+#define IMAGE_REL_BASED_DIR64 10
#define IMAGE_ARCHIVE_START_SIZE 8
#define IMAGE_ARCHIVE_START "!<arch>\n"
#define IMAGE_ARCHIVE_END "`\n"
} ACL_SIZE_INFORMATION;
/* FIXME: add more machines */
-#if defined(_X86_) || defined(unix) && !defined(__PowerPC__)
+#if defined(__i386__) && !defined(__PowerPC__)
#define SIZE_OF_80387_REGISTERS 80
#define CONTEXT_i386 0x10000
#define CONTEXT_i486 0x10000
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L)
#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
#define MAXIMUM_SUPPORTED_EXTENSION 512
+
+#define EXCEPTION_READ_FAULT 0
+#define EXCEPTION_WRITE_FAULT 1
+#define EXCEPTION_EXECUTE_FAULT 8
+
typedef struct _FLOATING_SAVE_AREA {
DWORD ControlWord;
DWORD StatusWord;
DWORD SegSs;
BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
} CONTEXT;
+#elif defined(__x86_64__)
+
+
+#define CONTEXT_AMD64 0x100000
+
+#if !defined(RC_INVOKED)
+#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L)
+#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L)
+#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L)
+#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
+
+#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
+#define CONTEXT_SERVICE_ACTIVE 0x10000000
+#define CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define CONTEXT_EXCEPTION_REPORTING 0x80000000
+#endif
+
+#define INITIAL_MXCSR 0x1f80
+#define INITIAL_FPCSR 0x027f
+#define EXCEPTION_READ_FAULT 0
+#define EXCEPTION_WRITE_FAULT 1
+#define EXCEPTION_EXECUTE_FAULT 8
+
+typedef struct DECLSPEC_ALIGN(16) _M128A {
+ ULONGLONG Low;
+ LONGLONG High;
+} M128A, *PM128A;
+
+typedef struct _XMM_SAVE_AREA32 {
+ WORD ControlWord;
+ WORD StatusWord;
+ BYTE TagWord;
+ BYTE Reserved1;
+ WORD ErrorOpcode;
+ DWORD ErrorOffset;
+ WORD ErrorSelector;
+ WORD Reserved2;
+ DWORD DataOffset;
+ WORD DataSelector;
+ WORD Reserved3;
+ DWORD MxCsr;
+ DWORD MxCsr_Mask;
+ M128A FloatRegisters[8];
+ M128A XmmRegisters[16];
+ BYTE Reserved4[96];
+} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
+
+typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
+ DWORD64 P1Home;
+ DWORD64 P2Home;
+ DWORD64 P3Home;
+ DWORD64 P4Home;
+ DWORD64 P5Home;
+ DWORD64 P6Home;
+
+ /* Control flags */
+ DWORD ContextFlags;
+ DWORD MxCsr;
+
+ /* Segment */
+ WORD SegCs;
+ WORD SegDs;
+ WORD SegEs;
+ WORD SegFs;
+ WORD SegGs;
+ WORD SegSs;
+ DWORD EFlags;
+
+ /* Debug */
+ DWORD64 Dr0;
+ DWORD64 Dr1;
+ DWORD64 Dr2;
+ DWORD64 Dr3;
+ DWORD64 Dr6;
+ DWORD64 Dr7;
+
+ /* Integer */
+ DWORD64 Rax;
+ DWORD64 Rcx;
+ DWORD64 Rdx;
+ DWORD64 Rbx;
+ DWORD64 Rsp;
+ DWORD64 Rbp;
+ DWORD64 Rsi;
+ DWORD64 Rdi;
+ DWORD64 R8;
+ DWORD64 R9;
+ DWORD64 R10;
+ DWORD64 R11;
+ DWORD64 R12;
+ DWORD64 R13;
+ DWORD64 R14;
+ DWORD64 R15;
+
+ /* Counter */
+ DWORD64 Rip;
+
+ /* Floating point */
+ union {
+ XMM_SAVE_AREA32 FltSave;
+ struct {
+ M128A Header[2];
+ M128A Legacy[8];
+ M128A Xmm0;
+ M128A Xmm1;
+ M128A Xmm2;
+ M128A Xmm3;
+ M128A Xmm4;
+ M128A Xmm5;
+ M128A Xmm6;
+ M128A Xmm7;
+ M128A Xmm8;
+ M128A Xmm9;
+ M128A Xmm10;
+ M128A Xmm11;
+ M128A Xmm12;
+ M128A Xmm13;
+ M128A Xmm14;
+ M128A Xmm15;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+
+ /* Vector */
+ M128A VectorRegister[26];
+ DWORD64 VectorControl;
+
+ /* Debug control */
+ DWORD64 DebugControl;
+ DWORD64 LastBranchToRip;
+ DWORD64 LastBranchFromRip;
+ DWORD64 LastExceptionToRip;
+ DWORD64 LastExceptionFromRip;
+} CONTEXT, *PCONTEXT;
+
+
+typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
+ union {
+ PM128A FloatingContext[16];
+ struct {
+ PM128A Xmm0;
+ PM128A Xmm1;
+ PM128A Xmm2;
+ PM128A Xmm3;
+ PM128A Xmm4;
+ PM128A Xmm5;
+ PM128A Xmm6;
+ PM128A Xmm7;
+ PM128A Xmm8;
+ PM128A Xmm9;
+ PM128A Xmm10;
+ PM128A Xmm11;
+ PM128A Xmm12;
+ PM128A Xmm13;
+ PM128A Xmm14;
+ PM128A Xmm15;
+ };
+ };
+
+ union {
+ PULONG64 IntegerContext[16];
+ struct {
+ PULONG64 Rax;
+ PULONG64 Rcx;
+ PULONG64 Rdx;
+ PULONG64 Rbx;
+ PULONG64 Rsp;
+ PULONG64 Rbp;
+ PULONG64 Rsi;
+ PULONG64 Rdi;
+ PULONG64 R8;
+ PULONG64 R9;
+ PULONG64 R10;
+ PULONG64 R11;
+ PULONG64 R12;
+ PULONG64 R13;
+ PULONG64 R14;
+ PULONG64 R15;
+ };
+ };
+} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+
+#define UNW_FLAG_NHANDLER 0x0 /* No handler. */
+#define UNW_FLAG_EHANDLER 0x1 /* Exception handler should be called */
+#define UNW_FLAG_UHANDLER 0x2 /* Termination handler that should be called when unwinding an exception */
+#define UNW_FLAG_CHAININFO 0x4 /* FunctionEntry member is the contents of a previous function table entry */
+
+#define RUNTIME_FUNCTION_INDIRECT 0x1
+
+ typedef struct _RUNTIME_FUNCTION {
+ DWORD BeginAddress;
+ DWORD EndAddress;
+ DWORD UnwindData;
+ } RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
+
+ typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
+ typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
+
+ #define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
+
+NTSYSAPI
+VOID
+__cdecl
+RtlRestoreContext(PCONTEXT ContextRecord,
+ struct _EXCEPTION_RECORD *ExceptionRecord);
+
+NTSYSAPI
+BOOLEAN
+__cdecl
+RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable,
+ DWORD EntryCount,
+ DWORD64 BaseAddress);
+
+NTSYSAPI
+BOOLEAN
+__cdecl
+RtlInstallFunctionTableCallback(DWORD64 TableIdentifier,
+ DWORD64 BaseAddress,
+ DWORD Length,
+ PGET_RUNTIME_FUNCTION_CALLBACK Callback,
+ PVOID Context,
+ PCWSTR OutOfProcessCallbackDll);
+
+NTSYSAPI
+BOOLEAN
+__cdecl
+RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable);
+
#elif defined(_PPC_)
#define CONTEXT_CONTROL 1L
#define CONTEXT_FLOATING_POINT 2L
#error "undefined processor type"
#endif
typedef CONTEXT *PCONTEXT,*LPCONTEXT;
-typedef struct _EXCEPTION_RECORD {
- DWORD ExceptionCode;
- DWORD ExceptionFlags;
- struct _EXCEPTION_RECORD *ExceptionRecord;
- PVOID ExceptionAddress;
- DWORD NumberParameters;
- ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD,*PEXCEPTION_RECORD,*LPEXCEPTION_RECORD;
-typedef struct _EXCEPTION_POINTERS {
- PEXCEPTION_RECORD ExceptionRecord;
- PCONTEXT ContextRecord;
-} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS;
+
+#define EXCEPTION_NONCONTINUABLE 1
+#define EXCEPTION_MAXIMUM_PARAMETERS 15
+
+ typedef struct _EXCEPTION_RECORD {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ struct _EXCEPTION_RECORD *ExceptionRecord;
+ PVOID ExceptionAddress;
+ DWORD NumberParameters;
+ ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD, *PEXCEPTION_RECORD, *LPEXCEPTION_RECORD;
+
+ typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;
+
+ typedef struct _EXCEPTION_RECORD32 {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ DWORD ExceptionRecord;
+ DWORD ExceptionAddress;
+ DWORD NumberParameters;
+ DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD32,*PEXCEPTION_RECORD32;
+
+ typedef struct _EXCEPTION_RECORD64 {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ DWORD64 ExceptionRecord;
+ DWORD64 ExceptionAddress;
+ DWORD NumberParameters;
+ DWORD __unusedAlignment;
+ DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD64,*PEXCEPTION_RECORD64;
+
+ typedef struct _EXCEPTION_POINTERS {
+ PEXCEPTION_RECORD ExceptionRecord;
+ PCONTEXT ContextRecord;
+ } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS;
#ifdef _M_PPC
#define LARGE_INTEGER_ORDER(x) x HighPart; DWORD LowPart;
#endif
NTSYSAPI
-WORD
+WORD
NTAPI
RtlCaptureStackBackTrace(
IN DWORD FramesToSkip,
OUT PDWORD BackTraceHash OPTIONAL
);
+NTSYSAPI
+VOID
+NTAPI
+RtlCaptureContext(
+ PCONTEXT ContextRecord
+);
NTSYSAPI
PVOID
WORD Hint;
BYTE Name[1];
} IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
-typedef struct _IMAGE_THUNK_DATA {
- union {
- ULONG ForwarderString;
- ULONG Function;
- DWORD Ordinal;
- ULONG AddressOfData;
- } u1;
-} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA;
+#include "pshpack8.h"
+typedef struct _IMAGE_THUNK_DATA64 {
+ union {
+ ULONGLONG ForwarderString;
+ ULONGLONG Function;
+ ULONGLONG Ordinal;
+ ULONGLONG AddressOfData;
+ } u1;
+} IMAGE_THUNK_DATA64;
+typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64;
+#include "poppack.h"
+
+typedef struct _IMAGE_THUNK_DATA32 {
+ union {
+ DWORD ForwarderString;
+ DWORD Function;
+ DWORD Ordinal;
+ DWORD AddressOfData;
+ } u1;
+} IMAGE_THUNK_DATA32;
+typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32;
+
+#define IMAGE_ORDINAL_FLAG64 0x8000000000000000
+#define IMAGE_ORDINAL_FLAG32 0x80000000
+#define IMAGE_ORDINAL64(Ordinal) (Ordinal & 0xffff)
+#define IMAGE_ORDINAL32(Ordinal) (Ordinal & 0xffff)
+#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64)!=0)
+#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32)!=0)
+
+typedef VOID
+(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID DllHandle,DWORD Reason,PVOID Reserved);
+
+typedef struct _IMAGE_TLS_DIRECTORY64 {
+ ULONGLONG StartAddressOfRawData;
+ ULONGLONG EndAddressOfRawData;
+ ULONGLONG AddressOfIndex;
+ ULONGLONG AddressOfCallBacks;
+ DWORD SizeOfZeroFill;
+ DWORD Characteristics;
+} IMAGE_TLS_DIRECTORY64;
+typedef IMAGE_TLS_DIRECTORY64 *PIMAGE_TLS_DIRECTORY64;
+
+typedef struct _IMAGE_TLS_DIRECTORY32 {
+ DWORD StartAddressOfRawData;
+ DWORD EndAddressOfRawData;
+ DWORD AddressOfIndex;
+ DWORD AddressOfCallBacks;
+ DWORD SizeOfZeroFill;
+ DWORD Characteristics;
+} IMAGE_TLS_DIRECTORY32;
+typedef IMAGE_TLS_DIRECTORY32 *PIMAGE_TLS_DIRECTORY32;
+#ifdef _WIN64
+#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64
+#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal)
+typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA;
+typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA;
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL64(Ordinal)
+typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;
+typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY;
+#else
+#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32
+#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL32(Ordinal)
+typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA;
+typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA;
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL32(Ordinal)
+typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY;
+typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY;
+#endif
+
typedef struct _IMAGE_IMPORT_DESCRIPTOR {
_ANONYMOUS_UNION union {
DWORD Characteristics;
WORD Reserved;
} IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF;
typedef void(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID,DWORD,PVOID);
-typedef struct _IMAGE_TLS_DIRECTORY {
- DWORD StartAddressOfRawData;
- DWORD EndAddressOfRawData;
- PDWORD AddressOfIndex;
- PIMAGE_TLS_CALLBACK *AddressOfCallBacks;
- DWORD SizeOfZeroFill;
- DWORD Characteristics;
-} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY;
typedef struct _IMAGE_RESOURCE_DIRECTORY {
DWORD Characteristics;
DWORD TimeDateStamp;
);
return ret;
}
+#elif defined (_M_AMD64)
+FORCEINLINE PVOID GetCurrentFiber(VOID)
+{
+ return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData));
+}
#elif defined (_M_ARM)
PVOID WINAPI GetCurrentFiber(VOID);
#else
return ret;
}
#elif _M_ARM
-
+
//
// NT-ARM is not documented
//
#define KIRQL ULONG // Hack!
#include <armddk.h>
-
+
+#elif defined (_M_AMD64)
+FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
+{
+ return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
+}
#else
static __inline__ struct _TEB * NtCurrentTeb(void)
{
#if defined(_M_IX86)
#define YieldProcessor() __asm__ __volatile__("pause");
+#elif defined (_M_AMD64)
+#define YieldProcessor() __asm__ __volatile__("pause");
#elif defined(_M_PPC)
#define YieldProcessor() __asm__ __volatile__("nop");
#elif defined(_M_MIPS)
#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b)
+#define InterlockedAnd _InterlockedAnd
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedOr _InterlockedOr
+
+#define InterlockedAnd64 _InterlockedAnd64
+#define InterlockedOr64 _InterlockedOr64
+
+#define InterlockedBitTestAndSet _interlockedbittestandset
+#define InterlockedBitTestAndSet64 _interlockedbittestandset64
+#define InterlockedBitTestAndReset _interlockedbittestandreset
+#define InterlockedBitTestAndReset64 _interlockedbittestandreset64
+
+
#endif
#else
#define STATE_SYSTEM_VALID 0x1fffffff
#ifndef RC_INVOKED
-typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
+typedef INT_PTR(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT,DWORD);
typedef BOOL(CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
typedef LRESULT(CALLBACK *HOOKPROC)(int,WPARAM,LPARAM);
typedef struct _LOADER_MODULE
{
- ULONG ModStart;
- ULONG ModEnd;
- ULONG String;
- ULONG Reserved;
+ ULONG_PTR ModStart;
+ ULONG_PTR ModEnd;
+ ULONG_PTR String;
+ ULONG_PTR Reserved;
} LOADER_MODULE, *PLOADER_MODULE;
typedef struct _ROS_LOADER_PARAMETER_BLOCK
{
ULONG Flags;
- ULONG MemLower;
- ULONG MemHigher;
+ ULONG_PTR MemLower;
+ ULONG_PTR MemHigher;
ULONG BootDevice;
PCHAR CommandLine;
ULONG ModsCount;
PLOADER_MODULE ModsAddr;
UCHAR Syms[12];
- ULONG MmapLength;
- ULONG MmapAddr;
- ULONG RdLength;
- ULONG RdAddr;
+ SIZE_T MmapLength;
+ ULONG_PTR MmapAddr;
+ SIZE_T RdLength;
+ ULONG_PTR RdAddr;
ULONG DrivesCount;
PARC_DISK_SIGNATURE DrivesAddr;
ULONG ConfigTable;
ULONG BootLoaderName;
- ULONG PageDirectoryStart;
- ULONG PageDirectoryEnd;
- ULONG KernelBase;
- ULONG ArchExtra;
+ ULONG_PTR PageDirectoryStart;
+ ULONG_PTR PageDirectoryEnd;
+ ULONG_PTR KernelBase;
+ ULONG_PTR ArchExtra;
} ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK;
extern BOOLEAN AcpiTableDetected;
LPARAM lParam,
BOOL Ansi);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallNoParam(
DWORD Routine);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallOneParam(
DWORD Param,
DWORD Routine);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallTwoParam(
DWORD Param1,
THREADSTATE_TASKMANWINDOW
};
-DWORD
+DWORD_PTR
NTAPI
NtUserGetThreadState(
DWORD Routine);
#include <stdarg.h>
#include <sys/types.h>
+#include <stdint.h>
#include <windef.h>
#include <winbase.h>
/* helper functions to manipulate the LDT_ENTRY structure */
inline static void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
{
- ent->BaseLow = (WORD)(unsigned long)base;
- ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16);
- ent->HighWord.Bits.BaseHi = (BYTE)((unsigned long)base >> 24);
+ ent->BaseLow = (WORD)(intptr_t)base;
+ ent->HighWord.Bits.BaseMid = (BYTE)((intptr_t)base >> 16);
+ ent->HighWord.Bits.BaseHi = (BYTE)((intptr_t)base >> 24);
}
inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
{
inline static void *wine_ldt_get_base( const LDT_ENTRY *ent )
{
return (void *)(ent->BaseLow |
- (unsigned long)ent->HighWord.Bits.BaseMid << 16 |
- (unsigned long)ent->HighWord.Bits.BaseHi << 24);
+ (intptr_t)ent->HighWord.Bits.BaseMid << 16 |
+ (intptr_t)ent->HighWord.Bits.BaseHi << 24);
}
inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
{
#define LIST_INIT(list) { &(list), &(list) }
/* get pointer to object containing list element */
+#ifdef _WIN64
#define LIST_ENTRY(elem, type, field) \
- ((type *)((char *)(elem) - (unsigned int)(&((type *)0)->field)))
+ ((type *)((char *)(elem) - (unsigned long long)(&((type *)0)->field)))
+#else
+#define LIST_ENTRY(elem, type, field) \
+ ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
+#endif
#endif /* __WINE_SERVER_LIST_H */
#if defined(__i386__) && defined(__GNUC__) && !defined(WINE_PORT_NO_INTERLOCKED)
-extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare )
-{
- long ret;
- __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
- : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
- return ret;
-}
-
-extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare )
-{
- void *ret;
- __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
- : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
- return ret;
-}
-
-extern inline long interlocked_xchg( long *dest, long val )
-{
- long ret;
- __asm__ __volatile__( "lock; xchgl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0" (val) : "memory" );
- return ret;
-}
-
-extern inline void *interlocked_xchg_ptr( void **dest, void *val )
-{
- void *ret;
- __asm__ __volatile__( "lock; xchgl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0" (val) : "memory" );
- return ret;
-}
-
-extern inline long interlocked_xchg_add( long *dest, long incr )
-{
- long ret;
- __asm__ __volatile__( "lock; xaddl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
- return ret;
-}
-
-#else /* __i386___ && __GNUC__ */
+#define interlocked_cmpxchg InterlockedCompareExchange
+#define interlocked_cmpxchg_ptr InterlockedCompareExchangePtr
+#define interlocked_xchg InterlockedExchange
+#define interlocked_xchg_ptr InterlockedExchangePtr
+#define interlocked_xchg_add InterlockedExchangeAdd
-extern long interlocked_cmpxchg( long *dest, long xchg, long compare );
-extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
-extern long interlocked_xchg( long *dest, long val );
-extern void *interlocked_xchg_ptr( void **dest, void *val );
-extern long interlocked_xchg_add( long *dest, long incr );
#endif /* __i386___ && __GNUC__ */
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
-#define interlocked_cmpxchg __WINE_NOT_PORTABLE(interlocked_cmpxchg)
-#define interlocked_cmpxchg_ptr __WINE_NOT_PORTABLE(interlocked_cmpxchg_ptr)
-#define interlocked_xchg __WINE_NOT_PORTABLE(interlocked_xchg)
-#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
-#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
#define lstat __WINE_NOT_PORTABLE(lstat)
#define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned)
#define memmove __WINE_NOT_PORTABLE(memmove)
<define name="BZ_NO_STDIO" />
<define name="BZ_DECOMPRESS_ONLY" />
<library>ntoskrnl</library>
- <library>hal</library>
<file>bzlib.c</file>
<file>randtable.c</file>
<file>crctable.c</file>
#ifdef _WIN32
# include <stdio.h>
-# define WINAPI __stdcall
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
# ifdef small
/* windows.h define small to char */
# undef small
char *ret;
int idx;
- idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
+ idx = InterlockedExchangeAdd( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
if ((ret = realloc( list[idx], size ))) list[idx] = ret;
return ret;
}
<define name="_MBCS" />
<define name="HAVE_WIN32_THREADS" />
<define name="_REENTRANT" />
- <define name="_WINSOCKAPI_" />
<define name="LIBXML_STATIC" />
<include base="libxml2">include</include>
<include base="libxml2">.</include>
void __set_app_type(int);
#endif /* __MSVCRT__ */
-/* Global _fmode for this .exe, not the one in msvcrt.dll,
- The default is set in txtmode.o in libmingw32.a */
-/* Override the dllimport'd declarations in stdlib.h */
-#undef _fmode
-extern int _fmode;
-#ifdef __MSVCRT__
-extern int* __p__fmode(void); /* To access the dll _fmode */
+#ifndef __initenv
+extern char ***_imp____initenv;
+#define __initenv (*_imp____initenv)
#endif
/*
/* Don't set the std file mode if the user hasn't set any value for it. */
if (_CRT_fmode)
{
- _fmode = _CRT_fmode;
+ *_imp___fmode = _CRT_fmode;
/*
* This overrides the default file mode settings for stdin,
/* Now sync the dll _fmode to the one for this .exe. */
#ifdef __MSVCRT__
- *__p__fmode() = _fmode;
+ *_imp___fmode = _fmode;
#else
*_imp___fmode_dll = _fmode;
#endif
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__x86_64__)
+ /* Align the stack to 16 bytes */
+ asm __volatile__ ("andq $-16, %%rsp" : : : "%rsp");
#elif defined(__mips__)
/* Align the stack to 16 bytes */
asm __volatile__ ("andi %sp,%sp,-16" : : : "%sp");
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
- nRet = main (_argc, _argv, _environ);
+ nRet = main (_argc, _argv, __initenv);
/*
* Perform exit processing for the C library. This means
/* Needed for the atexit prototype. */
#include <stdlib.h>
+#include <stddef.h>
typedef void (*func_ptr) (void);
extern func_ptr __CTOR_LIST__[];
void
__do_global_ctors (void)
{
- unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
- unsigned i;
+ unsigned long nptrs = (unsigned long) (ptrdiff_t) __CTOR_LIST__[0];
+ unsigned long i;
/*
* If the first entry in the constructor list is -1 then the list
*/
if (nptrs == -1)
{
- for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
- ;
+ for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);
}
/*
}
}
+
static void
do_pseudo_reloc (void* start, void* end, void* base)
{
- DWORD reloc_target;
+ ptrdiff_t reloc_target;
runtime_pseudo_reloc* r;
for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++)
{
- reloc_target = (DWORD) base + r->target;
- *((DWORD*) reloc_target) += r->addend;
+ reloc_target = (ptrdiff_t) base + r->target;
+ *((ptrdiff_t*) reloc_target) += r->addend;
}
}
__MINGW_IMPORT void __set_app_type(int);
#endif /* __MSVCRT__ */
-/* Global _fmode for this .exe, not the one in msvcrt.dll,
- The default is set in txtmode.o in libmingw32.a */
-/* Override the dllimport'd declarations in stdlib.h */
-#undef _fmode
-extern int _fmode;
-#ifdef __MSVCRT__
-extern int* __p__fmode(void); /* To access the dll _fmode */
+#ifndef __winitenv
+extern wchar_t ***_imp____winitenv;
+#define __winitenv (*_imp____winitenv)
#endif
/*
/* Don't set the std file mode if the user hasn't set any value for it. */
if (_CRT_fmode)
{
- _fmode = _CRT_fmode;
+ *_imp___fmode = _CRT_fmode;
/*
* This overrides the default file mode settings for stdin,
/* Now sync the dll _fmode to the one for this .exe. */
#ifdef __MSVCRT__
- *__p__fmode() = _fmode;
+ *_imp___fmode = _fmode;
#else
*_imp___fmode_dll = _fmode;
#endif
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__x86_64__)
+ /* Align the stack to 16 bytes */
+ asm __volatile__ ("andq $-16, %%rsp" : : : "%rsp");
#elif defined(__mips__)
/* Align the stack to 16 bytes */
asm __volatile__ ("andi %sp,%sp,-16" : : : "%sp");
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
- nRet = wmain (_argc, _wargv, _wenviron);
+ nRet = wmain (_argc, _wargv, __winitenv);
/*
* Perform exit processing for the C library. This means
#include <sys/cdefs.h>
#endif
-#ifdef _MSC_VER
static inline unsigned long __byte_swap_long ( unsigned long i )
{
char dst[4];
dst[1] = src[0];
return *(unsigned short*)&dst[0];
}
-#else/*_MSC_VER*/
-#define __word_swap_long(x) \
-({ register u_long __X = (x); \
- __asm ("rorl $16, %1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#if __GNUC__ >= 2
-#define __byte_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
- __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-#define __byte_swap_word(x) \
-__extension__ ({ register u_short __X = (x); \
- __asm ("xchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-#else /* __GNUC__ >= 2 */
-#define __byte_swap_long(x) \
-({ register u_long __X = (x); \
- __asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#define __byte_swap_word(x) \
-({ register u_short __X = (x); \
- __asm ("rorw $8, %w1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#endif /* __GNUC__ >= 2 */
-#endif /* _MSC_VER */
/*
* Macros for network/external number representation conversion.
--- /dev/null
+// Copyright (c) 2004/2005 KJK::Hyperion
+
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to dos so, subject to the following conditions:
+
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+.text
+.intel_syntax noprefix
+
+.globl __SEHCleanHandlerEnvironment
+__SEHCleanHandlerEnvironment:
+ cld
+ ret
+
+.globl __SEHCurrentRegistration
+__SEHCurrentRegistration:
+ mov rax, [fs:0]
+ ret
+
+.globl __SEHRegisterFrame
+__SEHRegisterFrame:
+ mov rcx, [rsp+4]
+ mov rax, [fs:0]
+ mov [rcx+0], eax
+ mov [fs:0], ecx
+ ret
+
+.globl __SEHUnregisterFrame
+__SEHUnregisterFrame:
+ mov rcx, [fs:0]
+ mov rcx, [rcx+0]
+ mov [fs:0], rcx
+ ret
+
+.globl __SEHGlobalUnwind
+__SEHGlobalUnwind:
+
+.extern __SEHRtlUnwind
+
+// RtlUnwind clobbers all the "don't clobber" registers, so we save them
+ push rbx
+ mov rbx, [rsp+8]
+ push rsi
+ push rdi
+
+ push 0 // ReturnValue
+ push 0 // ExceptionRecord
+// push .RestoreRegisters // TargetIp
+ push rbx // TargetFrame
+// call [__SEHRtlUnwind]
+
+.RestoreRegisters:
+ pop rdi
+ pop rsi
+ pop rbx
+
+ ret
+
+// EOF
} \
}
-#ifdef _X86_
+#ifdef __i386__
#define _SEH_TRACE_CONTEXT(FRAME_, CONTEXT_) \
{ \
if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CONTEXT) \
<file>framebased.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>framebased.S</file>
+ </directory>
+ </if>
<file>framebased.c</file>
</module>
LPWSTR FileName; /* Pointer into BufferName buffer */
LPCSTR DesktopIniContents = "[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n";
INFO2_HEADER Info2Contents[] = { { 5, 0, 0, 0x320, 0 } };
- SIZE_T BytesToWrite, BytesWritten, Needed;
+ DWORD BytesToWrite, BytesWritten, Needed;
HANDLE hFile = INVALID_HANDLE_VALUE;
HRESULT hr;
HANDLE tokenHandle = INVALID_HANDLE_VALUE;
PTOKEN_USER TokenUserInfo = NULL;
LPWSTR StringSid = NULL, p;
- SIZE_T Needed, DirectoryLength;
+ DWORD Needed, DirectoryLength;
INT len;
HRESULT hr;
static HRESULT STDMETHODCALLTYPE
RecycleBin5File_RecycleBinFile_GetFileName(
IN IRecycleBinFile *This,
- IN DWORD BufferSize,
+ IN SIZE_T BufferSize,
IN OUT LPWSTR Buffer,
- OUT DWORD *RequiredSize)
+ OUT SIZE_T *RequiredSize)
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
DWORD dwRequired;
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Run-Time Library
+ * PURPOSE: Debug Routines
+ * FILE: lib/rtl/i386/debug.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+.intel_syntax noprefix
+
+/* GLOBALS ****************************************************************/
+
+.globl _DbgBreakPoint
+.globl _DbgBreakPointWithStatus
+.globl _DbgUserBreakPoint
+.globl _DebugService
+.globl _DebugService2
+.globl _DbgBreakPointNoBugCheck
+.globl _RtlpBreakWithStatusInstruction
+
+/* FUNCTIONS ***************************************************************/
+
+.func DbgBreakPointNoBugCheck
+_DbgBreakPointNoBugCheck:
+ int 3
+ ret
+.endfunc
+
+.func DbgBreakPoint
+_DbgBreakPoint:
+_DbgUserBreakPoint:
+ int 3
+ ret
+.endfunc
+
+.func DbgBreakPointWithStatus
+_DbgBreakPointWithStatus:
+ mov eax, ecx
+
+_RtlpBreakWithStatusInstruction:
+ int 3
+ ret
+.endfunc
+
+.func DebugService2
+_DebugService2:
+ /* Call the interrupt */
+// mov eax, [rbp+8]
+// int 0x2D
+ int 3
+
+.endfunc
+
+.func DebugService
+_DebugService:
+
+ /* Save the registers */
+ push rcx
+ push rbx
+ push rdi
+ push rdi
+ push rbx
+
+ /* Call the Interrupt */
+ // FIXME: setup registers
+ int 0x2D
+ int 3
+
+ /* Restore registers */
+ pop rbx
+ pop rdi
+ pop rdi
+ pop rbx
+
+ /* Return */
+ ret 20
+.endfunc
DPRINT("RtlpCheckIntegerAtom(AtomName '%S' AtomValue %p)\n",
AtomName, AtomValue);
- if (!((ULONG)AtomName & 0xFFFF0000))
+ if (!((ULONG_PTR)AtomName & 0xFFFF0000))
{
- LoValue = (USHORT)((ULONG)AtomName & 0xFFFF);
+ LoValue = (USHORT)((ULONG_PTR)AtomName & 0xFFFF);
if (LoValue == 0)
LoValue = 0xC000;
IN OUT PRTL_DEBUG_INFORMATION Buf)
{
NTSTATUS Status = STATUS_SUCCESS;
- ULONG Pid = (ULONG) NtCurrentTeb()->Cid.UniqueProcess;
+ ULONG Pid = (ULONG_PTR) NtCurrentTeb()->Cid.UniqueProcess;
Buf->Flags = DebugInfoMask;
Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION);
Buf->TargetProcessHandle = NtCurrentProcess();
ClientId.UniqueThread = 0;
- ClientId.UniqueProcess = (HANDLE)ProcessId;
+ ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)ProcessId;
InitializeObjectAttributes(&ObjectAttributes,
NULL,
0,
USHORT i;
PUSHORT ShortPtr;
PULONG LongPtr;
+ PULONGLONG LongLongPtr;
for (i = 0; i < Count; i++)
{
*LongPtr = SWAPD(*LongPtr) + (ULONG)Delta;
break;
+ case IMAGE_REL_BASED_DIR64:
+ LongLongPtr = (PUINT64)RVA(Address, Offset);
+ *LongLongPtr = SWAPQ(*LongLongPtr) + Delta;
+ break;
+
case IMAGE_REL_BASED_HIGHADJ:
case IMAGE_REL_BASED_MIPS_JMPADDR:
default:
<directory name="arm">
<file>debug_asm.S</file>
</directory>
- <file>mem.c</file>
- <file>memgen.c</file>
+ <file>mem.c</file>
+ <file>memgen.c</file>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>debug_asm.S</file>
+ </directory>
</if>
<directory name="austin">
<file>avl.c</file>
#ifdef _PPC_
#define SWAPD(x) ((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)>>8)&0xff00)|(((x)>>24)&0xff))
#define SWAPW(x) ((((x)&0xff)<<8)|(((x)>>8)&0xff))
+#define SWAPQ(x) ((SWAPD((x)&0xffffffff) << 32) | (SWAPD((x)>>32)))
#else
-#define SWAPD(x) x
-#define SWAPW(x) x
+#define SWAPD(x) (x)
+#define SWAPW(x) (x)
+#define SWAPQ(x) (x)
#endif
VOID
flags |= ZEROPAD;
}
str = number(str, end,
- (unsigned long) va_arg(args, void *), 16,
+ (ULONG_PTR) va_arg(args, void *), 16,
field_width, precision, flags);
continue;
#define NDEBUG
#include <debug.h>
-/* FIXME *********************************************************************/
-
-/* FIXME: Interlocked functions that need to be made into a public header */
-FORCEINLINE
-LONG
-InterlockedAnd(IN OUT volatile LONG *Target,
- IN LONG Set)
-{
- LONG i;
- LONG j;
-
- j = *Target;
- do {
- i = j;
- j = _InterlockedCompareExchange((PLONG)Target,
- i & Set,
- i);
-
- } while (i != j);
-
- return j;
-}
-
-FORCEINLINE
-LONG
-InterlockedOr(IN OUT volatile LONG *Target,
- IN LONG Set)
-{
- LONG i;
- LONG j;
-
- j = *Target;
- do {
- i = j;
- j = _InterlockedCompareExchange((PLONG)Target,
- i | Set,
- i);
-
- } while (i != j);
-
- return j;
-}
-
/* FUNCTIONS *****************************************************************/
#ifdef _WIN64
RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENTION_LOCK)
#define RTL_SRWLOCK_BITS 4
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(_M_AMD64)
/* This macro will cause the code to assert if compiled with a buggy
version of GCC that doesn't align the wait blocks properly on the stack! */
#define ASSERT_SRW_WAITBLOCK(ptr) \
flags |= ZEROPAD;
}
str = number(str, end,
- (unsigned long) va_arg(args, void *), 16,
+ (ULONG_PTR) va_arg(args, void *), 16,
field_width, precision, flags);
continue;
* ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT if they're currently
* switched on.
*/
- ConsoleHandle = (HANDLE) _get_osfhandle(stdin->_file);
+ ConsoleHandle = (HANDLE)(ULONG_PTR) _get_osfhandle(stdin->_file);
RestoreMode = GetConsoleMode(ConsoleHandle, &ConsoleMode) &&
(0 != (ConsoleMode &
(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT)));
SetConsoleMode(ConsoleHandle,
ConsoleMode & (~ (ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT)));
}
- ReadConsoleA((HANDLE)_get_osfhandle(stdin->_file),
+ ReadConsoleA((HANDLE)(ULONG_PTR)_get_osfhandle(stdin->_file),
&c,
1,
&NumberOfCharsRead,
extern HANDLE hHeap;
-char* strndup(char* name, int len)
+char* strndup(char* name, size_t len)
{
char *s = malloc(len + 1);
if (s != NULL)
return s;
}
-wchar_t* wcsndup(wchar_t* name, int len)
+wchar_t* wcsndup(wchar_t* name, size_t len)
{
wchar_t *s = malloc((len + 1) * sizeof(wchar_t));
if (s != NULL)
return &__wargv;
}
+
CloseHandle(ProcessInformation.hThread);
// system should wait untill the calling process is finished
- _cwait(&nStatus,(int)ProcessInformation.hProcess,0);
+ _cwait(&nStatus,(intptr_t)ProcessInformation.hProcess,0);
CloseHandle(ProcessInformation.hProcess);
return nStatus;
return str;
}
-static int
+static intptr_t
do_spawnT(int mode, const _TCHAR* cmdname, const _TCHAR* args, const _TCHAR* envp)
{
STARTUPINFO StartupInfo = {0};
{
case _P_NOWAIT:
case _P_NOWAITO:
- return((int)ProcessInformation.hProcess);
+ return((intptr_t)ProcessInformation.hProcess);
case _P_OVERLAY:
CloseHandle(ProcessInformation.hProcess);
_exit(0);
CloseHandle(ProcessInformation.hProcess);
return( 0);
}
- return( (int)ProcessInformation.hProcess);
+ return( (intptr_t)ProcessInformation.hProcess);
}
/*
-#include <search.h>
#include <stdlib.h>
-
+#include <search.h>
/*
* @implemented
*/
-void *_lfind(const void *key, const void *base, size_t *nelp,
- size_t width, int (*compar)(const void *, const void *))
+void *_lfind(const void *key, const void *base, unsigned int *nelp,
+ unsigned int width, int (*compar)(const void *, const void *))
{
char* char_base = (char*)base;
unsigned int i;
return NULL;
}
+
-#include <search.h>
#include <stdlib.h>
#include <string.h>
+#include <search.h>
/*
* @implemented
*/
-void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
+void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
int (*compar)(const void *, const void *))
{
void *ret_find = _lfind(key,base,nelp,width,compar);
return base;
}
+
HANDLE hand = fdtoh(fd);
TRACE(":fd (%d) handle (%p)\n",fd,hand);
- return (long)hand;
+ return (long)(LONG_PTR)hand;
}
/*********************************************************************
if (!(oflags & (_O_BINARY | _O_TEXT)))
oflags |= _O_BINARY;
- fd = alloc_fd((HANDLE)handle, split_oflags(oflags));
+ fd = alloc_fd((HANDLE)(LONG_PTR)handle, split_oflags(oflags));
TRACE(":handle (%ld) fd (%d) flags 0x%08x\n", handle, fd, oflags);
return fd;
}
/*
* @implemented
*/
-#if defined(_UNICODE) || !(__MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3)
-long
-#else
-int
-#endif
+intptr_t
_tfindfirst(const _TCHAR* _name, struct _tfinddata_t* result)
{
WIN32_FIND_DATA FindFileData;
long hFindFile;
- hFindFile = (long)FindFirstFile(_name, &FindFileData);
+ hFindFile = (intptr_t)FindFirstFile(_name, &FindFileData);
if (hFindFile == -1) {
_dosmaperr(GetLastError());
return -1;
/*
* @implemented
*/
-int _tfindnext(
-#if defined(_UNICODE) || !(__MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3)
- long handle,
-#else
- int handle,
-#endif
- struct _tfinddata_t* result)
+intptr_t _tfindnext(intptr_t handle, struct _tfinddata_t* result)
{
WIN32_FIND_DATA FindFileData;
/*
* @implemented
*/
-long _tfindfirsti64(const _TCHAR *_name, struct _tfinddatai64_t *result)
+intptr_t _tfindfirsti64(const _TCHAR *_name, struct _tfinddatai64_t *result)
{
WIN32_FIND_DATA FindFileData;
long hFindFile;
- hFindFile = (long)FindFirstFile(_name, &FindFileData);
+ hFindFile = (intptr_t)FindFirstFile(_name, &FindFileData);
if (hFindFile == -1)
{
_dosmaperr(GetLastError());
return hFindFile;
}
-//_CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
-//_CRTIMP int __cdecl _findnexti64(long, struct _finddatai64_t*);
-
-
/*
* @implemented
*/
-int _tfindnexti64(long handle, struct _tfinddatai64_t *result)
+int _tfindnexti64(intptr_t handle, struct _tfinddatai64_t *result)
{
WIN32_FIND_DATA FindFileData;
/*
* @implemented
*/
-int _findclose(
-#if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3
- int handle
-#else
- long handle
-#endif
- )
+int _findclose(intptr_t handle)
{
- if (!FindClose((void*)handle)) {
+ if (!FindClose((HANDLE)handle)) {
_dosmaperr(GetLastError());
return -1;
}
flags |= ZEROPAD;
}
result = number(f,
- (unsigned long) va_arg(args, void *), 16,
+ (uintptr_t) va_arg(args, void *), 16,
field_width, precision, flags);
if (result < 0)
return -1;
flags |= ZEROPAD;
}
result = number(f,
- (unsigned long) va_arg(args, void *), 16,
+ (uintptr_t) va_arg(args, void *), 16,
field_width, precision, flags);
if (result < 0)
return -1;
#include <string.h>
+#undef __MINGW_IMPORT
+#define __MINGW_IMPORT
#include <ctype.h>
#undef _pctype
#define ISNUM(c) ((c) >= '0' && c <= '9')
-static unsigned long _toul(const TCHAR *s)
+static ULONG_PTR _toulptr(const TCHAR *s)
{
- unsigned long res;
- unsigned long n;
+ ULONG_PTR res;
+ ULONG_PTR n;
const TCHAR *p;
for (p = s; *p; p++)
fChildPreview = TRUE;
while (ISSPACE(*++p));
- hParent = (HWND) _toul(p);
+ hParent = (HWND) _toulptr(p);
if (hParent && IsWindow(hParent))
return LaunchScreenSaver(hParent);
--- /dev/null
+
+#define STUB(x) void x() {}
+
+STUB(KfLowerIrql)
+STUB(KeRaiseIrql)
+STUB(KeLowerIrql)
+STUB(KeRaiseIrqlToSynchLevel)
+STUB(KeRaiseIrqlToDpcLevel)
+STUB(KiIdleLoop)
+STUB(KeGetCurrentIrql)
+STUB(KeBugCheckEx)
+STUB(KeAcquireInStackQueuedSpinLockRaiseToSynch)
+STUB(KeNumberProcessors)
+STUB(KeBugcheckCallbackListHead)
+STUB(NtAdjustGroupsToken)
+STUB(NtAdjustPrivilegesToken)
+STUB(NtAllocateUserPhysicalPages)
+STUB(NtAreMappedFilesTheSame)
+STUB(MmUserProbeAddress)
+STUB(MmSizeOfMdl)
+STUB(MmBuildMdlForNonPagedPool)
+STUB(MmMapViewOfSection)
+STUB(ExpInterlockedPushEntrySList)
+STUB(ExAllocatePool)
+STUB(ExFreePool)
+STUB(ExFreePoolWithTag)
+STUB(ExAllocatePoolWithTag)
+STUB(PsGetCurrentThreadId)
+STUB(NtContinue)
+STUB(NtCreateEvent)
+STUB(NtCreateMutant)
+STUB(NtCreateSection)
+STUB(NtCreateSemaphore)
+STUB(NtCreateThread)
+STUB(NtCreateTimer)
+STUB(NtCreateToken)
+STUB(NtDebugContinue)
+STUB(NtDuplicateToken)
+STUB(NtExtendSection)
+STUB(NtFilterToken)
+STUB(NtFlushInstructionCache)
+STUB(NtFreeUserPhysicalPages)
+STUB(NtDebugActiveProcess)
+STUB(KeActiveProcessors)
+STUB(KeDisableInterrupts)
+STUB(KiSwapContext)
+STUB(KeContextToTrapFrame)
+STUB(KiDispatchException)
+STUB(MmSystemRangeStart)
+STUB(MiGetUserPageDirectoryCount)
+STUB(MmStats)
+STUB(PsCreateSystemThread)
+STUB(ExAcquireResourceLock)
+STUB(ExReleaseResourceLock)
+STUB(MiNonPagedPoolLength)
+STUB(MiNonPagedPoolStart)
+STUB(MmGetPfnForProcess)
+STUB(KiInitializeUserApc)
+STUB(KiComputeTimerTableIndex)
+STUB(KeBugcheckReasonCallbackListHead)
+STUB(BugCheckCallbackLock)
+STUB(NtCallbackReturn)
+STUB(NtCancelTimer)
+STUB(NtClearEvent)
+STUB(NtCompareTokens)
+STUB(NtCreateDebugObject)
+STUB(NtCreateIoCompletion)
+STUB(NtEnumerateSystemEnvironmentValuesEx)
+STUB(NtFlushVirtualMemory)
+STUB(NtGetWriteWatch)
+STUB(NtImpersonateAnonymousToken)
+STUB(NtLockVirtualMemory)
+STUB(NtMapUserPhysicalPages)
+STUB(NtMapUserPhysicalPagesScatter)
+STUB(NtMapViewOfSection)
+STUB(NtOpenEvent)
+STUB(NtOpenIoCompletion)
+STUB(NtOpenMutant)
+STUB(NtOpenSection)
+STUB(NtOpenSemaphore)
+STUB(NtOpenThread)
+STUB(NtOpenThreadToken)
+STUB(NtOpenTimer)
+STUB(NtProtectVirtualMemory)
+STUB(NtPulseEvent)
+STUB(NtQueryEvent)
+STUB(NtQueryInformationToken)
+STUB(NtQueryIoCompletion)
+STUB(NtQueryMutant)
+STUB(NtQuerySection)
+STUB(NtQuerySemaphore)
+STUB(NtQuerySystemEnvironmentValue)
+STUB(NtQuerySystemEnvironmentValueEx)
+STUB(NtQuerySystemInformation)
+STUB(NtQueryTimer)
+STUB(NtQueryVirtualMemory)
+STUB(NtRaiseException)
+STUB(NtReadVirtualMemory)
+STUB(NtReleaseMutant)
+STUB(NtReleaseSemaphore)
+STUB(NtRemoveIoCompletion)
+STUB(NtRemoveProcessDebug)
+STUB(NtResetEvent)
+STUB(NtResetWriteWatch)
+STUB(NtSetEvent)
+STUB(NtSetEventBoostPriority)
+STUB(NtSetInformationTokenNtSetInformationDebugObject)
+STUB(NtSetIoCompletion)
+STUB(NtSetLdtEntries)
+STUB(NtSetSystemEnvironmentValue)
+STUB(NtSetSystemEnvironmentValueEx)
+STUB(NtSetSystemInformation)
+STUB(NtSetTimer)
+STUB(NtUnlockVirtualMemory)
+STUB(NtUnmapViewOfSection)
+STUB(NtVdmControl)
+STUB(NtWaitForDebugEvent)
+STUB(NtWriteVirtualMemory)
+STUB(NtGetCurrentProcessorNumber)
+STUB(NtOpenThreadTokenEx)
+STUB(NtSetInformationDebugObject)
+STUB(NtSetInformationToken)
+STUB(KiSwapProcess)
+STUB(MmUpdatePageDir)
+STUB(KeGetCurrentProcessorNumber)
+STUB(MmDeleteKernelStack)
+STUB(MmCreateKernelStack)
+STUB(Ke386InitThreadWithContext)
+STUB(MmUnmapLockedPages)
+STUB(ExpInterlockedPopEntrySList)
+STUB(MmGetPhysicalAddress)
+STUB(MmFreeSectionSegments)
+STUB(ExAllocateFromNPagedLookasideList)
+STUB(ExInitializeNPagedLookasideList)
+STUB(SeTokenType)
+STUB(RtlGetCallersAddress)
+STUB(RtlCompareMemory)
+STUB(DbgkpSendApiMessage)
+STUB(MmGetFileNameForSection)
+STUB(DbgkpTraceLevel)
+STUB(ExpInitializeEventImplementation)
+STUB(ExpInitializeMutantImplementation)
+STUB(ExpInitializeSemaphoreImplementation)
+STUB(ExpInitializeTimerImplementation)
+STUB(ExpEnvironmentLock)
+STUB(ExpFirmwareTableProviderListHead)
+STUB(MmSectionObjectType)
+STUB(IoAcquireCancelSpinLock)
+STUB(IoReleaseCancelSpinLock)
+STUB(ExInterlockedInsertTailList)
+STUB(ExInterlockedRemoveHeadList)
+STUB(ExInterlockedAddLargeStatistic)
+STUB(MmProbeAndLockPages)
+STUB(IopCompletionMapping)
+STUB(CmpInitializeMachineDependentConfiguration)
+STUB(ExpInitLookasideLists)
+STUB(ExpFirmwareTableResource)
+STUB(MmMapViewInSystemSpace)
+STUB(MmNumberOfPhysicalPages)
+STUB(MmInitSystem)
+STUB(RtlInitializeRangeListPackage)
+STUB(ExInitPoolLookasidePointers)
+STUB(KiInitializeBugCheck)
+STUB(MmHighestUserAddress)
+STUB(DbgkInitialize)
+STUB(MmCreateMdl)
+STUB(MmMapLockedPage)
+STUB(PsThreadType)
+STUB(MiShutdownMemoryManager)
+STUB(ExfInterlockedCompareExchange64)
+STUB(ExAllocatePoolWithQuotaTag)
+STUB(ExInitializePagedLookasideList)
+STUB(ExInterlockedInsertHeadList)
+STUB(IoCheckEaBufferValidity)
+STUB(ExEventObjectType)
+STUB(IopDeleteIoCompletion)
+STUB(IoCompletionType)
+STUB(IoCompletionPacketLookaside)
+STUB(CancelSpinLock)
+STUB(KdbpCliInit)
+STUB(MmUnlockPages)
+STUB(KeDisconnectInterrupt)
+STUB(KeInitializeInterrupt)
+STUB(MmUnmapViewOfSection)
+STUB(MiFreeDescriptor)
+STUB(MmPfnDatabase)
+STUB(MmHighestPhysicalPage)
+STUB(MmIsPagePresent)
+STUB(MmCreateVirtualMappingForKernel)
+STUB(MmSetPageProtect)
+STUB(MiFreeDescriptorOrg)
+STUB(MmMapLockedPages)
+STUB(_PsThreadType)
+STUB(_ExEventObjectType)
+STUB(MmCreateHyperspaceMapping)
+STUB(MmDeleteHyperspaceMapping)
+STUB(MmCreateVirtualMapping)
+STUB(MmRawDeleteVirtualMapping)
+STUB(MmIsPageSwapEntry)
+STUB(MmDeletePageFileMapping)
+STUB(KeRosDumpStackFrames)
+STUB(RtlWalkFrameChain)
+STUB(MmCommitPagedPoolAddress)
+STUB(MmIsDirtyPage)
+STUB(MmSetDirtyPage)
+STUB(MmSetCleanPage)
+STUB(MmPageOutSectionView)
+STUB(MmAllocateSection)
+STUB(MmDeleteVirtualMapping)
+STUB(ExSystemLookasideListHead)
+STUB(PspGetOrSetContextKernelRoutine)
+STUB(PspW32ThreadCallout)
+STUB(ExTimerRundown)
+STUB(KeConnectInterrupt)
+STUB(MmWritePageSectionView)
+STUB(ExInitializeSystemLookasideList)
+STUB(KeRaiseUserException)
+STUB(PsIsThreadTerminating)
+STUB(ExMutantObjectType)
+STUB(_ExSemaphoreObjectType)
+STUB(MmCleanProcessAddressSpace)
+STUB(MmDeleteProcessAddressSpace)
+STUB(MmDeleteTeb)
+STUB(DbgkClearProcessDebugObject)
+STUB(MmSetMemoryPriorityProcess)
+STUB(MmInitializeHandBuiltProcess)
+STUB(MmInitializeHandBuiltProcess2)
+STUB(MmInitializeProcessAddressSpace)
+STUB(MmCreatePeb)
+STUB(MmQuerySystemSize)
+STUB(KeFeatureBits)
+STUB(MmGetFileObjectForSection)
+STUB(SepTokenObjectType)
+STUB(SeExchangePrimaryToken)
+STUB(SeIsTokenChild)
+STUB(SeTokenImpersonationLevel)
+STUB(SeSubProcessToken)
+STUB(SeAssignPrimaryToke)
+STUB(SeCopyClientToken)
+STUB(SepInitializeTokenImplementation)
+STUB(KiSystemService)
+STUB(KdpGdbStubInit)
+STUB(KdbpGetCommandLineSettings)
+STUB(KdbpSafeReadMemory)
+STUB(RtlpAllocateMemory)
+STUB(RtlFillMemoryUlong)
+STUB(RtlCaptureContext)
+STUB(RtlpGetExceptionAddress)
+STUB(RtlpCheckForActiveDebugger)
+STUB(RtlDispatchException)
+STUB(RtlpFreeMemory)
+STUB(RtlpLockAtomTable)
+STUB(RtlpUnlockAtomTable)
+STUB(PspW32ProcessCallout)
+STUB(DbgkDebugObjectType)
+STUB(DbgkCopyProcessDebugPort)
+STUB(MmCreateProcessAddressSpace)
+STUB(SeAssignPrimaryToken)
+STUB(SeDeassignPrimaryToken)
+STUB(SepCreateSystemProcessToken)
+STUB(KdbEnterDebuggerException)
+STUB(KdbpCliModuleLoaded)
+STUB(RtlpSetInDbgPrint)
+STUB(CHECK_PAGED_CODE_RTL)
+STUB(RtlpGetAtomEntry)
+STUB(RtlpFreeAtomHandle)
+STUB(RtlpFreeAtomTableEntry)
+STUB(RtlpAllocAtomTableEntry)
+STUB(RtlAcquirePebLock)
+STUB(RtlpGetMode)
+STUB(RtlReleasePebLock)
+STUB(RtlEnterHeapLock)
+STUB(RtlLeaveHeapLock)
+STUB(RtlInitializeHeapLock)
+STUB(LdrShutdownThread)
+STUB(RtlpDestroyAtomHandleTable)
+STUB(RtlpDestroyAtomTableLock)
+STUB(RtlpFreeAtomTable)
+STUB(RtlpAllocAtomTable)
+STUB(RtlpInitAtomTableLock)
+STUB(RtlpCreateAtomHandleTable)
+STUB(RtlpAllocDeallocQueryBufferSize)
+STUB(find_entry)
+STUB(RtlDeleteHeapLock)
+STUB(RtlUnwind)
+STUB(RtlpCreateAtomHandle)
+STUB(RtlInitializeContext)
+STUB(RtlpCurrentPeb)
+
+STUB(DbgCommandString)
+STUB(ExAcquireRundownProtection)
+STUB(ExAcquireRundownProtectionCacheAware)
+STUB(ExAcquireRundownProtectionCacheAwareEx)
+STUB(ExAcquireRundownProtectionEx)
+STUB(ExAllocateFromPagedLookasideList)
+STUB(ExAllocatePoolWithQuota)
+STUB(ExAllocatePoolWithTagPriority)
+STUB(ExDeleteNPagedLookasideList)
+STUB(ExDeletePagedLookasideList)
+STUB(ExEnterCriticalRegionAndAcquireResourceShared)
+STUB(ExEnterCriticalRegionAndAcquireSharedWaitForExclusive)
+STUB(ExFreeToPagedLookasideList)
+STUB(ExGetCurrentProcessorCounts)
+STUB(ExGetCurrentProcessorCpuUsage)
+STUB(ExGetPreviousMode)
+STUB(ExInitializeRundownProtection)
+STUB(ExInterlockedAddLargeInteger)
+STUB(ExInterlockedAddUlong)
+STUB(ExInterlockedPopEntryList)
+STUB(ExInterlockedPushEntryList)
+STUB(ExIsProcessorFeaturePresent)
+STUB(ExQueryDepthSList)
+STUB(ExQueryPoolBlockSize)
+STUB(ExRaiseException)
+STUB(ExRaiseStatus)
+STUB(ExReInitializeRundownProtection)
+STUB(ExReInitializeRundownProtectionCacheAware)
+STUB(ExReleaseRundownProtection)
+STUB(ExReleaseRundownProtectionCacheAware)
+STUB(ExReleaseRundownProtectionCacheAwareEx)
+STUB(ExReleaseRundownProtectionEx)
+STUB(ExRundownCompleted)
+STUB(ExRundownCompletedCacheAware)
+STUB(ExSemaphoreObjectType)
+STUB(ExVerifySuite)
+STUB(ExWaitForRundownProtectionRelease)
+STUB(ExWaitForRundownProtectionReleaseCacheAware)
+STUB(ExpInterlockedFlushSList)
+STUB(FsRtlAddBaseMcbEntry)
+STUB(FsRtlGetNextBaseMcbEntry)
+STUB(FsRtlInitializeBaseMcb)
+STUB(FsRtlLegalAnsiCharacterArray)
+STUB(FsRtlLookupBaseMcbEntry)
+STUB(FsRtlLookupLastBaseMcbEntry)
+STUB(FsRtlLookupLastBaseMcbEntryAndIndex)
+STUB(FsRtlNumberOfRunsInBaseMcb)
+STUB(FsRtlRemoveBaseMcbEntry)
+STUB(FsRtlResetBaseMcb)
+STUB(FsRtlSplitBaseMcb)
+STUB(FsRtlTruncateBaseMcb)
+STUB(FsRtlUninitializeBaseMcb)
+STUB(HalDispatchTable)
+STUB(HeadlessDispatch)
+STUB(InitializeSListHead)
+STUB(IoCheckDesiredAccess)
+STUB(IoCheckFunctionAccess)
+STUB(IoCheckQuerySetVolumeInformation)
+STUB(IoEnumerateRegisteredFiltersList)
+STUB(IoFileObjectType)
+STUB(IoForwardAndCatchIrp)
+STUB(IoGetCurrentProcess)
+STUB(IoGetDeviceToVerify)
+STUB(IoGetInitialStack)
+STUB(IoGetPagingIoPriority)
+STUB(IoGetStackLimits)
+STUB(IoIs32bitProcess)
+STUB(IoIsSystemThread)
+STUB(IoIsWdmVersionAvailable)
+STUB(IoSetCompletionRoutineEx)
+STUB(IoSetDeviceToVerify)
+STUB(IoSetHardErrorOrVerifyDevice)
+STUB(IoSetIoCompletion)
+STUB(IoThreadToProcess)
+STUB(IoTranslateBusAddress)
+STUB(IoValidateDeviceIoControlAccess)
+STUB(IoWMIDeviceObjectToProviderId)
+STUB(KdDebuggerEnabled)
+STUB(KdDebuggerNotPresent)
+STUB(KdRefreshDebuggerNotPresent)
+STUB(KeAcquireInStackQueuedSpinLockForDpc)
+STUB(KeAcquireQueuedSpinLock)
+STUB(KeAcquireQueuedSpinLockRaiseToSynch)
+STUB(KeAcquireSpinLockForDpc)
+STUB(KeAcquireSpinLockRaiseToDpc)
+STUB(KeAcquireSpinLockRaiseToSynch)
+STUB(KeDeregisterBugCheckCallback)
+STUB(KeDeregisterBugCheckReasonCallback)
+STUB(KeDeregisterNmiCallback)
+STUB(KeEnterCriticalRegion)
+STUB(KeEnterGuardedRegion)
+STUB(KeEnterKernelDebugger)
+STUB(KeExpandKernelStackAndCallout)
+STUB(KeFlushEntireTb)
+STUB(KeGenericCallDpc)
+STUB(KeGetRecommendedSharedDataAlignment)
+STUB(KeInitializeCrashDumpHeader)
+STUB(KeInvalidateAllCaches)
+STUB(KeIsWaitListEmpty)
+STUB(KeLastBranchMSR)
+STUB(KeLeaveCriticalRegion)
+STUB(KeLeaveGuardedRegion)
+STUB(KeQueryActiveProcessors)
+STUB(KeQueryMultiThreadProcessorSet)
+STUB(KeQueryPrcbAddress)
+STUB(KeReadStateMutex)
+STUB(KeRegisterBugCheckCallback)
+STUB(KeRegisterBugCheckReasonCallback)
+STUB(KeRegisterNmiCallback)
+STUB(KeReleaseInStackQueuedSpinLockForDpc)
+STUB(KeReleaseQueuedSpinLock)
+STUB(KeReleaseSpinLock)
+STUB(KeReleaseSpinLockForDpc)
+STUB(KeRestoreFloatingPointState)
+STUB(KeSaveFloatingPointState)
+STUB(KeSaveStateForHibernate)
+STUB(KeSetDmaIoCoherency)
+STUB(KeSignalCallDpcDone)
+STUB(KeSignalCallDpcSynchronize)
+STUB(KeSynchronizeExecution)
+STUB(KeTestSpinLock)
+STUB(KeTryToAcquireQueuedSpinLock)
+STUB(KeTryToAcquireQueuedSpinLockRaiseToSynch)
+STUB(KeUpdateRunTime)
+STUB(KeUpdateSystemTime)
+STUB(KeUserModeCallback)
+STUB(KeWaitForMutexObject)
+STUB(KfRaiseIrql)
+STUB(KiBugCheckData)
+STUB(KiCpuId)
+STUB(Mm64BitPhysicalAddress)
+STUB(MmAdjustWorkingSetSize)
+STUB(MmAdvanceMdl)
+STUB(MmAllocateContiguousMemory)
+STUB(MmAllocateContiguousMemorySpecifyCache)
+STUB(MmAllocateMappingAddress)
+STUB(MmAllocateNonCachedMemory)
+STUB(MmAllocatePagesForMdl)
+STUB(MmAllocatePagesForMdlEx)
+STUB(MmCanFileBeTruncated)
+STUB(MmCommitSessionMappedView)
+STUB(MmCreateMirror)
+STUB(MmCreateSection)
+STUB(MmDisableModifiedWriteOfSection)
+STUB(MmFlushImageSection)
+STUB(MmForceSectionClosed)
+STUB(MmFreeContiguousMemory)
+STUB(MmFreeContiguousMemorySpecifyCache)
+STUB(MmFreeMappingAddress)
+STUB(MmFreeNonCachedMemory)
+STUB(MmFreePagesFromMdl)
+STUB(MmGetVirtualForPhysical)
+STUB(MmGrowKernelStack)
+STUB(MmIsAddressValid)
+STUB(MmIsIoSpaceActive)
+STUB(MmIsNonPagedSystemAddressValid)
+STUB(MmIsThisAnNtAsSystem)
+STUB(MmLockPagableImageSection)
+STUB(MmMapLockedPagesSpecifyCache)
+STUB(MmMapLockedPagesWithReservedMapping)
+STUB(MmMapMemoryDumpMdl)
+STUB(MmMapVideoDisplay)
+STUB(MmMapViewInSessionSpace)
+STUB(MmPrefetchPages)
+STUB(MmProbeAndLockProcessPages)
+STUB(MmProbeAndLockSelectedPages)
+STUB(MmProtectMdlSystemAddress)
+STUB(MmSecureVirtualMemory)
+STUB(MmSetAddressRangeModified)
+STUB(MmSetBankedSection)
+STUB(MmUnmapReservedMapping)
+STUB(MmUnmapVideoDisplay)
+STUB(MmUnmapViewInSessionSpace)
+STUB(MmUnmapViewInSystemSpace)
+STUB(MmUnsecureVirtualMemory)
+STUB(NlsOemLeadByteInfo)
+STUB(ObDeleteCapturedInsertInfo)
+STUB(ObSetHandleAttributes)
+STUB(PfxFindPrefix)
+STUB(PfxInitialize)
+STUB(PfxInsertPrefix)
+STUB(PfxRemovePrefix)
+STUB(PoCancelDeviceNotify)
+STUB(PoRegisterDeviceNotify)
+STUB(PoRequestShutdownEvent)
+STUB(PoSetHiberRange)
+STUB(PoShutdownBugCheck)
+STUB(PsEstablishWin32Callouts)
+STUB(PsGetCurrentProcess)
+STUB(PsGetCurrentProcessWow64Process)
+STUB(PsGetCurrentThread)
+STUB(PsGetCurrentThreadPreviousMode)
+STUB(PsGetCurrentThreadProcess)
+STUB(PsGetCurrentThreadProcessId)
+STUB(PsGetCurrentThreadStackBase)
+STUB(PsGetCurrentThreadStackLimit)
+STUB(PsGetCurrentThreadTeb)
+STUB(PsGetCurrentThreadWin32Thread)
+STUB(PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion)
+STUB(PsGetProcessSessionIdEx)
+STUB(PsGetProcessWow64Process)
+STUB(PsGetThreadFreezeCount)
+STUB(PsGetThreadHardErrorsAreDisabled)
+STUB(PsGetThreadId)
+STUB(PsGetThreadProcess)
+STUB(PsGetThreadProcessId)
+STUB(PsGetThreadSessionId)
+STUB(PsGetThreadTeb)
+STUB(PsGetThreadWin32Thread)
+STUB(PsIsSystemProcess)
+STUB(PsIsSystemThread)
+STUB(PsIsThreadImpersonating)
+STUB(PsLookupThreadByThreadId)
+STUB(PsProcessType)
+STUB(PsSetThreadHardErrorsAreDisabled)
+STUB(PsSetThreadWin32Thread)
+STUB(PsWrapApcWow64Thread)
+STUB(RtlAnsiStringToUnicodeSize)
+STUB(RtlCompareMemoryUlong)
+STUB(RtlCopyMemory)
+STUB(RtlCopyMemoryNonTemporal)
+STUB(RtlFillMemory)
+STUB(RtlLookupFunctionEntry)
+STUB(RtlMoveMemory)
+STUB(RtlOemStringToUnicodeSize)
+STUB(RtlPcToFileHeader)
+STUB(RtlPrefetchMemoryNonTemporal)
+STUB(RtlRestoreContext)
+STUB(RtlTraceDatabaseAdd)
+STUB(RtlTraceDatabaseCreate)
+STUB(RtlTraceDatabaseDestroy)
+STUB(RtlTraceDatabaseEnumerate)
+STUB(RtlTraceDatabaseFind)
+STUB(RtlTraceDatabaseLock)
+STUB(RtlTraceDatabaseUnlock)
+STUB(RtlTraceDatabaseValidate)
+STUB(RtlUnicodeStringToAnsiSize)
+STUB(RtlUnicodeStringToOemSize)
+STUB(RtlUnwindEx)
+STUB(RtlVirtualUnwind)
+STUB(RtlZeroMemory)
+STUB(SeFilterToken)
+STUB(SeQueryAuthenticationIdToken)
+STUB(SeQueryInformationToken)
+STUB(SeQuerySessionIdToken)
+STUB(SeReportSecurityEvent)
+STUB(SeSetAuditParameter)
+STUB(SeTokenIsAdmin)
+STUB(SeTokenIsRestricted)
+STUB(SeTokenObjectType)
+STUB(VfFailDeviceNode)
+STUB(VfFailDriver)
+STUB(VfFailSystemBIOS)
+STUB(VfIsVerificationEnabled)
+STUB(WmiFlushTrace)
+STUB(WmiGetClock)
+STUB(WmiQueryTrace)
+STUB(WmiQueryTraceInformation)
+STUB(WmiStartTrace)
+STUB(WmiStopTrace)
+STUB(WmiTraceFastEvent)
+STUB(WmiTraceMessage)
+STUB(WmiTraceMessageVa)
+STUB(WmiUpdateTrace)
+STUB(XIPDispatch)
+STUB(__C_specific_handler)
+STUB(__misaligned_access)
+STUB(_local_unwind)
+STUB(_setjmp)
+STUB(_setjmpex)
+STUB(longjmp)
+STUB(KfReleaseSpinLock)
+STUB(KeAcquireInStackQueuedSpinLock)
+STUB(KeReleaseInStackQueuedSpinLock)
+STUB(KfAcquireSpinLock)
+STUB(KeBugCheck)
+STUB(MmMapIoSpace)
+STUB(MmUnmapIoSpace)
+STUB(MmFindRegion)
+STUB(MmAlterRegion)
+STUB(MmInitializeRegion)
+STUB(MmDisableVirtualMapping)
+STUB(MmCreatePageFileMapping)
+STUB(MmEnableVirtualMapping)
--- /dev/null
+#ifndef _INTRIN_INTERNAL_
+#define _INTRIN_INTERNAL_
+
+#ifdef CONFIG_SMP
+#define LOCK "lock ; "
+#else
+#define LOCK ""
+#endif
+
+#if defined(__GNUC__)
+
+#define Ke386SetInterruptDescriptorTable(X) \
+ __asm__("lidt %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386GetInterruptDescriptorTable(X) \
+ __asm__("sidt %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386SetGlobalDescriptorTable(X) \
+ __asm__("lgdt %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386GetGlobalDescriptorTable(X) \
+ __asm__("sgdt %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386GetLocalDescriptorTable(X) \
+ __asm__("sldt %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386SetLocalDescriptorTable(X) \
+ __asm__("lldt %w0\n\t" \
+ : /* no outputs */ \
+ : "q" (X));
+
+#define Ke386SetTr(X) __asm__ __volatile__("ltr %%ax" : :"a" (X));
+
+#define Ke386GetTr(X) \
+ __asm__("str %0\n\t" \
+ : /* no outputs */ \
+ : "m" (X));
+
+#define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
+#define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+
+#define _Ke386GetSeg(N) ({ \
+ unsigned int __d; \
+ __asm__("movl %%" #N ",%0\n\t" :"=r" (__d)); \
+ __d; \
+ })
+
+#define _Ke386SetSeg(N,X) __asm__ __volatile__("movl %0,%%" #N : :"r" (X));
+
+#define _Ke386GetDr(N) ({ \
+ unsigned int __d; \
+ __asm__("movl %%dr" #N ",%0\n\t" :"=r" (__d)); \
+ __d; \
+ })
+
+#define _Ke386SetDr(N,X) __asm__ __volatile__("movl %0,%%dr" #N : :"r" (X));
+
+
+static inline void Ki386Cpuid(ULONG Op, PULONG Eax, PULONG Ebx, PULONG Ecx, PULONG Edx)
+{
+ __asm__("cpuid"
+ : "=a" (*Eax), "=b" (*Ebx), "=c" (*Ecx), "=d" (*Edx)
+ : "0" (Op));
+}
+
+#define Ke386Rdmsr(msr,val1,val2) __asm__ __volatile__("rdmsr" : "=a" (val1), "=d" (val2) : "c" (msr))
+#define Ke386Wrmsr(msr,val1,val2) __asm__ __volatile__("wrmsr" : /* no outputs */ : "c" (msr), "a" (val1), "d" (val2))
+
+#define Ke386HaltProcessor() __asm__("hlt\n\t");
+
+#define Ke386FnInit() __asm__("fninit\n\t");
+
+
+//
+// CR Macros
+//
+#define Ke386SetCr2(X) __asm__ __volatile__("movl %0,%%cr2" : :"r" (X));
+
+//
+// DR Macros
+//
+#define Ke386GetDr0() _Ke386GetDr(0)
+#define Ke386GetDr1() _Ke386GetDr(1)
+#define Ke386SetDr0(X) _Ke386SetDr(0,X)
+#define Ke386SetDr1(X) _Ke386SetDr(1,X)
+#define Ke386GetDr2() _Ke386GetDr(2)
+#define Ke386SetDr2(X) _Ke386SetDr(2,X)
+#define Ke386GetDr3() _Ke386GetDr(3)
+#define Ke386SetDr3(X) _Ke386SetDr(3,X)
+#define Ke386GetDr4() _Ke386GetDr(4)
+#define Ke386SetDr4(X) _Ke386SetDr(4,X)
+#define Ke386GetDr6() _Ke386GetDr(6)
+#define Ke386SetDr6(X) _Ke386SetDr(6,X)
+#define Ke386GetDr7() _Ke386GetDr(7)
+#define Ke386SetDr7(X) _Ke386SetDr(7,X)
+
+//
+// Segment Macros
+//
+#define Ke386GetSs() _Ke386GetSeg(ss)
+#define Ke386GetFs() _Ke386GetSeg(fs)
+#define Ke386SetFs(X) _Ke386SetSeg(fs, X)
+#define Ke386SetDs(X) _Ke386SetSeg(ds, X)
+#define Ke386SetEs(X) _Ke386SetSeg(es, X)
+
+#elif defined(_MSC_VER)
+
+VOID
+FORCEINLINE
+Ke386Wrmsr(IN ULONG Register,
+ IN ULONG Var1,
+ IN ULONG Var2)
+{
+ __asm mov eax, Var1;
+ __asm mov edx, Var2;
+ __asm wrmsr;
+}
+
+ULONGLONG
+FORCEINLINE
+Ke386Rdmsr(IN ULONG Register,
+ IN ULONG Var1,
+ IN ULONG Var2)
+{
+ __asm mov eax, Var1;
+ __asm mov edx, Var2;
+ __asm rdmsr;
+}
+
+VOID
+FORCEINLINE
+Ki386Cpuid(IN ULONG Operation,
+ OUT PULONG Var1,
+ OUT PULONG Var2,
+ OUT PULONG Var3,
+ OUT PULONG Var4)
+{
+ __asm mov eax, Operation;
+ __asm cpuid;
+ __asm mov [Var1], eax;
+ __asm mov [Var2], ebx;
+ __asm mov [Var3], ecx;
+ __asm mov [Var4], edx;
+}
+
+VOID
+FORCEINLINE
+Ke386FnInit(VOID)
+{
+ __asm fninit;
+}
+
+VOID
+FORCEINLINE
+Ke386HaltProcessor(VOID)
+{
+ __asm hlt;
+}
+
+VOID
+FORCEINLINE
+Ke386GetInterruptDescriptorTable(OUT KDESCRIPTOR Descriptor)
+{
+ __asm sidt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetInterruptDescriptorTable(IN KDESCRIPTOR Descriptor)
+{
+ __asm lidt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386GetGlobalDescriptorTable(OUT KDESCRIPTOR Descriptor)
+{
+ __asm sgdt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetGlobalDescriptorTable(IN KDESCRIPTOR Descriptor)
+{
+ __asm lgdt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386GetLocalDescriptorTable(OUT USHORT Descriptor)
+{
+ __asm sldt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetLocalDescriptorTable(IN USHORT Descriptor)
+{
+ __asm lldt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SaveFlags(IN ULONG Flags)
+{
+ __asm pushf;
+ __asm pop Flags;
+}
+
+VOID
+FORCEINLINE
+Ke386RestoreFlags(IN ULONG Flags)
+{
+ __asm push Flags;
+ __asm popf;
+}
+
+VOID
+FORCEINLINE
+Ke386SetTr(IN USHORT Tr)
+{
+ __asm ltr Tr;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetTr(IN USHORT Tr)
+{
+ __asm str Tr;
+}
+
+//
+// CR Macros
+//
+VOID
+FORCEINLINE
+Ke386SetCr2(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov cr2, eax;
+}
+
+//
+// DR Macros
+//
+ULONG
+FORCEINLINE
+Ke386GetDr0(VOID)
+{
+ __asm mov eax, dr0;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr1(VOID)
+{
+ __asm mov eax, dr1;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr2(VOID)
+{
+ __asm mov eax, dr2;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr3(VOID)
+{
+ __asm mov eax, dr3;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr6(VOID)
+{
+ __asm mov eax, dr6;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr7(VOID)
+{
+ __asm mov eax, dr7;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr0(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr0, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr1(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr1, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr2(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr2, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr3(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr3, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr6(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr6, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr7(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr7, eax;
+}
+
+//
+// Segment Macros
+//
+USHORT
+FORCEINLINE
+Ke386GetSs(VOID)
+{
+ __asm mov ax, ss;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetFs(VOID)
+{
+ __asm mov ax, fs;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetDs(VOID)
+{
+ __asm mov ax, ds;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetEs(VOID)
+{
+ __asm mov ax, es;
+}
+
+VOID
+FORCEINLINE
+Ke386SetSs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov ss, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetFs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov fs, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov ds, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetEs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov es, ax;
+}
+
+#else
+#error Unknown compiler for inline assembler
+#endif
+
+#endif
+
+/* EOF */
--- /dev/null
+#ifndef __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
+#define __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#define X86_EFLAGS_TF 0x00000100 /* Trap flag */
+#define X86_EFLAGS_IF 0x00000200 /* Interrupt Enable flag */
+#define X86_EFLAGS_IOPL 0x00003000 /* I/O Privilege Level bits */
+#define X86_EFLAGS_NT 0x00004000 /* Nested Task flag */
+#define X86_EFLAGS_RF 0x00010000 /* Resume flag */
+#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
+#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
+
+#define X86_CR0_PE 0x00000001 /* enable Protected Mode */
+#define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */
+#define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */
+#define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */
+#define X86_CR0_MP 0x00000002 /* enable FPU monitoring */
+#define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */
+#define X86_CR0_PG 0x80000000 /* enable Paging */
+
+#define X86_CR4_PAE 0x00000020 /* enable physical address extensions */
+#define X86_CR4_PGE 0x00000080 /* enable global pages */
+#define X86_CR4_OSFXSR 0x00000200 /* enable FXSAVE/FXRSTOR instructions */
+#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable #XF exception */
+
+#define X86_FEATURE_VME 0x00000002 /* Virtual 8086 Extensions are present */
+#define X86_FEATURE_TSC 0x00000010 /* time stamp counters are present */
+#define X86_FEATURE_PAE 0x00000040 /* physical address extension is present */
+#define X86_FEATURE_CX8 0x00000100 /* CMPXCHG8B instruction present */
+#define X86_FEATURE_SYSCALL 0x00000800 /* SYSCALL/SYSRET support present */
+#define X86_FEATURE_PGE 0x00002000 /* Page Global Enable */
+#define X86_FEATURE_MMX 0x00800000 /* MMX extension present */
+#define X86_FEATURE_FXSR 0x01000000 /* FXSAVE/FXRSTOR instructions present */
+#define X86_FEATURE_SSE 0x02000000 /* SSE extension present */
+#define X86_FEATURE_SSE2 0x04000000 /* SSE2 extension present */
+#define X86_FEATURE_HT 0x10000000 /* Hyper-Threading present */
+
+#define X86_EXT_FEATURE_SSE3 0x00000001 /* SSE3 extension present */
+#define X86_EXT_FEATURE_3DNOW 0x40000000 /* 3DNOW! extension present */
+
+#define FRAME_EDITED 0xFFF8
+
+#ifndef __ASM__
+
+#include "intrin_i.h"
+
+//#define KeArchFnInit() Ke386FnInit()
+#define KeArchFnInit() DbgPrint("KeArchFnInit is unimplemented!\n");
+#define KeArchHaltProcessor() Ke386HaltProcessor()
+
+extern ULONG Ke386CacheAlignment;
+
+struct _KPCR;
+VOID
+KiInitializeGdt(struct _KPCR* Pcr);
+VOID
+Ki386ApplicationProcessorInitializeTSS(VOID);
+
+VOID
+FASTCALL
+Ki386InitializeTss(
+ IN PKTSS Tss,
+ IN PKIDTENTRY Idt,
+ IN PKGDTENTRY Gdt
+);
+
+VOID
+KiGdtPrepareForApplicationProcessorInit(ULONG Id);
+VOID
+Ki386InitializeLdt(VOID);
+VOID
+Ki386SetProcessorFeatures(VOID);
+
+VOID
+NTAPI
+KiSetCR0Bits(VOID);
+
+VOID
+NTAPI
+KiGetCacheInformation(VOID);
+
+BOOLEAN
+NTAPI
+KiIsNpxPresent(
+ VOID
+);
+
+BOOLEAN
+NTAPI
+KiIsNpxErrataPresent(
+ VOID
+);
+
+VOID
+NTAPI
+KiSetProcessorType(VOID);
+
+ULONG
+NTAPI
+KiGetFeatureBits(VOID);
+
+ULONG KeAllocateGdtSelector(ULONG Desc[2]);
+VOID KeFreeGdtSelector(ULONG Entry);
+VOID
+NtEarlyInitVdm(VOID);
+VOID
+KeApplicationProcessorInitDispatcher(VOID);
+VOID
+KeCreateApplicationProcessorIdleThread(ULONG Id);
+
+typedef
+VOID
+(NTAPI*PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine,
+ PVOID StartContext);
+
+VOID
+NTAPI
+Ke386InitThreadWithContext(PKTHREAD Thread,
+ PKSYSTEM_ROUTINE SystemRoutine,
+ PKSTART_ROUTINE StartRoutine,
+ PVOID StartContext,
+ PCONTEXT Context);
+#define KeArchInitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context) \
+ Ke386InitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context)
+
+#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
+VOID
+NTAPI
+KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
+ PKSTART_ROUTINE StartRoutine,
+ PVOID StartContext,
+ BOOLEAN UserThread,
+ KTRAP_FRAME TrapFrame);
+#endif
+
+#endif
+#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */
+
+/* EOF */
--- /dev/null
+/*
+ * Lowlevel memory managment definitions
+ */
+
+#ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H
+#define __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H
+
+struct _EPROCESS;
+PULONG MmGetPageDirectory(VOID);
+
+#define PAGE_MASK(x) ((x)&(~0xfff))
+#define PAE_PAGE_MASK(x) ((x)&(~0xfffLL))
+
+/* Base addresses of PTE and PDE */
+#define PAGETABLE_MAP (0xc0000000)
+#define PAGEDIRECTORY_MAP (0xc0000000 + (PAGETABLE_MAP / (1024)))
+
+/* Converting address to a corresponding PDE or PTE entry */
+#define MiAddressToPde(x) \
+ ((PMMPTE)(((((ULONG)(x)) >> 22) << 2) + PAGEDIRECTORY_MAP))
+#define MiAddressToPte(x) \
+ ((PMMPTE)(((((ULONG)(x)) >> 12) << 2) + PAGETABLE_MAP))
+
+#define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
+#define ADDR_TO_PDE_OFFSET(v) ((((ULONG)(v)) / (1024 * PAGE_SIZE)))
+#define ADDR_TO_PTE_OFFSET(v) ((((ULONG)(v)) % (1024 * PAGE_SIZE)) / PAGE_SIZE)
+
+/* Easy accessing PFN in PTE */
+#define PFN_FROM_PTE(v) ((v)->u.Hard.PageFrameNumber)
+
+#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H */
#include "../mips/intrin_i.h"\r
#elif defined(_M_ARM)\r
#include "../arm/intrin_i.h"\r
+#elif defined(_M_AMD64)\r
+#include "../amd64/intrin_i.h"\r
#else\r
#error "Unknown processor"\r
#endif\r
#include "../mips/ke.h"
#elif defined(_M_ARM)
#include "../arm/ke.h"
+#elif defined(_M_AMD64)
+#include "../amd64/ke.h"
#else
#error "Unknown processor"
#endif
#include <internal/mips/mm.h>
#elif defined(_M_ARM)
#include <internal/arm/mm.h>
+#elif defined(_M_AMD64)
+#include <internal/amd64/mm.h>
#else
#error "Unknown processor"
#endif
#ifdef _WIN64
#define ExpChangeRundown(x, y, z) InterlockedCompareExchange64((PLONGLONG)x, y, z)
+#define ExpChangePushlock(lock, new, old) InterlockedCompareExchangePointer((PVOID*)lock, (PVOID)new, (PVOID)old)
#define ExpSetRundown(x, y) InterlockedExchange64((PLONGLONG)x, y)
#else
#define ExpChangeRundown(x, y, z) InterlockedCompareExchange((PLONG)x, PtrToLong(y), PtrToLong(z))
//
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedIncrement _InterlockedIncrement
-#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchange (LONG)_InterlockedCompareExchange
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
IN PVOID ContextData,
IN ULONG Size);
-/* FIXME: Interlocked functions that need to be made into a public header */
-#ifdef __GNUC__
-FORCEINLINE
-LONG
-InterlockedAnd(IN OUT LONG volatile *Target,
- IN LONG Set)
-{
- LONG i;
- LONG j;
-
- j = *Target;
- do {
- i = j;
- j = InterlockedCompareExchange((PLONG)Target,
- i & Set,
- i);
-
- } while (i != j);
-
- return j;
-}
-
-FORCEINLINE
-LONG
-InterlockedOr(IN OUT LONG volatile *Target,
- IN LONG Set)
-{
- LONG i;
- LONG j;
-
- j = *Target;
- do {
- i = j;
- j = InterlockedCompareExchange((PLONG)Target,
- i | Set,
- i);
-
- } while (i != j);
-
- return j;
-}
-#endif
-
/*
* generic information class probing code
*/
#endif
+#ifndef _WIN64
C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, SystemCall) == 0x300);
C_ASSERT(FIELD_OFFSET(KTHREAD, InitialStack) == KTHREAD_INITIAL_STACK);
C_ASSERT(FIELD_OFFSET(KTHREAD, Teb) == KTHREAD_TEB);
C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE);
//C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST);
//C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
+#endif
+
#ifdef _M_IX86
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);
C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR);
--- /dev/null
+/*
+ * FILE: ntoskrnl/ke/i386/boot.S
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: FreeLDR Wrapper Bootstrap Code and Bootstrap Trampoline
+ * PROGRAMMERs: Alex Ionescu (alex@relsoft.net)
+ * Thomas Weidenmueller <w3seek@reactos.org>
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <asm.h>
+.intel_syntax noprefix
+.code64
+
+/* GLOBALS *******************************************************************/
+
+.bss
+.align 16
+
+/* Kernel Boot Stack */
+.globl _P0BootStack
+.space KERNEL_STACK_SIZE
+_P0BootStack:
+
+/* Kernel Double-Fault and Temporary DPC Stack */
+.globl _KiDoubleFaultStack
+.space KERNEL_STACK_SIZE
+_KiDoubleFaultStack:
+
+/* FUNCTIONS *****************************************************************/
+.global _KiSystemStartup
+.text
+.func KiSystemStartup
+_KiSystemStartup:
+
+ /* NTLDR Boot: Call the main kernel initialization */
+ test rcx, 0x80000000
+ jnz _KiSystemStartupReal
+
+ /* FREELDR Boot: Cal the FreeLDR wrapper */
+ jmp _KiRosPrepareForSystemStartup
+.endfunc
+
+/**
+ * VOID
+ * KiSetupStackAndInitializeKernel(
+ * esp+4 = ? -> rcx
+ * esp+8 = ? -> rdx
+ * PVOID pNewstack // esp+12 = new stack -> r8
+ * esp+16 -> r9
+ * esp+20 -> rsp + 8
+ * esp+24 -> rsp + 16?
+ */
+.globl _KiSetupStackAndInitializeKernel
+.func KiSetupStackAndInitializeKernel
+_KiSetupStackAndInitializeKernel:
+
+ /* Save current stack */
+ mov rsi, rsp
+
+ /* Setup the new stack */
+ mov rsp, r8
+ sub rsp, NPX_FRAME_LENGTH + KTRAP_FRAME_ALIGN + KTRAP_FRAME_LENGTH
+ push CR0_EM + CR0_TS + CR0_MP
+
+ /* Copy stack parameters to the new stack */
+ push [rsi + 16]
+ push [rsi + 8]
+ xor rbp, rbp
+ call _KiInitializeKernel
+
+ /* Set the priority of this thread to 0 */
+ mov rbx, PCR[KPCR_CURRENT_THREAD]
+ mov byte ptr [rbx+KTHREAD_PRIORITY], 0
+
+ /* Force interrupts enabled and lower IRQL back to DISPATCH_LEVEL */
+ sti
+ mov rcx, DISPATCH_LEVEL
+ call _KfLowerIrql
+
+ /* Set the right wait IRQL */
+ mov byte ptr [rbx+KTHREAD_WAIT_IRQL], DISPATCH_LEVEL;
+
+ /* Jump into the idle loop */
+ jmp _KiIdleLoop
+.endfunc
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/i386/kiinit.c
+ * PURPOSE: Kernel Initialization for x86 CPUs
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* GLOBALS *******************************************************************/
+
+/* Spinlocks used only on X86 */
+KSPIN_LOCK KiFreezeExecutionLock;
+KSPIN_LOCK Ki486CompatibilityLock;
+
+/* BIOS Memory Map. Not NTLDR-compliant yet */
+extern ULONG KeMemoryMapRangeCount;
+extern ADDRESS_RANGE KeMemoryMap[64];
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KiInitMachineDependent(VOID)
+{
+#if 0
+ ULONG Protect;
+ ULONG CpuCount;
+ BOOLEAN FbCaching = FALSE;
+ NTSTATUS Status;
+ ULONG ReturnLength;
+ ULONG i, Affinity, Sample = 0;
+ PFX_SAVE_AREA FxSaveArea;
+ ULONG MXCsrMask = 0xFFBF;
+ ULONG Dummy[4];
+ KI_SAMPLE_MAP Samples[4];
+ PKI_SAMPLE_MAP CurrentSample = Samples;
+
+ /* Check for large page support */
+ if (KeFeatureBits & KF_LARGE_PAGE)
+ {
+ /* FIXME: Support this */
+ DPRINT1("Large Page support detected but not yet taken advantage of!\n");
+ }
+
+ /* Check for global page support */
+ if (KeFeatureBits & KF_GLOBAL_PAGE)
+ {
+ /* Do an IPI to enable it on all CPUs */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableGlobalPage, (ULONG_PTR)&CpuCount);
+ }
+
+ /* Check for PAT and/or MTRR support */
+ if (KeFeatureBits & (KF_PAT | KF_MTRR))
+ {
+ /* Query the HAL to make sure we can use it */
+ Status = HalQuerySystemInformation(HalFrameBufferCachingInformation,
+ sizeof(BOOLEAN),
+ &FbCaching,
+ &ReturnLength);
+ if ((NT_SUCCESS(Status)) && (FbCaching))
+ {
+ /* We can't, disable it */
+ KeFeatureBits &= ~(KF_PAT | KF_MTRR);
+ }
+ }
+
+ /* Check for PAT support and enable it */
+ if (KeFeatureBits & KF_PAT) KiInitializePAT();
+
+ /* Assume no errata for now */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] = 0;
+
+ /* Check if we have an NPX */
+ if (KeI386NpxPresent)
+ {
+ /* Loop every CPU */
+ i = KeActiveProcessors;
+ for (Affinity = 1; i; Affinity <<= 1)
+ {
+ /* Check if this is part of the set */
+ if (i & Affinity)
+ {
+ /* Run on this CPU */
+ i &= ~Affinity;
+ KeSetSystemAffinityThread(Affinity);
+
+ /* Detect FPU errata */
+ if (KiIsNpxErrataPresent())
+ {
+ /* Disable NPX support */
+ KeI386NpxPresent = FALSE;
+ SharedUserData->
+ ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] =
+ TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ /* If there's no NPX, then we're emulating the FPU */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_EMULATED] =
+ !KeI386NpxPresent;
+
+ /* Check if there's no NPX, so that we can disable associated features */
+ if (!KeI386NpxPresent)
+ {
+ /* Remove NPX-related bits */
+ KeFeatureBits &= ~(KF_XMMI64 | KF_XMMI | KF_FXSR | KF_MMX);
+
+ /* Disable kernel flags */
+ KeI386FxsrPresent = KeI386XMMIPresent = FALSE;
+
+ /* Disable processor features that might've been set until now */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] =
+ SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = 0;
+ }
+
+ /* Check for CR4 support */
+ if (KeFeatureBits & KF_CR4)
+ {
+ /* Do an IPI call to enable the Debug Exceptions */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableDE, (ULONG_PTR)&CpuCount);
+ }
+
+ /* Check if FXSR was found */
+ if (KeFeatureBits & KF_FXSR)
+ {
+ /* Do an IPI call to enable the FXSR */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableFxsr, (ULONG_PTR)&CpuCount);
+
+ /* Check if XMM was found too */
+ if (KeFeatureBits & KF_XMMI)
+ {
+ /* Do an IPI call to enable XMMI exceptions */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableXMMIExceptions, (ULONG_PTR)&CpuCount);
+
+ /* FIXME: Implement and enable XMM Page Zeroing for Mm */
+
+ /* Patch the RtlPrefetchMemoryNonTemporal routine to enable it */
+ Protect = MmGetPageProtect(NULL, RtlPrefetchMemoryNonTemporal);
+ MmSetPageProtect(NULL,
+ RtlPrefetchMemoryNonTemporal,
+ Protect | PAGE_IS_WRITABLE);
+ *(PCHAR)RtlPrefetchMemoryNonTemporal = 0x90;
+ MmSetPageProtect(NULL, RtlPrefetchMemoryNonTemporal, Protect);
+ }
+ }
+
+ /* Check for, and enable SYSENTER support */
+ KiRestoreFastSyscallReturnState();
+
+ /* Loop every CPU */
+ i = KeActiveProcessors;
+ for (Affinity = 1; i; Affinity <<= 1)
+ {
+ /* Check if this is part of the set */
+ if (i & Affinity)
+ {
+ /* Run on this CPU */
+ i &= ~Affinity;
+ KeSetSystemAffinityThread(Affinity);
+
+ /* Reset MHz to 0 for this CPU */
+ KeGetCurrentPrcb()->MHz = 0;
+
+ /* Check if we can use RDTSC */
+ if (KeFeatureBits & KF_RDTSC)
+ {
+ /* Start sampling loop */
+ for (;;)
+ {
+ /* Do a dummy CPUID to start the sample */
+ CPUID(Dummy, 0);
+
+ /* Fill out the starting data */
+ CurrentSample->PerfStart = KeQueryPerformanceCounter(NULL);
+ CurrentSample->TSCStart = __rdtsc();
+ CurrentSample->PerfFreq.QuadPart = -50000;
+
+ /* Sleep for this sample */
+ KeDelayExecutionThread(KernelMode,
+ FALSE,
+ &CurrentSample->PerfFreq);
+
+ /* Do another dummy CPUID */
+ CPUID(Dummy, 0);
+
+ /* Fill out the ending data */
+ CurrentSample->PerfEnd =
+ KeQueryPerformanceCounter(&CurrentSample->PerfFreq);
+ CurrentSample->TSCEnd = __rdtsc();
+
+ /* Calculate the differences */
+ CurrentSample->PerfDelta = CurrentSample->PerfEnd.QuadPart -
+ CurrentSample->PerfStart.QuadPart;
+ CurrentSample->TSCDelta = CurrentSample->TSCEnd -
+ CurrentSample->TSCStart;
+
+ /* Compute CPU Speed */
+ CurrentSample->MHz = (ULONG)((CurrentSample->TSCDelta *
+ CurrentSample->
+ PerfFreq.QuadPart + 500000) /
+ (CurrentSample->PerfDelta *
+ 1000000));
+
+ /* Check if this isn't the first sample */
+ if (Sample)
+ {
+ /* Check if we got a good precision within 1MHz */
+ if ((CurrentSample->MHz == CurrentSample[-1].MHz) ||
+ (CurrentSample->MHz == CurrentSample[-1].MHz + 1) ||
+ (CurrentSample->MHz == CurrentSample[-1].MHz - 1))
+ {
+ /* We did, stop sampling */
+ break;
+ }
+ }
+
+ /* Move on */
+ CurrentSample++;
+ Sample++;
+
+ if (Sample == sizeof(Samples) / sizeof(Samples[0]))
+ {
+ /* Restart */
+ CurrentSample = Samples;
+ Sample = 0;
+ }
+ }
+
+ /* Save the CPU Speed */
+ KeGetCurrentPrcb()->MHz = CurrentSample[-1].MHz;
+ }
+
+ /* Check if we have MTRR */
+ if (KeFeatureBits & KF_MTRR)
+ {
+ /* Then manually initialize MTRR for the CPU */
+ KiInitializeMTRR(i ? FALSE : TRUE);
+ }
+
+ /* Check if we have AMD MTRR and initialize it for the CPU */
+ if (KeFeatureBits & KF_AMDK6MTRR) KiAmdK6InitializeMTRR();
+
+ /* Check if this is a buggy Pentium and apply the fixup if so */
+ if (KiI386PentiumLockErrataPresent) KiI386PentiumLockErrataFixup();
+
+ /* Check if the CPU supports FXSR */
+ if (KeFeatureBits & KF_FXSR)
+ {
+ /* Get the current thread NPX state */
+ FxSaveArea = (PVOID)
+ ((ULONG_PTR)KeGetCurrentThread()->InitialStack -
+ NPX_FRAME_LENGTH);
+
+ /* Clear initial MXCsr mask */
+ FxSaveArea->U.FxArea.MXCsrMask = 0;
+
+ /* Save the current NPX State */
+#ifdef __GNUC__
+ asm volatile("fxsave %0\n\t" : "=m" (*FxSaveArea));
+#else
+ __asm fxsave [FxSaveArea]
+#endif
+ /* Check if the current mask doesn't match the reserved bits */
+ if (FxSaveArea->U.FxArea.MXCsrMask != 0)
+ {
+ /* Then use whatever it's holding */
+ MXCsrMask = FxSaveArea->U.FxArea.MXCsrMask;
+ }
+
+ /* Check if nobody set the kernel-wide mask */
+ if (!KiMXCsrMask)
+ {
+ /* Then use the one we calculated above */
+ KiMXCsrMask = MXCsrMask;
+ }
+ else
+ {
+ /* Was it set to the same value we found now? */
+ if (KiMXCsrMask != MXCsrMask)
+ {
+ /* No, something is definitely wrong */
+ KEBUGCHECKEX(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED,
+ KF_FXSR,
+ KiMXCsrMask,
+ MXCsrMask,
+ 0);
+ }
+ }
+
+ /* Now set the kernel mask */
+ KiMXCsrMask &= MXCsrMask;
+ }
+ }
+ }
+
+ /* Return affinity back to where it was */
+ KeRevertToUserAffinityThread();
+
+ /* NT allows limiting the duration of an ISR with a registry key */
+ if (KiTimeLimitIsrMicroseconds)
+ {
+ /* FIXME: TODO */
+ DPRINT1("ISR Time Limit not yet supported\n");
+ }
+#endif
+}
+
+VOID
+NTAPI
+KiInitializePcr(IN ULONG ProcessorNumber,
+ IN PKIPCR Pcr,
+ IN PKIDTENTRY Idt,
+ IN PKGDTENTRY Gdt,
+ IN PKTSS Tss,
+ IN PKTHREAD IdleThread,
+ IN PVOID DpcStack)
+{
+#if 0
+ /* Setup the TIB */
+ Pcr->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
+ Pcr->NtTib.StackBase = 0;
+ Pcr->NtTib.StackLimit = 0;
+ Pcr->NtTib.Self = NULL;
+
+ /* Set the Current Thread */
+ Pcr->PrcbData.CurrentThread = IdleThread;
+
+ /* Set pointers to ourselves */
+ Pcr->Self = (PKPCR)Pcr;
+ Pcr->Prcb = &Pcr->PrcbData;
+
+ /* Set the PCR Version */
+ Pcr->MajorVersion = PCR_MAJOR_VERSION;
+ Pcr->MinorVersion = PCR_MINOR_VERSION;
+
+ /* Set the PCRB Version */
+ Pcr->PrcbData.MajorVersion = 1;
+ Pcr->PrcbData.MinorVersion = 1;
+
+ /* Set the Build Type */
+ Pcr->PrcbData.BuildType = 0;
+#ifndef CONFIG_SMP
+ Pcr->PrcbData.BuildType |= PRCB_BUILD_UNIPROCESSOR;
+#endif
+#ifdef DBG
+ Pcr->PrcbData.BuildType |= PRCB_BUILD_DEBUG;
+#endif
+
+ /* Set the Processor Number and current Processor Mask */
+ Pcr->PrcbData.Number = (UCHAR)ProcessorNumber;
+ Pcr->PrcbData.SetMember = 1 << ProcessorNumber;
+
+ /* Set the PRCB for this Processor */
+ KiProcessorBlock[ProcessorNumber] = Pcr->Prcb;
+
+ /* Start us out at PASSIVE_LEVEL */
+ Pcr->Irql = PASSIVE_LEVEL;
+
+ /* Set the GDI, IDT, TSS and DPC Stack */
+ Pcr->GDT = (PVOID)Gdt;
+ Pcr->IDT = Idt;
+ Pcr->TSS = Tss;
+ Pcr->TssCopy = Tss;
+ Pcr->PrcbData.DpcStack = DpcStack;
+
+ /* Setup the processor set */
+ Pcr->PrcbData.MultiThreadProcessorSet = Pcr->PrcbData.SetMember;
+#endif
+}
+
+VOID
+NTAPI
+KiInitializeKernel(IN PKPROCESS InitProcess,
+ IN PKTHREAD InitThread,
+ IN PVOID IdleStack,
+ IN PKPRCB Prcb,
+ IN CCHAR Number,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+#if 0
+ BOOLEAN NpxPresent;
+ ULONG FeatureBits;
+ LARGE_INTEGER PageDirectory;
+ PVOID DpcStack;
+ ULONG Vendor[3];
+
+ /* Detect and set the CPU Type */
+ KiSetProcessorType();
+
+ /* Set CR0 features based on detected CPU */
+ KiSetCR0Bits();
+
+ /* Check if an FPU is present */
+ NpxPresent = KiIsNpxPresent();
+
+ /* Initialize the Power Management Support for this PRCB */
+ PoInitializePrcb(Prcb);
+
+ /* Bugcheck if this is a 386 CPU */
+ if (Prcb->CpuType == 3) KeBugCheckEx(0x5D, 0x386, 0, 0, 0);
+
+ /* Get the processor features for the CPU */
+ FeatureBits = KiGetFeatureBits();
+
+ /* Set the default NX policy (opt-in) */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTIN;
+
+ /* Check if NPX is always on */
+ if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=ALWAYSON"))
+ {
+ /* Set it always on */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSON;
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTOUT"))
+ {
+ /* Set it in opt-out mode */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTOUT;
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if ((strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTIN")) ||
+ (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE")))
+ {
+ /* Set the feature bits */
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if ((strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=ALWAYSOFF")) ||
+ (strstr(KeLoaderBlock->LoadOptions, "EXECUTE")))
+ {
+ /* Set disabled mode */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSOFF;
+ FeatureBits |= KF_NX_DISABLED;
+ }
+
+ /* Save feature bits */
+ Prcb->FeatureBits = FeatureBits;
+
+ /* Save CPU state */
+ KiSaveProcessorControlState(&Prcb->ProcessorState);
+
+ /* Get cache line information for this CPU */
+ KiGetCacheInformation();
+
+ /* Initialize spinlocks and DPC data */
+ KiInitSpinLocks(Prcb, Number);
+
+ /* Check if this is the Boot CPU */
+ if (!Number)
+ {
+ /* Set Node Data */
+ KeNodeBlock[0] = &KiNode0;
+ Prcb->ParentNode = KeNodeBlock[0];
+ KeNodeBlock[0]->ProcessorMask = Prcb->SetMember;
+
+ /* Set boot-level flags */
+ KeI386NpxPresent = NpxPresent;
+ KeI386CpuType = Prcb->CpuType;
+ KeI386CpuStep = Prcb->CpuStep;
+ KeProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
+ KeProcessorLevel = (USHORT)Prcb->CpuType;
+ if (Prcb->CpuID) KeProcessorRevision = Prcb->CpuStep;
+ KeFeatureBits = FeatureBits;
+ KeI386FxsrPresent = (KeFeatureBits & KF_FXSR) ? TRUE : FALSE;
+ KeI386XMMIPresent = (KeFeatureBits & KF_XMMI) ? TRUE : FALSE;
+
+ /* Detect 8-byte compare exchange support */
+ if (!(KeFeatureBits & KF_CMPXCHG8B))
+ {
+ /* Copy the vendor string */
+ RtlCopyMemory(Vendor, Prcb->VendorString, sizeof(Vendor));
+
+ /* Bugcheck the system. Windows *requires* this */
+ KeBugCheckEx(0x5D,
+ (1 << 24 ) | (Prcb->CpuType << 16) | Prcb->CpuStep,
+ Vendor[0],
+ Vendor[1],
+ Vendor[2]);
+ }
+
+ /* Set the current MP Master KPRCB to the Boot PRCB */
+ Prcb->MultiThreadSetMaster = Prcb;
+
+ /* Lower to APC_LEVEL */
+ KeLowerIrql(APC_LEVEL);
+
+ /* Initialize some spinlocks */
+ KeInitializeSpinLock(&KiFreezeExecutionLock);
+ KeInitializeSpinLock(&Ki486CompatibilityLock);
+
+ /* Initialize portable parts of the OS */
+ KiInitSystem();
+
+ /* Initialize the Idle Process and the Process Listhead */
+ InitializeListHead(&KiProcessListHead);
+ PageDirectory.QuadPart = 0;
+ KeInitializeProcess(InitProcess,
+ 0,
+ 0xFFFFFFFF,
+ &PageDirectory,
+ FALSE);
+ InitProcess->QuantumReset = MAXCHAR;
+ }
+ else
+ {
+ /* FIXME */
+ DPRINT1("SMP Boot support not yet present\n");
+ }
+
+ /* Setup the Idle Thread */
+ KeInitializeThread(InitProcess,
+ InitThread,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ IdleStack);
+ InitThread->NextProcessor = Number;
+ InitThread->Priority = HIGH_PRIORITY;
+ InitThread->State = Running;
+ InitThread->Affinity = 1 << Number;
+ InitThread->WaitIrql = DISPATCH_LEVEL;
+ InitProcess->ActiveProcessors = 1 << Number;
+
+ /* HACK for MmUpdatePageDir */
+ ((PETHREAD)InitThread)->ThreadsProcess = (PEPROCESS)InitProcess;
+
+ /* Set basic CPU Features that user mode can read */
+ SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] =
+ (KeFeatureBits & KF_MMX) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_COMPARE_EXCHANGE_DOUBLE] =
+ (KeFeatureBits & KF_CMPXCHG8B) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] =
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI)) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] =
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI64)) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
+ (KeFeatureBits & KF_3DNOW) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] =
+ (KeFeatureBits & KF_RDTSC) ? TRUE: FALSE;
+
+ /* Set up the thread-related fields in the PRCB */
+ Prcb->CurrentThread = InitThread;
+ Prcb->NextThread = NULL;
+ Prcb->IdleThread = InitThread;
+
+ /* Initialize the Kernel Executive */
+ ExpInitializeExecutive(Number, LoaderBlock);
+
+ /* Only do this on the boot CPU */
+ if (!Number)
+ {
+ /* Calculate the time reciprocal */
+ KiTimeIncrementReciprocal =
+ KiComputeReciprocal(KeMaximumIncrement,
+ &KiTimeIncrementShiftCount);
+
+ /* Update DPC Values in case they got updated by the executive */
+ Prcb->MaximumDpcQueueDepth = KiMaximumDpcQueueDepth;
+ Prcb->MinimumDpcRate = KiMinimumDpcRate;
+ Prcb->AdjustDpcThreshold = KiAdjustDpcThreshold;
+
+ /* Allocate the DPC Stack */
+ DpcStack = MmCreateKernelStack(FALSE, 0);
+ if (!DpcStack) KeBugCheckEx(NO_PAGES_AVAILABLE, 1, 0, 0, 0);
+ Prcb->DpcStack = DpcStack;
+
+ /* Allocate the IOPM save area. */
+ Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool,
+ PAGE_SIZE * 2,
+ TAG('K', 'e', ' ', ' '));
+ if (!Ki386IopmSaveArea)
+ {
+ /* Bugcheck. We need this for V86/VDM support. */
+ KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0);
+ }
+ }
+
+ /* Raise to Dispatch */
+ KfRaiseIrql(DISPATCH_LEVEL);
+
+ /* Set the Idle Priority to 0. This will jump into Phase 1 */
+ KeSetPriorityThread(InitThread, 0);
+
+ /* If there's no thread scheduled, put this CPU in the Idle summary */
+ KiAcquirePrcbLock(Prcb);
+ if (!Prcb->NextThread) KiIdleSummary |= 1 << Number;
+ KiReleasePrcbLock(Prcb);
+
+ /* Raise back to HIGH_LEVEL and clear the PRCB for the loader block */
+ KfRaiseIrql(HIGH_LEVEL);
+ LoaderBlock->Prcb = 0;
+#endif
+}
+
+VOID
+FASTCALL
+KiGetMachineBootPointers(IN PKGDTENTRY *Gdt,
+ IN PKIDTENTRY *Idt,
+ IN PKIPCR *Pcr,
+ IN PKTSS *Tss)
+{
+#if 0
+ KDESCRIPTOR GdtDescriptor = {0}, IdtDescriptor = {0};
+ KGDTENTRY TssSelector, PcrSelector;
+ USHORT Tr = 0, Fs;
+
+ /* Get GDT and IDT descriptors */
+ Ke386GetGlobalDescriptorTable(*(PKDESCRIPTOR)&GdtDescriptor.Limit);
+ Ke386GetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit);
+
+ /* Save IDT and GDT */
+ *Gdt = (PKGDTENTRY)GdtDescriptor.Base;
+ *Idt = (PKIDTENTRY)IdtDescriptor.Base;
+
+ /* Get TSS and FS Selectors */
+ Ke386GetTr(Tr);
+ if (Tr != KGDT_TSS) Tr = KGDT_TSS; // FIXME: HACKHACK
+ Fs = Ke386GetFs();
+
+ /* Get PCR Selector, mask it and get its GDT Entry */
+ PcrSelector = *(PKGDTENTRY)((ULONG_PTR)*Gdt + (Fs & ~RPL_MASK));
+
+ /* Get the KPCR itself */
+ *Pcr = (PKIPCR)(ULONG_PTR)(PcrSelector.BaseLow |
+ PcrSelector.HighWord.Bytes.BaseMid << 16 |
+ PcrSelector.HighWord.Bytes.BaseHi << 24);
+
+ /* Get TSS Selector, mask it and get its GDT Entry */
+ TssSelector = *(PKGDTENTRY)((ULONG_PTR)*Gdt + (Tr & ~RPL_MASK));
+
+ /* Get the KTSS itself */
+ *Tss = (PKTSS)(ULONG_PTR)(TssSelector.BaseLow |
+ TssSelector.HighWord.Bytes.BaseMid << 16 |
+ TssSelector.HighWord.Bytes.BaseHi << 24);
+#endif
+}
+
+VOID
+NTAPI
+KiSystemStartupReal(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+#if 0
+ ULONG Cpu;
+ PKTHREAD InitialThread;
+ ULONG InitialStack;
+ PKGDTENTRY Gdt;
+ PKIDTENTRY Idt;
+ KIDTENTRY NmiEntry, DoubleFaultEntry;
+ PKTSS Tss;
+ PKIPCR Pcr;
+
+ /* Save the loader block and get the current CPU */
+ KeLoaderBlock = LoaderBlock;
+ Cpu = KeNumberProcessors;
+ if (!Cpu)
+ {
+ /* If this is the boot CPU, set FS and the CPU Number*/
+ Ke386SetFs(KGDT_R0_PCR);
+ __writefsdword(KPCR_PROCESSOR_NUMBER, Cpu);
+
+ /* Set the initial stack and idle thread as well */
+ LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack;
+ LoaderBlock->Thread = (ULONG_PTR)&KiInitialThread;
+ }
+
+ /* Save the initial thread and stack */
+ InitialStack = LoaderBlock->KernelStack;
+ InitialThread = (PKTHREAD)LoaderBlock->Thread;
+
+ /* Clean the APC List Head */
+ InitializeListHead(&InitialThread->ApcState.ApcListHead[KernelMode]);
+
+ /* Initialize the machine type */
+ KiInitializeMachineType();
+
+ /* Skip initial setup if this isn't the Boot CPU */
+ if (Cpu) goto AppCpuInit;
+
+ /* Get GDT, IDT, PCR and TSS pointers */
+ KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss);
+
+ /* Setup the TSS descriptors and entries */
+ Ki386InitializeTss(Tss, Idt, Gdt);
+
+ /* Initialize the PCR */
+ RtlZeroMemory(Pcr, PAGE_SIZE);
+ KiInitializePcr(Cpu,
+ Pcr,
+ Idt,
+ Gdt,
+ Tss,
+ InitialThread,
+ KiDoubleFaultStack);
+
+ /* Set us as the current process */
+ InitialThread->ApcState.Process = &KiInitialProcess.Pcb;
+
+ /* Clear DR6/7 to cleanup bootloader debugging */
+ __writefsdword(KPCR_TEB, 0);
+ __writefsdword(KPCR_DR6, 0);
+ __writefsdword(KPCR_DR7, 0);
+
+ /* Setup the IDT */
+ KeInitExceptions();
+
+ /* Load Ring 3 selectors for DS/ES */
+ Ke386SetDs(KGDT_R3_DATA | RPL_MASK);
+ Ke386SetEs(KGDT_R3_DATA | RPL_MASK);
+
+ /* Save NMI and double fault traps */
+ RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY));
+ RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY));
+
+ /* Copy kernel's trap handlers */
+ RtlCopyMemory(Idt,
+ (PVOID)KiIdtDescriptor.Base,
+ KiIdtDescriptor.Limit + 1);
+
+ /* Restore NMI and double fault */
+ RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY));
+ RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY));
+
+AppCpuInit:
+ /* Loop until we can release the freeze lock */
+ do
+ {
+ /* Loop until execution can continue */
+ while (*(volatile PKSPIN_LOCK*)&KiFreezeExecutionLock == (PVOID)1);
+ } while(InterlockedBitTestAndSet((PLONG)&KiFreezeExecutionLock, 0));
+
+ /* Setup CPU-related fields */
+ __writefsdword(KPCR_NUMBER, Cpu);
+ __writefsdword(KPCR_SET_MEMBER, 1 << Cpu);
+ __writefsdword(KPCR_SET_MEMBER_COPY, 1 << Cpu);
+ __writefsdword(KPCR_PRCB_SET_MEMBER, 1 << Cpu);
+
+ /* Initialize the Processor with HAL */
+ HalInitializeProcessor(Cpu, KeLoaderBlock);
+
+ /* Set active processors */
+ KeActiveProcessors |= __readfsdword(KPCR_SET_MEMBER);
+ KeNumberProcessors++;
+
+ /* Check if this is the boot CPU */
+ if (!Cpu)
+ {
+ /* Initialize debugging system */
+ KdInitSystem(0, KeLoaderBlock);
+
+ /* Check for break-in */
+ if (KdPollBreakIn()) DbgBreakPointWithStatus(1);
+ }
+
+ /* Raise to HIGH_LEVEL */
+ KfRaiseIrql(HIGH_LEVEL);
+
+ /* Align stack and make space for the trap frame and NPX frame */
+ InitialStack &= ~(KTRAP_FRAME_ALIGN - 1);
+
+ /* Switch to new kernel stack and start kernel bootstrapping */
+ KiSetupStackAndInitializeKernel(&KiInitialProcess.Pcb,
+ InitialThread,
+ (PVOID)InitialStack,
+ (PKPRCB)__readfsdword(KPCR_PRCB),
+ (CCHAR)Cpu,
+ KeLoaderBlock);
+#endif
+}
NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
IN OUT PVOID* UBaseAddress,
IN ULONG ZeroBits,
- IN OUT PULONG URegionSize,
+ IN OUT PSIZE_T URegionSize,
IN ULONG AllocationType,
IN ULONG Protect)
/*
NTSTATUS STDCALL
NtFreeVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID* PBaseAddress,
- IN PULONG PRegionSize,
+ IN PSIZE_T PRegionSize,
IN ULONG FreeType)
/*
* FUNCTION: Frees a range of virtual memory
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../tools/rbuild/project.dtd">
+<module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe" allowwarnings="true">
+ <bootstrap installbase="$(CDOUTPUT)" />
+ <importlibrary definition="ntoskrnl_$(ARCH).def" />
+ <define name="_DISABLE_TIDENTS" />
+ <define name="__NTOSKRNL__" />
+ <define name="_NTOSKRNL_" />
+ <define name="_NTSYSTEM_" />
+ <define name="__NO_CTYPE_INLINES" />
+ <define name="WIN9X_COMPAT_SPINLOCK" />
+ <define name="_IN_KERNEL_" />
+ <if property="_WINKD_" value="1">
+ <define name="_WINKD_" />
+ </if>
+ <if property="_ELF" value="1">
+ <define name="_ELF_" />
+ </if>
+ <include base="cmlib">.</include>
+ <include base="ntoskrnl">include</include>
+ <include base="ntoskrnl" root="intermediate"></include>
+ <include base="ntoskrnl" root="intermediate">include</include>
+ <include base="ntoskrnl" root="intermediate">include/internal</include>
+ <include base="ReactOS">include/reactos/drivers</include>
+ <library>csq</library>
+ <library>hal</library>
+ <library>pseh</library>
+ <library>cmlib</library>
+ <library>rtl</library>
+ <library>rossym</library>
+ <library>libcntpr</library>
+ <library>kdcom</library>
+ <library>bootvid</library>
+ <library>wdmguid</library>
+ <dependency>bugcodes</dependency>
+ <directory name="include">
+ <pch>ntoskrnl.h</pch>
+ </directory>
+ <file>amd64stubs.c</file>
+ <directory name="ke">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file first="true">boot.S</file>
+ <file>abios.c</file>
+ <file>cpu.c</file>
+ <file>ctxswitch.S</file>
+ <file>exp.c</file>
+ <file>irqobj.c</file>
+ <file>kiinit.c</file>
+ <file>ldt.c</file>
+ <file>mtrr.c</file>
+ <file>patpge.c</file>
+ <file>systimer.S</file>
+ <file>thrdini.c</file>
+ <file>trap.s</file>
+ <file>usercall_asm.S</file>
+ <file>usercall.c</file>
+ <file>v86vdm.c</file>
+ <file>v86m_sup.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="arm">
+ <directory name="arm">
+ <file first="true">boot.s</file>
+ <file>cpu.c</file>
+ <file>ctxswtch.s</file>
+ <file>exp.c</file>
+ <file>kiinit.c</file>
+ <file>stubs_asm.s</file>
+ <file>thrdini.c</file>
+ <file>time.c</file>
+ <file>trap.s</file>
+ <file>trapc.c</file>
+ <file>usercall.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file first="true">main_asm.S</file>
+ <file>cpu.c</file>
+ <file>exp.c</file>
+ <file>kiinit.c</file>
+ <file>ppc_irq.c</file>
+ <file>stubs.c</file>
+ <file>systimer.c</file>
+ <file>thrdini.c</file>
+ <file>ctxswitch.c</file>
+ <file>ctxhelp.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file first="true">boot.S</file>
+ <file>kiinit.c</file>
+ </directory>
+ </if>
+ <file>apc.c</file>
+ <file>balmgr.c</file>
+ <!-- file>bug.c</file -->
+ <file>clock.c</file>
+ <file>config.c</file>
+ <file>devqueue.c</file>
+ <file>dpc.c</file>
+ <file>eventobj.c</file>
+ <file>except.c</file>
+ <file>freeldr.c</file>
+ <file>gate.c</file>
+ <file>gmutex.c</file>
+ <file>ipi.c</file>
+ <file>krnlinit.c</file>
+ <file>mutex.c</file>
+ <file>procobj.c</file>
+ <file>profobj.c</file>
+ <file>queue.c</file>
+ <file>semphobj.c</file>
+ <file>spinlock.c</file>
+ <file>thrdschd.c</file>
+ <file>thrdobj.c</file>
+ <file>timerobj.c</file>
+ <file>wait.c</file>
+ </directory>
+ <directory name="cc">
+ <file>cacheman.c</file>
+ <file>copy.c</file>
+ <file>fs.c</file>
+ <file>mdl.c</file>
+ <file>pin.c</file>
+ <file>view.c</file>
+ </directory>
+ <directory name="config">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>cmhardwr.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="arm">
+ <directory name="arm">
+ <file>cmhardwr.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>cmhardwr.c</file>
+ </directory>
+ </if>
+ <file>cmalloc.c</file>
+ <file>cmapi.c</file>
+ <file>cmboot.c</file>
+ <file>cmcheck.c</file>
+ <file>cmcontrl.c</file>
+ <file>cmconfig.c</file>
+ <file>cmdata.c</file>
+ <file>cmdelay.c</file>
+ <file>cmindex.c</file>
+ <file>cminit.c</file>
+ <file>cmhook.c</file>
+ <file>cmkcbncb.c</file>
+ <file>cmkeydel.c</file>
+ <file>cmlazy.c</file>
+ <file>cmmapvw.c</file>
+ <file>cmname.c</file>
+ <file>cmparse.c</file>
+ <file>cmse.c</file>
+ <file>cmsecach.c</file>
+ <file>cmsysini.c</file>
+ <file>cmvalue.c</file>
+ <file>cmvalche.c</file>
+ <file>cmwraprs.c</file>
+ <file>ntapi.c</file>
+ </directory>
+ <directory name="dbgk">
+ <file>dbgkutil.c</file>
+ <!-- file>dbgkobj.c</file -->
+ </directory>
+ <directory name="ex" root="intermediate">
+ <file>zw.S</file>
+ </directory>
+ <directory name="ex">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>interlck_asm.S</file>
+ <file>fastinterlck_asm.S</file>
+ <file>ioport.S</file>
+ </directory>
+ </if>
+ <file>atom.c</file>
+ <file>callback.c</file>
+ <file>dbgctrl.c</file>
+ <file>efi.c</file>
+ <!-- file>event.c</file -->
+ <file>evtpair.c</file>
+ <file>exintrin.c</file>
+ <file>fastinterlck.c</file>
+ <file>fmutex.c</file>
+ <file>handle.c</file>
+ <file>harderr.c</file>
+ <file>hdlsterm.c</file>
+ <file>init.c</file>
+ <file>keyedevt.c</file>
+ <file>locale.c</file>
+ <!-- file>lookas.c</file -->
+ <!-- file>mutant.c</file -->
+ <file>pushlock.c</file>
+ <file>profile.c</file>
+ <file>resource.c</file>
+ <file>rundown.c</file>
+ <!-- file>sem.c</file -->
+ <file>shutdown.c</file>
+ <!-- file>sysinfo.c</file -->
+ <file>time.c</file>
+ <!-- file>timer.c</file -->
+ <file>uuid.c</file>
+ <file>win32k.c</file>
+ <file>work.c</file>
+ <file>xipdisp.c</file>
+ <file>zone.c</file>
+ </directory>
+ <directory name="fsrtl">
+ <file>dbcsname.c</file>
+ <file>fastio.c</file>
+ <file>faulttol.c</file>
+ <file>filelock.c</file>
+ <file>filter.c</file>
+ <file>filtrctx.c</file>
+ <file>fsfilter.c</file>
+ <file>fsrtlpc.c</file>
+ <file>largemcb.c</file>
+ <file>name.c</file>
+ <file>notify.c</file>
+ <file>oplock.c</file>
+ <file>pnp.c</file>
+ <file>stackovf.c</file>
+ <file>tunnel.c</file>
+ <file>unc.c</file>
+ </directory>
+ <directory name="fstub">
+ <file>disksup.c</file>
+ <file>fstubex.c</file>
+ <file>halstub.c</file>
+ </directory>
+ <directory name="inbv">
+ <file>inbv.c</file>
+ </directory>
+ <directory name="io">
+ <directory name="iomgr">
+ <file>adapter.c</file>
+ <file>arcname.c</file>
+ <file>bootlog.c</file>
+ <file>controller.c</file>
+ <file>device.c</file>
+ <file>deviface.c</file>
+ <file>driver.c</file>
+ <file>drvrlist.c</file>
+ <file>error.c</file>
+ <file>file.c</file>
+ <!-- file>iocomp.c</file -->
+ <file>ioevent.c</file>
+ <file>iofunc.c</file>
+ <file>iomdl.c</file>
+ <file>iomgr.c</file>
+ <file>iorsrce.c</file>
+ <file>iotimer.c</file>
+ <file>iowork.c</file>
+ <file>irp.c</file>
+ <file>irq.c</file>
+ <file>ramdisk.c</file>
+ <file>rawfs.c</file>
+ <file>remlock.c</file>
+ <!-- file>util.c</file -->
+ <file>symlink.c</file>
+ <file>volume.c</file>
+ </directory>
+ <directory name="pnpmgr">
+ <file>plugplay.c</file>
+ <file>pnpdma.c</file>
+ <file>pnpmgr.c</file>
+ <file>pnpnotify.c</file>
+ <file>pnpreport.c</file>
+ <file>pnproot.c</file>
+ </directory>
+ </directory>
+ <if property="_WINKD_" value="0">
+ <directory name="kdbg">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <if property="KDBG" value="1">
+ <group>
+ <file>i386-dis.c</file>
+ <file>kdb_help.S</file>
+ <file>longjmp.S</file>
+ <file>setjmp.S</file>
+ </group>
+ </if>
+ </directory>
+ </if>
+ <if property="KDBG" value="1">
+ <!-- file>kdb.c</file -->
+ <!-- file>kdb_cli.c</file -->
+ <file>kdb_expr.c</file>
+ <file>kdb_keyboard.c</file>
+ <file>kdb_serial.c</file>
+ </if>
+ <if property="DBG_OR_KDBG" value="true">
+ <file>kdb_symbols.c</file>
+ </if>
+ </directory>
+ <directory name="kd">
+ <directory name="wrappers">
+ <file>bochs.c</file>
+ <if property="ARCH" value="i386">
+ <file>gdbstub.c</file>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <file>gdbstub_powerpc.c</file>
+ </if>
+ <file>kdbg.c</file>
+ </directory>
+ <file>kdinit.c</file>
+ <file>kdio.c</file>
+ <file>kdmain.c</file>
+ </directory>
+ </if>
+ <if property="_WINKD_" value ="1">
+ <directory name="kd64">
+ <file>kdapi.c</file>
+ <file>kdbreak.c</file>
+ <file>kddata.c</file>
+ <file>kdinit.c</file>
+ <file>kdlock.c</file>
+ <file>kdprint.c</file>
+ <file>kdtrap.c</file>
+ </directory>
+ </if>
+ <directory name="lpc">
+ <file>close.c</file>
+ <file>complete.c</file>
+ <file>connect.c</file>
+ <file>create.c</file>
+ <file>listen.c</file>
+ <file>port.c</file>
+ <file>reply.c</file>
+ <file>send.c</file>
+ </directory>
+ <directory name="mm">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>page.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="arm">
+ <directory name="arm">
+ <file>stubs.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>pfault.c</file>
+ <file>page.c</file>
+ </directory>
+ </if>
+ <file>anonmem.c</file>
+ <file>aspace.c</file>
+ <file>balance.c</file>
+ <!-- file>cont.c</file -->
+ <file>drvlck.c</file>
+ <file>freelist.c</file>
+ <!-- file>iospace.c</file -->
+ <file>kmap.c</file>
+ <file>marea.c</file>
+ <!-- file>mdlsup.c</file -->
+ <!-- file>mm.c</file -->
+ <!-- file>mminit.c</file -->
+ <file>mpw.c</file>
+ <!-- file>ncache.c</file -->
+ <file>npool.c</file>
+ <file>pagefile.c</file>
+ <file>pageop.c</file>
+ <file>pager.c</file>
+ <file>pagfault.c</file>
+ <file>paging.c</file>
+ <file>pe.c</file>
+ <file>physical.c</file>
+ <!-- file>pool.c</file -->
+ <file>ppool.c</file>
+ <!-- file>procsup.c</file -->
+ <!-- file>region.c</file -->
+ <file>rmap.c</file>
+ <!-- file>section.c</file -->
+ <file>sysldr.c</file>
+ <file>verifier.c</file>
+ <!-- file>virtual.c</file -->
+ <file>wset.c</file>
+ <if property="_ELF_" value="1">
+ <file>elf32.c</file>
+ <file>elf64.c</file>
+ </if>
+ </directory>
+ <directory name="ob">
+ <file>obdir.c</file>
+ <file>obinit.c</file>
+ <file>obhandle.c</file>
+ <file>obname.c</file>
+ <file>oblife.c</file>
+ <file>obref.c</file>
+ <file>obsdcach.c</file>
+ <file>obsecure.c</file>
+ <file>oblink.c</file>
+ <file>obwait.c</file>
+ </directory>
+ <directory name="po">
+ <file>power.c</file>
+ <file>events.c</file>
+ </directory>
+ <directory name="ps">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>psctx.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="arm">
+ <directory name="arm">
+ <file>psctx.c</file>
+ </directory>
+ </if>
+ <file>debug.c</file>
+ <file>job.c</file>
+ <file>kill.c</file>
+ <file>psnotify.c</file>
+ <file>process.c</file>
+ <file>psmgr.c</file>
+ <file>query.c</file>
+ <file>quota.c</file>
+ <file>security.c</file>
+ <file>state.c</file>
+ <!-- file>thread.c</file -->
+ <!-- file>win32.c</file -->
+ </directory>
+ <directory name="rtl">
+ <if property="ARCH" value="arm">
+ <directory name="arm">
+ <file>rtlexcpt.c</file>
+ </directory>
+ </if>
+ <!-- file>libsupp.c</file -->
+ <file>misc.c</file>
+ <file>strtok.c</file>
+ </directory>
+ <directory name="se">
+ <file>access.c</file>
+ <file>acl.c</file>
+ <file>audit.c</file>
+ <file>lsa.c</file>
+ <file>priv.c</file>
+ <file>sd.c</file>
+ <file>semgr.c</file>
+ <file>sid.c</file>
+ <!-- file>token.c</file -->
+ </directory>
+ <directory name="vdm">
+ <if property="ARCH" value="i386">
+ <file>vdmmain.c</file>
+ <file>vdmexec.c</file>
+ </if>
+ </directory>
+ <directory name="wmi">
+ <file>wmi.c</file>
+ </directory>
+ <file>ntoskrnl.rc</file>
+ <linkerscript>ntoskrnl_$(ARCH).lnk</linkerscript>
+</module>
+
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe">
+ <module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe" allowwarnings="true">
<xi:include href="ntoskrnl-generic.rbuild" />
</module>
</group>
--- /dev/null
+; reactos/ntoskrnl/ntoskrnl.def
+;
+; ReactOS Operating System
+;
+EXPORTS
+;
+KeQuerySystemTime
+KfAcquireSpinLock
+KfReleaseSpinLock
+KeRaiseIrql
+KefAcquireSpinLockAtDpcLevel
+KefReleaseSpinLockFromDpcLevel
+KeInitializeSpinLock
+KeGetCurrentProcessorNumber
+RtlConvertUlongToLargeInteger
+RtlExtendedIntegerMultiply
+KeQueryTickCount
+KeQueryInterruptTime
+;
+; original:
+CcCanIWrite
+CcCopyRead
+CcCopyWrite
+CcDeferWrite
+CcFastCopyRead
+CcFastCopyWrite
+CcFastMdlReadWait
+CcFastReadNotPossible
+CcFastReadWait
+CcFlushCache
+CcGetDirtyPages
+CcGetFileObjectFromBcb
+CcGetFileObjectFromSectionPtrs
+CcGetFlushedValidData
+CcGetLsnForFileObject
+CcInitializeCacheMap
+CcIsThereDirtyData
+CcMapData
+CcMdlRead
+CcMdlReadComplete
+CcMdlWriteAbort
+CcMdlWriteComplete
+CcPinMappedData
+CcPinRead
+CcPrepareMdlWrite
+CcPreparePinWrite
+CcPurgeCacheSection
+CcRemapBcb
+CcRepinBcb
+CcScheduleReadAhead
+CcSetAdditionalCacheAttributes
+CcSetBcbOwnerPointer
+CcSetDirtyPageThreshold
+CcSetDirtyPinnedData
+CcSetFileSizes
+CcSetLogHandleForFile
+CcSetReadAheadGranularity
+CcUninitializeCacheMap
+CcUnpinData
+CcUnpinDataForThread
+CcUnpinRepinnedBcb
+CcWaitForCurrentLazyWriterActivity
+CcZeroData
+CmRegisterCallback
+CmUnRegisterCallback
+DbgBreakPoint
+DbgBreakPointWithStatus
+DbgCommandString
+DbgLoadImageSymbols
+DbgPrint
+DbgPrintEx
+DbgPrintReturnControlC
+DbgPrompt
+DbgQueryDebugFilterState
+DbgSetDebugFilterState
+ExAcquireFastMutex
+ExAcquireFastMutexUnsafe
+ExAcquireResourceExclusiveLite
+ExAcquireResourceSharedLite
+ExAcquireRundownProtection
+ExAcquireRundownProtectionCacheAware
+ExAcquireRundownProtectionCacheAwareEx
+ExAcquireRundownProtectionEx
+ExAcquireSharedStarveExclusive
+ExAcquireSharedWaitForExclusive
+ExAllocateCacheAwareRundownProtection
+ExAllocateFromPagedLookasideList
+ExAllocatePool
+ExAllocatePoolWithQuota
+ExAllocatePoolWithQuotaTag
+ExAllocatePoolWithTag
+ExAllocatePoolWithTagPriority
+ExConvertExclusiveToSharedLite
+ExCreateCallback
+ExDeleteNPagedLookasideList
+ExDeletePagedLookasideList
+ExDeleteResourceLite
+ExDesktopObjectType
+ExDisableResourceBoostLite
+ExEnterCriticalRegionAndAcquireFastMutexUnsafe
+ExEnterCriticalRegionAndAcquireResourceExclusive
+ExEnterCriticalRegionAndAcquireResourceShared
+ExEnterCriticalRegionAndAcquireSharedWaitForExclusive
+ExEnumHandleTable
+ExEventObjectType
+ExExtendZone
+ExFreeCacheAwareRundownProtection
+ExFreePool
+ExFreePoolWithTag
+ExFreeToPagedLookasideList
+ExGetCurrentProcessorCounts
+ExGetCurrentProcessorCpuUsage
+ExGetExclusiveWaiterCount
+ExGetPreviousMode
+ExGetSharedWaiterCount
+ExInitializeNPagedLookasideList
+ExInitializePagedLookasideList
+ExInitializeResourceLite
+ExInitializeRundownProtection
+ExInitializeRundownProtectionCacheAware
+ExInitializeZone
+ExInterlockedAddLargeInteger
+ExInterlockedAddUlong
+ExInterlockedExtendZone
+ExInterlockedInsertHeadList
+ExInterlockedInsertTailList
+ExInterlockedPopEntryList
+ExInterlockedPushEntryList
+ExInterlockedRemoveHeadList
+ExIsProcessorFeaturePresent
+ExIsResourceAcquiredExclusiveLite
+ExIsResourceAcquiredSharedLite
+ExLocalTimeToSystemTime
+ExNotifyCallback
+ExQueryDepthSList
+ExQueryPoolBlockSize
+ExQueueWorkItem
+ExRaiseAccessViolation
+ExRaiseDatatypeMisalignment
+ExRaiseException
+ExRaiseHardError
+ExRaiseStatus
+ExReInitializeRundownProtection
+ExReInitializeRundownProtectionCacheAware
+ExRegisterCallback
+ExReinitializeResourceLite
+ExReleaseFastMutex
+ExReleaseFastMutexUnsafe
+ExReleaseFastMutexUnsafeAndLeaveCriticalRegion
+ExReleaseResourceAndLeaveCriticalRegion
+ExReleaseResourceForThreadLite
+ExReleaseResourceLite
+ExReleaseRundownProtection
+ExReleaseRundownProtectionCacheAware
+ExReleaseRundownProtectionCacheAwareEx
+ExReleaseRundownProtectionEx
+ExRundownCompleted
+ExRundownCompletedCacheAware
+ExSemaphoreObjectType
+ExSetResourceOwnerPointer
+ExSetTimerResolution
+ExSizeOfRundownProtectionCacheAware
+ExSystemExceptionFilter
+ExSystemTimeToLocalTime
+ExTryToAcquireFastMutex
+ExUnregisterCallback
+ExUuidCreate
+ExVerifySuite
+ExWaitForRundownProtectionRelease
+ExWaitForRundownProtectionReleaseCacheAware
+ExWindowStationObjectType
+ExfAcquirePushLockExclusive
+ExfAcquirePushLockShared
+ExfReleasePushLock
+ExfReleasePushLockExclusive
+ExfReleasePushLockShared
+ExfTryToWakePushLock
+ExfUnblockPushLock
+ExpInterlockedFlushSList
+ExpInterlockedPopEntrySList
+ExpInterlockedPushEntrySList
+FsRtlAcquireFileExclusive
+FsRtlAddBaseMcbEntry
+FsRtlAddLargeMcbEntry
+FsRtlAddMcbEntry
+FsRtlAddToTunnelCache
+FsRtlAllocateFileLock
+FsRtlAllocatePool
+FsRtlAllocatePoolWithQuota
+FsRtlAllocatePoolWithQuotaTag
+FsRtlAllocatePoolWithTag
+FsRtlAllocateResource
+FsRtlAreNamesEqual
+FsRtlBalanceReads
+FsRtlCheckLockForReadAccess
+FsRtlCheckLockForWriteAccess
+FsRtlCheckOplock
+FsRtlCopyRead
+FsRtlCopyWrite
+FsRtlCreateSectionForDataScan
+FsRtlCurrentBatchOplock
+FsRtlDeleteKeyFromTunnelCache
+FsRtlDeleteTunnelCache
+FsRtlDeregisterUncProvider
+FsRtlDissectDbcs
+FsRtlDissectName
+FsRtlDoesDbcsContainWildCards
+FsRtlDoesNameContainWildCards
+FsRtlFastCheckLockForRead
+FsRtlFastCheckLockForWrite
+FsRtlFastUnlockAll
+FsRtlFastUnlockAllByKey
+FsRtlFastUnlockSingle
+FsRtlFindInTunnelCache
+FsRtlFreeFileLock
+FsRtlGetFileSize
+FsRtlGetNextBaseMcbEntry
+FsRtlGetNextFileLock
+FsRtlGetNextLargeMcbEntry
+FsRtlGetNextMcbEntry
+FsRtlIncrementCcFastReadNoWait
+FsRtlIncrementCcFastReadNotPossible
+FsRtlIncrementCcFastReadResourceMiss
+FsRtlIncrementCcFastReadWait
+FsRtlInitializeBaseMcb
+FsRtlInitializeFileLock
+FsRtlInitializeLargeMcb
+FsRtlInitializeMcb
+FsRtlInitializeOplock
+FsRtlInitializeTunnelCache
+FsRtlInsertPerFileObjectContext
+FsRtlInsertPerStreamContext
+FsRtlIsDbcsInExpression
+FsRtlIsFatDbcsLegal
+FsRtlIsHpfsDbcsLegal
+FsRtlIsNameInExpression
+FsRtlIsNtstatusExpected
+FsRtlIsPagingFile
+FsRtlIsTotalDeviceFailure
+FsRtlLegalAnsiCharacterArray
+FsRtlLookupBaseMcbEntry
+FsRtlLookupLargeMcbEntry
+FsRtlLookupLastBaseMcbEntry
+FsRtlLookupLastBaseMcbEntryAndIndex
+FsRtlLookupLastLargeMcbEntry
+FsRtlLookupLastLargeMcbEntryAndIndex
+FsRtlLookupLastMcbEntry
+FsRtlLookupMcbEntry
+FsRtlLookupPerFileObjectContext
+FsRtlLookupPerStreamContextInternal
+FsRtlMdlRead
+FsRtlMdlReadComplete
+FsRtlMdlReadCompleteDev
+FsRtlMdlReadDev
+FsRtlMdlWriteComplete
+FsRtlMdlWriteCompleteDev
+FsRtlNormalizeNtstatus
+FsRtlNotifyChangeDirectory
+FsRtlNotifyCleanup
+FsRtlNotifyFilterChangeDirectory
+FsRtlNotifyFilterReportChange
+FsRtlNotifyFullChangeDirectory
+FsRtlNotifyFullReportChange
+FsRtlNotifyInitializeSync
+FsRtlNotifyReportChange
+FsRtlNotifyUninitializeSync
+FsRtlNotifyVolumeEvent
+FsRtlNumberOfRunsInBaseMcb
+FsRtlNumberOfRunsInLargeMcb
+FsRtlNumberOfRunsInMcb
+FsRtlOplockFsctrl
+FsRtlOplockIsFastIoPossible
+FsRtlPostPagingFileStackOverflow
+FsRtlPostStackOverflow
+FsRtlPrepareMdlWrite
+FsRtlPrepareMdlWriteDev
+FsRtlPrivateLock
+FsRtlProcessFileLock
+FsRtlRegisterFileSystemFilterCallbacks
+FsRtlRegisterUncProvider
+FsRtlReleaseFile
+FsRtlRemoveBaseMcbEntry
+FsRtlRemoveLargeMcbEntry
+FsRtlRemoveMcbEntry
+FsRtlRemovePerFileObjectContext
+FsRtlRemovePerStreamContext
+FsRtlResetBaseMcb
+FsRtlResetLargeMcb
+FsRtlSplitBaseMcb
+FsRtlSplitLargeMcb
+FsRtlSyncVolumes
+FsRtlTeardownPerStreamContexts
+FsRtlTruncateBaseMcb
+FsRtlTruncateLargeMcb
+FsRtlTruncateMcb
+FsRtlUninitializeBaseMcb
+FsRtlUninitializeFileLock
+FsRtlUninitializeLargeMcb
+FsRtlUninitializeMcb
+FsRtlUninitializeOplock
+HalDispatchTable
+HalExamineMBR
+HalPrivateDispatchTable
+HeadlessDispatch
+InbvAcquireDisplayOwnership
+InbvCheckDisplayOwnership
+InbvDisplayString
+InbvEnableBootDriver
+InbvEnableDisplayString
+InbvInstallDisplayStringFilter
+InbvIsBootDriverInstalled
+InbvNotifyDisplayOwnershipLost
+InbvResetDisplay
+InbvSetScrollRegion
+InbvSetTextColor
+InbvSolidColorFill
+InitSafeBootMode
+InitializeSListHead
+IoAcquireCancelSpinLock
+IoAcquireRemoveLockEx
+IoAcquireVpbSpinLock
+IoAdapterObjectType
+IoAllocateAdapterChannel
+IoAllocateController
+IoAllocateDriverObjectExtension
+IoAllocateErrorLogEntry
+IoAllocateIrp
+IoAllocateMdl
+IoAllocateWorkItem
+IoAssignDriveLetters
+IoAssignResources
+IoAttachDevice
+IoAttachDeviceByPointer
+IoAttachDeviceToDeviceStack
+IoAttachDeviceToDeviceStackSafe
+IoBuildAsynchronousFsdRequest
+IoBuildDeviceIoControlRequest
+IoBuildPartialMdl
+IoBuildSynchronousFsdRequest
+IoCallDriver
+IoCancelFileOpen
+IoCancelIrp
+IoCheckDesiredAccess
+IoCheckEaBufferValidity
+IoCheckFunctionAccess
+IoCheckQuerySetFileInformation
+IoCheckQuerySetVolumeInformation
+IoCheckQuotaBufferValidity
+IoCheckShareAccess
+IoCompleteRequest
+IoConnectInterrupt
+IoCreateController
+IoCreateDevice
+IoCreateDisk
+IoCreateDriver
+IoCreateFile
+IoCreateFileSpecifyDeviceObjectHint
+IoCreateNotificationEvent
+IoCreateStreamFileObject
+IoCreateStreamFileObjectEx
+IoCreateStreamFileObjectLite
+IoCreateSymbolicLink
+IoCreateSynchronizationEvent
+IoCreateUnprotectedSymbolicLink
+IoCsqInitialize
+IoCsqInitializeEx
+IoCsqInsertIrp
+IoCsqInsertIrpEx
+IoCsqRemoveIrp
+IoCsqRemoveNextIrp
+IoDeleteController
+IoDeleteDevice
+IoDeleteDriver
+IoDeleteSymbolicLink
+IoDetachDevice
+IoDeviceHandlerObjectSize
+IoDeviceHandlerObjectType
+IoDeviceObjectType
+IoDisconnectInterrupt
+IoDriverObjectType
+IoEnqueueIrp
+IoEnumerateDeviceObjectList
+IoEnumerateRegisteredFiltersList
+IoFastQueryNetworkAttributes
+IoFileObjectType
+IoForwardAndCatchIrp
+IoForwardIrpSynchronously
+IoFreeController
+IoFreeErrorLogEntry
+IoFreeIrp
+IoFreeMdl
+IoFreeWorkItem
+IoGetAttachedDevice
+IoGetAttachedDeviceReference
+IoGetBaseFileSystemDeviceObject
+IoGetBootDiskInformation
+IoGetConfigurationInformation
+IoGetCurrentProcess
+IoGetDeviceAttachmentBaseRef
+IoGetDeviceInterfaceAlias
+IoGetDeviceInterfaces
+IoGetDeviceObjectPointer
+IoGetDeviceProperty
+IoGetDeviceToVerify
+IoGetDiskDeviceObject
+IoGetDmaAdapter
+IoGetDriverObjectExtension
+IoGetFileObjectGenericMapping
+IoGetInitialStack
+IoGetLowerDeviceObject
+IoGetPagingIoPriority
+IoGetRelatedDeviceObject
+IoGetRequestorProcess
+IoGetRequestorProcessId
+IoGetRequestorSessionId
+IoGetStackLimits
+IoGetTopLevelIrp
+IoInitializeIrp
+IoInitializeRemoveLockEx
+IoInitializeTimer
+IoInvalidateDeviceRelations
+IoInvalidateDeviceState
+IoIs32bitProcess
+IoIsFileOriginRemote
+IoIsOperationSynchronous
+IoIsSystemThread
+IoIsValidNameGraftingBuffer
+IoIsWdmVersionAvailable
+IoMakeAssociatedIrp
+IoOpenDeviceInterfaceRegistryKey
+IoOpenDeviceRegistryKey
+IoPageRead
+IoPnPDeliverServicePowerNotification
+IoQueryDeviceDescription
+IoQueryFileDosDeviceName
+IoQueryFileInformation
+IoQueryVolumeInformation
+IoQueueThreadIrp
+IoQueueWorkItem
+IoRaiseHardError
+IoRaiseInformationalHardError
+IoReadDiskSignature
+IoReadOperationCount
+IoReadPartitionTable
+IoReadPartitionTableEx
+IoReadTransferCount
+IoRegisterBootDriverReinitialization
+IoRegisterDeviceInterface
+IoRegisterDriverReinitialization
+IoRegisterFileSystem
+IoRegisterFsRegistrationChange
+IoRegisterLastChanceShutdownNotification
+IoRegisterPlugPlayNotification
+IoRegisterShutdownNotification
+IoReleaseCancelSpinLock
+IoReleaseRemoveLockAndWaitEx
+IoReleaseRemoveLockEx
+IoReleaseVpbSpinLock
+IoRemoveShareAccess
+IoReportDetectedDevice
+IoReportHalResourceUsage
+IoReportResourceForDetection
+IoReportResourceUsage
+IoReportTargetDeviceChange
+IoReportTargetDeviceChangeAsynchronous
+IoRequestDeviceEject
+IoReuseIrp
+IoSetCompletionRoutineEx
+IoSetDeviceInterfaceState
+IoSetDeviceToVerify
+IoSetFileOrigin
+IoSetHardErrorOrVerifyDevice
+IoSetInformation
+IoSetIoCompletion
+IoSetPartitionInformation
+IoSetPartitionInformationEx
+IoSetShareAccess
+IoSetStartIoAttributes
+IoSetSystemPartition
+IoSetThreadHardErrorMode
+IoSetTopLevelIrp
+IoStartNextPacket
+IoStartNextPacketByKey
+IoStartPacket
+IoStartTimer
+IoStatisticsLock
+IoStopTimer
+IoSynchronousInvalidateDeviceRelations
+IoSynchronousPageWrite
+IoThreadToProcess
+IoTranslateBusAddress
+IoUnregisterFileSystem
+IoUnregisterFsRegistrationChange
+IoUnregisterPlugPlayNotification
+IoUnregisterShutdownNotification
+IoUpdateShareAccess
+IoValidateDeviceIoControlAccess
+IoVerifyPartitionTable
+IoVerifyVolume
+IoVolumeDeviceToDosName
+IoWMIAllocateInstanceIds
+IoWMIDeviceObjectToInstanceName
+IoWMIDeviceObjectToProviderId
+IoWMIExecuteMethod
+IoWMIHandleToInstanceName
+IoWMIOpenBlock
+IoWMIQueryAllData
+IoWMIQueryAllDataMultiple
+IoWMIQuerySingleInstance
+IoWMIQuerySingleInstanceMultiple
+IoWMIRegistrationControl
+IoWMISetNotificationCallback
+IoWMISetSingleInstance
+IoWMISetSingleItem
+IoWMISuggestInstanceName
+IoWMIWriteEvent
+IoWriteErrorLogEntry
+IoWriteOperationCount
+IoWritePartitionTable
+IoWritePartitionTableEx
+IoWriteTransferCount
+IofCallDriver
+IofCompleteRequest
+KdChangeOption
+KdDebuggerEnabled
+KdDebuggerNotPresent
+KdDisableDebugger
+KdEnableDebugger
+KdEnteredDebugger
+KdPollBreakIn
+KdPowerTransition
+KdRefreshDebuggerNotPresent
+KdSystemDebugControl
+KeAcquireGuardedMutex
+KeAcquireGuardedMutexUnsafe
+KeAcquireInStackQueuedSpinLock
+KeAcquireInStackQueuedSpinLockAtDpcLevel
+KeAcquireInStackQueuedSpinLockForDpc
+KeAcquireInStackQueuedSpinLockRaiseToSynch
+KeAcquireInterruptSpinLock
+KeAcquireQueuedSpinLock
+KeAcquireQueuedSpinLockRaiseToSynch
+KeAcquireSpinLockAtDpcLevel
+KeAcquireSpinLockForDpc
+KeAcquireSpinLockRaiseToDpc
+KeAcquireSpinLockRaiseToSynch
+KeAddSystemServiceTable
+KeAreAllApcsDisabled
+KeAreApcsDisabled
+KeAttachProcess
+KeBugCheck
+KeBugCheckEx
+KeCancelTimer
+KeCapturePersistentThreadState
+KeClearEvent
+KeConnectInterrupt
+KeDelayExecutionThread
+KeDeregisterBugCheckCallback
+KeDeregisterBugCheckReasonCallback
+KeDeregisterNmiCallback
+KeDetachProcess
+KeDisconnectInterrupt
+KeEnterCriticalRegion
+KeEnterGuardedRegion
+KeEnterKernelDebugger
+KeExpandKernelStackAndCallout
+KeFindConfigurationEntry
+KeFindConfigurationNextEntry
+KeFlushEntireTb
+KeFlushQueuedDpcs
+KeGenericCallDpc
+KeGetCurrentIrql
+KeGetCurrentThread
+KeGetRecommendedSharedDataAlignment
+KeInitializeApc
+KeInitializeCrashDumpHeader
+KeInitializeDeviceQueue
+KeInitializeDpc
+KeInitializeEvent
+KeInitializeGuardedMutex
+KeInitializeInterrupt
+KeInitializeMutant
+KeInitializeMutex
+KeInitializeQueue
+KeInitializeSemaphore
+KeInitializeThreadedDpc
+KeInitializeTimer
+KeInitializeTimerEx
+KeInsertByKeyDeviceQueue
+KeInsertDeviceQueue
+KeInsertHeadQueue
+KeInsertQueue
+KeInsertQueueApc
+KeInsertQueueDpc
+KeInvalidateAllCaches
+KeIpiGenericCall
+KeIsAttachedProcess
+KeIsWaitListEmpty
+KeLastBranchMSR
+KeLeaveCriticalRegion
+KeLeaveGuardedRegion
+KeLoaderBlock
+KeLowerIrql
+KeNumberProcessors
+KeProfileInterruptWithSource
+KePulseEvent
+KeQueryActiveProcessors
+KeQueryMultiThreadProcessorSet
+KeQueryPrcbAddress
+KeQueryPriorityThread
+KeQueryRuntimeThread
+KeQueryTimeIncrement
+KeRaiseIrqlToDpcLevel
+KeRaiseUserException
+KeReadStateEvent
+KeReadStateMutant
+KeReadStateMutex
+KeReadStateQueue
+KeReadStateSemaphore
+KeReadStateTimer
+KeRegisterBugCheckCallback
+KeRegisterBugCheckReasonCallback
+KeRegisterNmiCallback
+KeReleaseGuardedMutex
+KeReleaseGuardedMutexUnsafe
+KeReleaseInStackQueuedSpinLock
+KeReleaseInStackQueuedSpinLockForDpc
+KeReleaseInStackQueuedSpinLockFromDpcLevel
+KeReleaseInterruptSpinLock
+KeReleaseMutant
+KeReleaseMutex
+KeReleaseQueuedSpinLock
+KeReleaseSemaphore
+KeReleaseSpinLock
+KeReleaseSpinLockForDpc
+KeReleaseSpinLockFromDpcLevel
+KeRemoveByKeyDeviceQueue
+KeRemoveByKeyDeviceQueueIfBusy
+KeRemoveDeviceQueue
+KeRemoveEntryDeviceQueue
+KeRemoveQueue
+KeRemoveQueueDpc
+KeRemoveSystemServiceTable
+KeResetEvent
+KeRestoreFloatingPointState
+KeRevertToUserAffinityThread
+KeRundownQueue
+KeSaveFloatingPointState
+KeSaveStateForHibernate
+KeServiceDescriptorTable
+KeSetAffinityThread
+KeSetBasePriorityThread
+KeSetDmaIoCoherency
+KeSetEvent
+KeSetEventBoostPriority
+KeSetIdealProcessorThread
+KeSetImportanceDpc
+KeSetKernelStackSwapEnable
+KeSetPriorityThread
+KeSetProfileIrql
+KeSetSystemAffinityThread
+KeSetTargetProcessorDpc
+KeSetTimeIncrement
+KeSetTimer
+KeSetTimerEx
+KeSignalCallDpcDone
+KeSignalCallDpcSynchronize
+KeStackAttachProcess
+KeSynchronizeExecution
+KeTerminateThread
+KeTestSpinLock
+KeTryToAcquireGuardedMutex
+KeTryToAcquireQueuedSpinLock
+KeTryToAcquireQueuedSpinLockRaiseToSynch
+KeTryToAcquireSpinLockAtDpcLevel
+KeUnstackDetachProcess
+KeUpdateRunTime
+KeUpdateSystemTime
+KeUserModeCallback
+KeWaitForMultipleObjects
+KeWaitForMutexObject
+KeWaitForSingleObject
+KfRaiseIrql
+KiBugCheckData
+KiCheckForKernelApcDelivery
+KiCpuId
+LdrAccessResource
+LdrEnumResources
+LdrFindResourceDirectory_U
+LdrFindResource_U
+LpcPortObjectType
+LpcRequestPort
+LpcRequestWaitReplyPort
+LsaCallAuthenticationPackage
+LsaDeregisterLogonProcess
+LsaFreeReturnBuffer
+LsaLogonUser
+LsaLookupAuthenticationPackage
+LsaRegisterLogonProcess
+Mm64BitPhysicalAddress
+MmAddPhysicalMemory
+MmAddVerifierThunks
+MmAdjustWorkingSetSize
+MmAdvanceMdl
+MmAllocateContiguousMemory
+MmAllocateContiguousMemorySpecifyCache
+MmAllocateMappingAddress
+MmAllocateNonCachedMemory
+MmAllocatePagesForMdl
+MmAllocatePagesForMdlEx
+MmBuildMdlForNonPagedPool
+MmCanFileBeTruncated
+MmCommitSessionMappedView
+MmCreateMdl
+MmCreateMirror
+MmCreateSection
+MmDisableModifiedWriteOfSection
+MmFlushImageSection
+MmForceSectionClosed
+MmFreeContiguousMemory
+MmFreeContiguousMemorySpecifyCache
+MmFreeMappingAddress
+MmFreeNonCachedMemory
+MmFreePagesFromMdl
+MmGetPhysicalAddress
+MmGetPhysicalMemoryRanges
+MmGetSystemRoutineAddress
+MmGetVirtualForPhysical
+MmGrowKernelStack
+MmHighestUserAddress
+MmIsAddressValid
+MmIsDriverVerifying
+MmIsIoSpaceActive
+MmIsNonPagedSystemAddressValid
+MmIsRecursiveIoFault
+MmIsThisAnNtAsSystem
+MmIsVerifierEnabled
+MmLockPagableDataSection
+MmLockPagableImageSection
+MmLockPagableSectionByHandle
+MmMapIoSpace
+MmMapLockedPages
+MmMapLockedPagesSpecifyCache
+MmMapLockedPagesWithReservedMapping
+MmMapMemoryDumpMdl
+MmMapUserAddressesToPage
+MmMapVideoDisplay
+MmMapViewInSessionSpace
+MmMapViewInSystemSpace
+MmMapViewOfSection
+MmMarkPhysicalMemoryAsBad
+MmMarkPhysicalMemoryAsGood
+MmPageEntireDriver
+MmPrefetchPages
+MmProbeAndLockPages
+MmProbeAndLockProcessPages
+MmProbeAndLockSelectedPages
+MmProtectMdlSystemAddress
+MmQuerySystemSize
+MmRemovePhysicalMemory
+MmResetDriverPaging
+MmSectionObjectType
+MmSecureVirtualMemory
+MmSetAddressRangeModified
+MmSetBankedSection
+MmSizeOfMdl
+MmSystemRangeStart
+MmTrimAllSystemPagableMemory
+MmUnlockPagableImageSection
+MmUnlockPages
+MmUnmapIoSpace
+MmUnmapLockedPages
+MmUnmapReservedMapping
+MmUnmapVideoDisplay
+MmUnmapViewInSessionSpace
+MmUnmapViewInSystemSpace
+MmUnmapViewOfSection
+MmUnsecureVirtualMemory
+MmUserProbeAddress
+NlsAnsiCodePage
+NlsLeadByteInfo
+NlsMbCodePageTag
+NlsMbOemCodePageTag
+NlsOemCodePage
+NlsOemLeadByteInfo
+NtAddAtom
+NtAdjustPrivilegesToken
+NtAllocateLocallyUniqueId
+NtAllocateUuids
+NtAllocateVirtualMemory
+NtBuildNumber
+NtClose
+NtConnectPort
+NtCreateEvent
+NtCreateFile
+NtCreateSection
+NtDeleteAtom
+NtDeleteFile
+NtDeviceIoControlFile
+NtDuplicateObject
+NtDuplicateToken
+NtFindAtom
+NtFreeVirtualMemory
+NtFsControlFile
+NtGlobalFlag
+NtLockFile
+NtMakePermanentObject
+NtMapViewOfSection
+NtNotifyChangeDirectoryFile
+NtOpenFile
+NtOpenProcess
+NtOpenProcessToken
+NtOpenProcessTokenEx
+NtOpenThread
+NtOpenThreadToken
+NtOpenThreadTokenEx
+NtQueryDirectoryFile
+NtQueryEaFile
+NtQueryInformationAtom
+NtQueryInformationFile
+NtQueryInformationProcess
+NtQueryInformationThread
+NtQueryInformationToken
+NtQueryQuotaInformationFile
+NtQuerySecurityObject
+NtQuerySystemInformation
+NtQueryVolumeInformationFile
+NtReadFile
+NtRequestPort
+NtRequestWaitReplyPort
+NtSetEaFile
+NtSetEvent
+NtSetInformationFile
+NtSetInformationProcess
+NtSetInformationThread
+NtSetQuotaInformationFile
+NtSetSecurityObject
+NtSetVolumeInformationFile
+NtShutdownSystem
+NtTraceEvent
+NtUnlockFile
+NtVdmControl
+NtWaitForSingleObject
+NtWriteFile
+ObAssignSecurity
+ObCheckCreateObjectAccess
+ObCheckObjectAccess
+ObCloseHandle
+ObCreateObject
+ObCreateObjectType
+ObDeleteCapturedInsertInfo
+ObDereferenceObject
+ObDereferenceSecurityDescriptor
+ObFindHandleForObject
+ObGetObjectSecurity
+ObInsertObject
+ObLogSecurityDescriptor
+ObMakeTemporaryObject
+ObOpenObjectByName
+ObOpenObjectByPointer
+ObQueryNameString
+ObQueryObjectAuditingByHandle
+ObReferenceObjectByHandle
+ObReferenceObjectByName
+ObReferenceObjectByPointer
+ObReferenceSecurityDescriptor
+ObReleaseObjectSecurity
+ObSetHandleAttributes
+ObSetSecurityDescriptorInfo
+ObSetSecurityObjectByPointer
+ObfDereferenceObject
+ObfReferenceObject
+PfxFindPrefix
+PfxInitialize
+PfxInsertPrefix
+PfxRemovePrefix
+PoCallDriver
+PoCancelDeviceNotify
+PoQueueShutdownWorkItem
+PoRegisterDeviceForIdleDetection
+PoRegisterDeviceNotify
+PoRegisterSystemState
+PoRequestPowerIrp
+PoRequestShutdownEvent
+PoSetHiberRange
+PoSetPowerState
+PoSetSystemState
+PoShutdownBugCheck
+PoStartNextPowerIrp
+PoUnregisterSystemState
+ProbeForRead
+ProbeForWrite
+PsAssignImpersonationToken
+PsChargePoolQuota
+PsChargeProcessNonPagedPoolQuota
+PsChargeProcessPagedPoolQuota
+PsChargeProcessPoolQuota
+PsCreateSystemProcess
+PsCreateSystemThread
+PsDereferenceImpersonationToken
+PsDereferencePrimaryToken
+PsDisableImpersonation
+PsEstablishWin32Callouts
+PsGetContextThread
+PsGetCurrentProcess
+PsGetCurrentProcessId
+PsGetCurrentProcessSessionId
+PsGetCurrentProcessWin32Process
+PsGetCurrentProcessWow64Process
+PsGetCurrentThread
+PsGetCurrentThreadId
+PsGetCurrentThreadPreviousMode
+PsGetCurrentThreadProcess
+PsGetCurrentThreadProcessId
+PsGetCurrentThreadStackBase
+PsGetCurrentThreadStackLimit
+PsGetCurrentThreadTeb
+PsGetCurrentThreadWin32Thread
+PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion
+PsGetJobLock
+PsGetJobSessionId
+PsGetJobUIRestrictionsClass
+PsGetProcessCreateTimeQuadPart
+PsGetProcessDebugPort
+PsGetProcessExitProcessCalled
+PsGetProcessExitStatus
+PsGetProcessExitTime
+PsGetProcessId
+PsGetProcessImageFileName
+PsGetProcessInheritedFromUniqueProcessId
+PsGetProcessJob
+PsGetProcessPeb
+PsGetProcessPriorityClass
+PsGetProcessSectionBaseAddress
+PsGetProcessSecurityPort
+PsGetProcessSessionId
+PsGetProcessSessionIdEx
+PsGetProcessWin32Process
+PsGetProcessWin32WindowStation
+PsGetProcessWow64Process
+PsGetThreadFreezeCount
+PsGetThreadHardErrorsAreDisabled
+PsGetThreadId
+PsGetThreadProcess
+PsGetThreadProcessId
+PsGetThreadSessionId
+PsGetThreadTeb
+PsGetThreadWin32Thread
+PsGetVersion
+PsImpersonateClient
+PsInitialSystemProcess
+PsIsProcessBeingDebugged
+PsIsSystemProcess
+PsIsSystemThread
+PsIsThreadImpersonating
+PsIsThreadTerminating
+PsJobType
+PsLookupProcessByProcessId
+PsLookupProcessThreadByCid
+PsLookupThreadByThreadId
+PsProcessType
+PsReferenceImpersonationToken
+PsReferencePrimaryToken
+PsRemoveCreateThreadNotifyRoutine
+PsRemoveLoadImageNotifyRoutine
+PsRestoreImpersonation
+PsReturnPoolQuota
+PsReturnProcessNonPagedPoolQuota
+PsReturnProcessPagedPoolQuota
+PsRevertThreadToSelf
+PsRevertToSelf
+PsSetContextThread
+PsSetCreateProcessNotifyRoutine
+PsSetCreateThreadNotifyRoutine
+PsSetJobUIRestrictionsClass
+PsSetLegoNotifyRoutine
+PsSetLoadImageNotifyRoutine
+PsSetProcessPriorityByClass
+PsSetProcessPriorityClass
+PsSetProcessSecurityPort
+PsSetProcessWin32Process
+PsSetProcessWindowStation
+PsSetThreadHardErrorsAreDisabled
+PsSetThreadWin32Thread
+PsTerminateSystemThread
+PsThreadType
+PsWrapApcWow64Thread
+RtlAbsoluteToSelfRelativeSD
+RtlAddAccessAllowedAce
+RtlAddAccessAllowedAceEx
+RtlAddAce
+RtlAddAtomToAtomTable
+RtlAddRange
+RtlAllocateHeap
+RtlAnsiCharToUnicodeChar
+RtlAnsiStringToUnicodeSize
+RtlAnsiStringToUnicodeString
+RtlAppendAsciizToString
+RtlAppendStringToString
+RtlAppendUnicodeStringToString
+RtlAppendUnicodeToString
+RtlAreAllAccessesGranted
+RtlAreAnyAccessesGranted
+RtlAreBitsClear
+RtlAreBitsSet
+RtlAssert
+RtlCaptureContext
+RtlCaptureStackBackTrace
+RtlCharToInteger
+RtlCheckRegistryKey
+RtlClearAllBits
+RtlClearBit
+RtlClearBits
+RtlCompareMemory
+RtlCompareMemoryUlong
+RtlCompareString
+RtlCompareUnicodeString
+RtlCompressBuffer
+RtlCompressChunks
+RtlConvertSidToUnicodeString
+RtlCopyLuid
+RtlCopyMemory
+RtlCopyMemoryNonTemporal
+RtlCopyRangeList
+RtlCopySid
+RtlCopyString
+RtlCopyUnicodeString
+RtlCreateAcl
+RtlCreateAtomTable
+RtlCreateHeap
+RtlCreateRegistryKey
+RtlCreateSecurityDescriptor
+RtlCreateSystemVolumeInformationFolder
+RtlCreateUnicodeString
+RtlCustomCPToUnicodeN
+RtlDecompressBuffer
+RtlDecompressChunks
+RtlDecompressFragment
+RtlDelete
+RtlDeleteAce
+RtlDeleteAtomFromAtomTable
+RtlDeleteElementGenericTable
+RtlDeleteElementGenericTableAvl
+RtlDeleteNoSplay
+RtlDeleteOwnersRanges
+RtlDeleteRange
+RtlDeleteRegistryValue
+RtlDescribeChunk
+RtlDestroyAtomTable
+RtlDestroyHeap
+RtlDowncaseUnicodeString
+RtlEmptyAtomTable
+RtlEnumerateGenericTable
+RtlEnumerateGenericTableAvl
+RtlEnumerateGenericTableLikeADirectory
+RtlEnumerateGenericTableWithoutSplaying
+RtlEnumerateGenericTableWithoutSplayingAvl
+RtlEqualLuid
+RtlEqualSid
+RtlEqualString
+RtlEqualUnicodeString
+RtlFillMemory
+RtlFindClearBits
+RtlFindClearBitsAndSet
+RtlFindClearRuns
+RtlFindFirstRunClear
+RtlFindLastBackwardRunClear
+RtlFindLeastSignificantBit
+RtlFindLongestRunClear
+RtlFindMessage
+RtlFindMostSignificantBit
+RtlFindNextForwardRunClear
+RtlFindRange
+RtlFindSetBits
+RtlFindSetBitsAndClear
+RtlFindUnicodePrefix
+RtlFormatCurrentUserKeyPath
+RtlFreeAnsiString
+RtlFreeHeap
+RtlFreeOemString
+RtlFreeRangeList
+RtlFreeUnicodeString
+RtlGUIDFromString
+RtlGenerate8dot3Name
+RtlGetAce
+RtlGetCallersAddress
+RtlGetCompressionWorkSpaceSize
+RtlGetDaclSecurityDescriptor
+RtlGetDefaultCodePage
+RtlGetElementGenericTable
+RtlGetElementGenericTableAvl
+RtlGetFirstRange
+RtlGetGroupSecurityDescriptor
+RtlGetNextRange
+RtlGetNtGlobalFlags
+RtlGetOwnerSecurityDescriptor
+RtlGetSaclSecurityDescriptor
+RtlGetSetBootStatusData
+RtlGetVersion
+RtlHashUnicodeString
+RtlImageDirectoryEntryToData
+RtlImageNtHeader
+RtlInitAnsiString
+RtlInitAnsiStringEx
+RtlInitCodePageTable
+RtlInitString
+RtlInitUnicodeString
+RtlInitUnicodeStringEx
+RtlInitializeBitMap
+RtlInitializeGenericTable
+RtlInitializeGenericTableAvl
+RtlInitializeRangeList
+RtlInitializeSid
+RtlInitializeUnicodePrefix
+RtlInsertElementGenericTable
+RtlInsertElementGenericTableAvl
+RtlInsertElementGenericTableFull
+RtlInsertElementGenericTableFullAvl
+RtlInsertUnicodePrefix
+RtlInt64ToUnicodeString
+RtlIntegerToChar
+RtlIntegerToUnicode
+RtlIntegerToUnicodeString
+RtlInvertRangeList
+RtlIpv4AddressToStringA
+RtlIpv4AddressToStringExA
+RtlIpv4AddressToStringExW
+RtlIpv4AddressToStringW
+RtlIpv4StringToAddressA
+RtlIpv4StringToAddressExA
+RtlIpv4StringToAddressExW
+RtlIpv4StringToAddressW
+RtlIpv6AddressToStringA
+RtlIpv6AddressToStringExA
+RtlIpv6AddressToStringExW
+RtlIpv6AddressToStringW
+RtlIpv6StringToAddressA
+RtlIpv6StringToAddressExA
+RtlIpv6StringToAddressExW
+RtlIpv6StringToAddressW
+RtlIsGenericTableEmpty
+RtlIsGenericTableEmptyAvl
+RtlIsNameLegalDOS8Dot3
+RtlIsRangeAvailable
+RtlIsValidOemCharacter
+RtlLengthRequiredSid
+RtlLengthSecurityDescriptor
+RtlLengthSid
+RtlLockBootStatusData
+RtlLookupAtomInAtomTable
+RtlLookupElementGenericTable
+RtlLookupElementGenericTableAvl
+RtlLookupElementGenericTableFull
+RtlLookupElementGenericTableFullAvl
+RtlLookupFunctionEntry
+RtlMapGenericMask
+RtlMapSecurityErrorToNtStatus
+RtlMergeRangeLists
+RtlMoveMemory
+RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeSize
+RtlNextUnicodePrefix
+RtlNtStatusToDosError
+RtlNtStatusToDosErrorNoTeb
+RtlNumberGenericTableElements
+RtlNumberGenericTableElementsAvl
+RtlNumberOfClearBits
+RtlNumberOfSetBits
+RtlOemStringToCountedUnicodeString
+RtlOemStringToUnicodeSize
+RtlOemStringToUnicodeString
+RtlOemToUnicodeN
+RtlPcToFileHeader
+RtlPinAtomInAtomTable
+RtlPrefetchMemoryNonTemporal
+RtlPrefixString
+RtlPrefixUnicodeString
+RtlQueryAtomInAtomTable
+RtlQueryRegistryValues
+RtlQueryTimeZoneInformation
+RtlRaiseException
+RtlRandom
+RtlRandomEx
+RtlRealPredecessor
+RtlRealSuccessor
+RtlRemoveUnicodePrefix
+RtlReserveChunk
+RtlRestoreContext
+RtlSecondsSince1970ToTime
+RtlSecondsSince1980ToTime
+RtlSelfRelativeToAbsoluteSD
+RtlSelfRelativeToAbsoluteSD2
+RtlSetAllBits
+RtlSetBit
+RtlSetBits
+RtlSetDaclSecurityDescriptor
+RtlSetGroupSecurityDescriptor
+RtlSetOwnerSecurityDescriptor
+RtlSetSaclSecurityDescriptor
+RtlSetTimeZoneInformation
+RtlSizeHeap
+RtlSplay
+RtlStringFromGUID
+RtlSubAuthorityCountSid
+RtlSubAuthoritySid
+RtlSubtreePredecessor
+RtlSubtreeSuccessor
+RtlTestBit
+RtlTimeFieldsToTime
+RtlTimeToElapsedTimeFields
+RtlTimeToSecondsSince1970
+RtlTimeToSecondsSince1980
+RtlTimeToTimeFields
+RtlTraceDatabaseAdd
+RtlTraceDatabaseCreate
+RtlTraceDatabaseDestroy
+RtlTraceDatabaseEnumerate
+RtlTraceDatabaseFind
+RtlTraceDatabaseLock
+RtlTraceDatabaseUnlock
+RtlTraceDatabaseValidate
+RtlUnicodeStringToAnsiSize
+RtlUnicodeStringToAnsiString
+RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToInteger
+RtlUnicodeStringToOemSize
+RtlUnicodeStringToOemString
+RtlUnicodeToCustomCPN
+RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteSize
+RtlUnicodeToOemN
+RtlUnlockBootStatusData
+RtlUnwind
+RtlUnwindEx
+RtlUpcaseUnicodeChar
+RtlUpcaseUnicodeString
+RtlUpcaseUnicodeStringToAnsiString
+RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToOemString
+RtlUpcaseUnicodeToCustomCPN
+RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToOemN
+RtlUpperChar
+RtlUpperString
+RtlValidRelativeSecurityDescriptor
+RtlValidSecurityDescriptor
+RtlValidSid
+RtlVerifyVersionInfo
+RtlVirtualUnwind
+RtlVolumeDeviceToDosName
+RtlWalkFrameChain
+RtlWriteRegistryValue
+RtlZeroHeap
+RtlZeroMemory
+RtlxAnsiStringToUnicodeSize
+RtlxOemStringToUnicodeSize
+RtlxUnicodeStringToAnsiSize
+RtlxUnicodeStringToOemSize
+SeAccessCheck
+SeAppendPrivileges
+SeAssignSecurity
+SeAssignSecurityEx
+SeAuditHardLinkCreation
+SeAuditingFileEvents
+SeAuditingFileEventsWithContext
+SeAuditingFileOrGlobalEvents
+SeAuditingHardLinkEvents
+SeAuditingHardLinkEventsWithContext
+SeCaptureSecurityDescriptor
+SeCaptureSubjectContext
+SeCloseObjectAuditAlarm
+SeCreateAccessState
+SeCreateClientSecurity
+SeCreateClientSecurityFromSubjectContext
+SeDeassignSecurity
+SeDeleteAccessState
+SeDeleteObjectAuditAlarm
+SeExports
+SeFilterToken
+SeFreePrivileges
+SeImpersonateClient
+SeImpersonateClientEx
+SeLockSubjectContext
+SeMarkLogonSessionForTerminationNotification
+SeOpenObjectAuditAlarm
+SeOpenObjectForDeleteAuditAlarm
+SePrivilegeCheck
+SePrivilegeObjectAuditAlarm
+SePublicDefaultDacl
+SeQueryAuthenticationIdToken
+SeQueryInformationToken
+SeQuerySecurityDescriptorInfo
+SeQuerySessionIdToken
+SeRegisterLogonSessionTerminatedRoutine
+SeReleaseSecurityDescriptor
+SeReleaseSubjectContext
+SeReportSecurityEvent
+SeSetAccessStateGenericMapping
+SeSetAuditParameter
+SeSetSecurityDescriptorInfo
+SeSetSecurityDescriptorInfoEx
+SeSinglePrivilegeCheck
+SeSystemDefaultDacl
+SeTokenImpersonationLevel
+SeTokenIsAdmin
+SeTokenIsRestricted
+SeTokenObjectType
+SeTokenType
+SeUnlockSubjectContext
+SeUnregisterLogonSessionTerminatedRoutine
+SeValidSecurityDescriptor
+VerSetConditionMask
+VfFailDeviceNode
+VfFailDriver
+VfFailSystemBIOS
+VfIsVerificationEnabled
+WmiFlushTrace
+WmiGetClock
+WmiQueryTrace
+WmiQueryTraceInformation
+WmiStartTrace
+WmiStopTrace
+WmiTraceFastEvent
+WmiTraceMessage
+WmiTraceMessageVa
+WmiUpdateTrace
+XIPDispatch
+ZwAccessCheckAndAuditAlarm
+ZwAddBootEntry
+ZwAddDriverEntry
+ZwAdjustPrivilegesToken
+ZwAlertThread
+ZwAllocateVirtualMemory
+ZwAssignProcessToJobObject
+ZwCancelIoFile
+ZwCancelTimer
+ZwClearEvent
+ZwClose
+ZwCloseObjectAuditAlarm
+ZwConnectPort
+ZwCreateDirectoryObject
+ZwCreateEvent
+ZwCreateFile
+ZwCreateJobObject
+ZwCreateKey
+ZwCreateSection
+ZwCreateSymbolicLinkObject
+ZwCreateTimer
+ZwDeleteBootEntry
+ZwDeleteDriverEntry
+ZwDeleteFile
+ZwDeleteKey
+ZwDeleteValueKey
+ZwDeviceIoControlFile
+ZwDisplayString
+ZwDuplicateObject
+ZwDuplicateToken
+ZwEnumerateBootEntries
+ZwEnumerateDriverEntries
+ZwEnumerateKey
+ZwEnumerateValueKey
+ZwFlushInstructionCache
+ZwFlushKey
+ZwFlushVirtualMemory
+ZwFreeVirtualMemory
+ZwFsControlFile
+ZwInitiatePowerAction
+ZwIsProcessInJob
+ZwLoadDriver
+ZwLoadKey
+ZwMakeTemporaryObject
+ZwMapViewOfSection
+ZwModifyBootEntry
+ZwModifyDriverEntry
+ZwNotifyChangeKey
+ZwOpenDirectoryObject
+ZwOpenEvent
+ZwOpenFile
+ZwOpenJobObject
+ZwOpenKey
+ZwOpenProcess
+ZwOpenProcessToken
+ZwOpenProcessTokenEx
+ZwOpenSection
+ZwOpenSymbolicLinkObject
+ZwOpenThread
+ZwOpenThreadToken
+ZwOpenThreadTokenEx
+ZwOpenTimer
+ZwPowerInformation
+ZwPulseEvent
+ZwQueryBootEntryOrder
+ZwQueryBootOptions
+ZwQueryDefaultLocale
+ZwQueryDefaultUILanguage
+ZwQueryDirectoryFile
+ZwQueryDirectoryObject
+ZwQueryDriverEntryOrder
+ZwQueryEaFile
+ZwQueryFullAttributesFile
+ZwQueryInformationFile
+ZwQueryInformationJobObject
+ZwQueryInformationProcess
+ZwQueryInformationThread
+ZwQueryInformationToken
+ZwQueryInstallUILanguage
+ZwQueryKey
+ZwQueryObject
+ZwQuerySection
+ZwQuerySecurityObject
+ZwQuerySymbolicLinkObject
+ZwQuerySystemInformation
+ZwQueryValueKey
+ZwQueryVolumeInformationFile
+ZwReadFile
+ZwReplaceKey
+ZwRequestWaitReplyPort
+ZwResetEvent
+ZwRestoreKey
+ZwSaveKey
+ZwSaveKeyEx
+ZwSecureConnectPort
+ZwSetBootEntryOrder
+ZwSetBootOptions
+ZwSetDefaultLocale
+ZwSetDefaultUILanguage
+ZwSetDriverEntryOrder
+ZwSetEaFile
+ZwSetEvent
+ZwSetInformationFile
+ZwSetInformationJobObject
+ZwSetInformationObject
+ZwSetInformationProcess
+ZwSetInformationThread
+ZwSetSecurityObject
+ZwSetSystemInformation
+ZwSetSystemTime
+ZwSetTimer
+ZwSetValueKey
+ZwSetVolumeInformationFile
+ZwTerminateJobObject
+ZwTerminateProcess
+ZwTranslateFilePath
+ZwUnloadDriver
+ZwUnloadKey
+ZwUnmapViewOfSection
+ZwWaitForMultipleObjects
+ZwWaitForSingleObject
+ZwWriteFile
+ZwYieldExecution
+__C_specific_handler
+__chkstk
+__misaligned_access
+_itoa
+_itow
+_local_unwind
+_purecall
+_setjmp
+_setjmpex
+_snprintf
+_snwprintf
+_stricmp
+_strlwr
+_strnicmp
+_strnset
+_strrev
+_strset
+_strupr
+_vsnprintf
+_vsnwprintf
+_wcsicmp
+_wcslwr
+_wcsnicmp
+_wcsnset
+_wcsrev
+_wcsupr
+atoi
+atol
+isdigit
+islower
+isprint
+isspace
+isupper
+isxdigit
+longjmp
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+qsort
+rand
+sprintf
+srand
+strcat
+strchr
+strcmp
+strcpy
+strlen
+strncat
+strncmp
+strncpy
+strrchr
+strspn
+strstr
+swprintf
+tolower
+toupper
+towlower
+towupper
+vDbgPrintEx
+vDbgPrintExWithPrefix
+vsprintf
+wcscat
+wcschr
+wcscmp
+wcscpy
+wcscspn
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcsrchr
+wcsspn
+wcsstr
+wcstombs
+wctomb
+KiSystemStartup
--- /dev/null
+OUTPUT_FORMAT(pei-x86-64)
+ENTRY(_mainCRTStartup)
+SECTIONS
+{
+ .text __image_base__ + __section_alignment__ :
+ {
+ __text_start__ = .;
+ *(.init)
+ *(.text)
+ *(SORT(.text$*))
+ *(.glue_7t)
+ *(.glue_7)
+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0);
+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0);
+ *(.fini)
+ /* ??? Why is .gcc_exc here? */
+ *(.gcc_exc)
+ __text_end__ = .;
+ *(.gcc_except_table)
+ }
+ init BLOCK(__section_alignment__) :
+ {
+ __init_start__ = . ;
+ *(init)
+ __init_end__ = . ;
+ }
+ /* The Cygwin32 library uses a section to avoid copying certain data
+ on fork. This used to be named ".data". The linker used
+ to include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. Instead, we name the section
+ ".data_cygwin_nocopy" and explictly include it after __data_end__. */
+ .data BLOCK(__section_alignment__) :
+ {
+ __data_start__ = . ;
+ *(.data)
+ *(.data2)
+ *(SORT(.data$*))
+ __data_end__ = . ;
+ *(.data_cygwin_nocopy)
+ }
+ .rdata BLOCK(__section_alignment__) :
+ {
+ *(.rdata)
+ *(SORT(.rdata$*))
+ *(.eh_frame)
+ }
+ .edata BLOCK(__section_alignment__) :
+ {
+ *(.edata)
+ }
+ /DISCARD/ :
+ {
+ *(.debug$S)
+ *(.debug$T)
+ *(.debug$F)
+ *(.drectve)
+ }
+
+ .idata BLOCK(__section_alignment__) :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)
+ }
+ .CRT BLOCK(__section_alignment__) :
+ {
+ *(SORT(.CRT$*))
+ }
+ .rsrc BLOCK(__section_alignment__) :
+ {
+ *(.rsrc)
+ *(SORT(.rsrc$*))
+ }
+ .bss BLOCK(__section_alignment__) :
+ {
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ __bss_end__ = . ;
+ }
+ .reloc BLOCK(__section_alignment__) :
+ {
+ *(.reloc)
+ /* These zeroes mark the end of the reloc section. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ }
+ .stab BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ [ .stab ]
+ }
+ .stabstr BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ [ .stabstr ]
+ }
+}
+
RtlCopyMemory(&WndObjInt->WndObj.coClient, ClipObj, sizeof (CLIPOBJ));
RtlCopyMemory(&WndObjInt->WndObj.rclClient, &Window->Wnd->ClientRect, sizeof (RECT));
- OldClipObj = InterlockedExchangePointer(&WndObjInt->ClientClipObj, ClipObj);
+ OldClipObj = InterlockedExchangePointer((PVOID*)&WndObjInt->ClientClipObj, ClipObj);
if (OldClipObj != NULL)
IntEngDeleteClipRegion(OldClipObj);
{
RtlCopyMemory(Extra, ClassName->Buffer, ClassName->Length);
CbtCreatewndExtra->Cs.lpszClass =
- (LPCWSTR) MAKELONG(Extra - (PCHAR) CbtCreatewndExtra, 1);
+ (LPCWSTR)(ULONG_PTR) MAKELONG(Extra - (PCHAR) CbtCreatewndExtra, 1);
Extra += ClassName->Length;
*((WCHAR *) Extra) = L'\0';
}
IntRestoreTebWndCallback (hWnd, pWnd);
IntCbFreeMemory(Argument);
-
+
if (!NT_SUCCESS(Status))
{
return 0;
Class->Clone = NULL;
Class->Base = BaseClass;
Class->Next = BaseClass->Clone;
- (void)InterlockedExchangePointer(&BaseClass->Clone,
+ (void)InterlockedExchangePointer((VOID*)&BaseClass->Clone,
Class);
}
}
/* FIXME should get timeout from
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
- Status = co_MsqSendMessage(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQueue, (HWND) Code, HookId,
+ Status = co_MsqSendMessage(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQueue, (HWND)(INT_PTR) Code, HookId,
wParam, lParam, 5000, TRUE, TRUE, &uResult);
return NT_SUCCESS(Status) ? uResult : 0;
HHOOK
STDCALL
NtUserSetWindowsHookAW(
- int idHook,
+ int idHook,
HOOKPROC lpfn,
BOOL Ansi)
{
}
Mod = NULL;
Global = FALSE;
- if (! NT_SUCCESS(PsLookupThreadByThreadId((HANDLE) ThreadId, &Thread)))
+ if (! NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)ThreadId, &Thread)))
{
DPRINT1("Invalid thread id 0x%x\n", ThreadId);
SetLastWin32Error(ERROR_INVALID_PARAMETER);
UserLeave();
END_CLEANUP;
}
-
+
/* EOF */
hKl |= 0xe001 << 16; /* FIXME */\r
else hKl |= hKl << 16;\r
\r
- NewKbl->hkl = (HKL) hKl;\r
+ NewKbl->hkl = (HKL)(ULONG_PTR) hKl;\r
NewKbl->klid = LocaleId;\r
NewKbl->Flags = 0;\r
NewKbl->RefCount = 0;\r
return W32Thread->KeyboardLayout->hkl;\r
}\r
\r
- Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);\r
+ Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread);\r
if(!NT_SUCCESS(Status))\r
{\r
SetLastWin32Error(ERROR_INVALID_PARAMETER);\r
RETURN(FALSE);
}
- hMenu = (HMENU)WindowObject->Wnd->IDMenu;
+ hMenu = (HMENU)(DWORD_PTR)WindowObject->Wnd->IDMenu;
if (!(MenuObject = UserGetMenuObject(hMenu)))
{
RETURN(FALSE);
}
- if(Window->Wnd->IDMenu == (UINT)hMenu)
+ if(Window->Wnd->IDMenu == (UINT)(UINT_PTR)hMenu)
{
RETURN( IntHiliteMenuItem(Window, Menu, uItemHilite, uHilite));
}
if bInsert == TRUE call NtUserInsertMenuItem() else NtUserSetMenuItemInfo() */
if (bInsert) return UserInsertMenuItem(hMenu, uItem, fByPosition, lpmii);
-
+
UNIMPLEMENTED
return 0;
}
/*
* @unimplemented
*/
-DWORD STDCALL
+DWORD_PTR STDCALL
NtUserGetThreadState(
DWORD Routine)
{
- DECLARE_RETURN(DWORD);
+ DWORD_PTR ret = 0;
DPRINT("Enter NtUserGetThreadState\n");
if (Routine != THREADSTATE_GETTHREADINFO)
{
case THREADSTATE_GETTHREADINFO:
GetW32ThreadInfo();
- RETURN(0);
-
+ break;
case THREADSTATE_FOCUSWINDOW:
- RETURN( (DWORD)IntGetThreadFocusWindow());
+ ret = (DWORD_PTR)IntGetThreadFocusWindow();
+ break;
case THREADSTATE_CAPTUREWINDOW:
/* FIXME should use UserEnterShared */
- RETURN( (DWORD)IntGetCapture());
+ ret = (DWORD_PTR)IntGetCapture();
+ break;
case THREADSTATE_PROGMANWINDOW:
- RETURN( (DWORD)GetW32ThreadInfo()->Desktop->hProgmanWindow);
+ ret = (DWORD_PTR)GetW32ThreadInfo()->Desktop->hProgmanWindow;
+ break;
case THREADSTATE_TASKMANWINDOW:
- RETURN( (DWORD)GetW32ThreadInfo()->Desktop->hTaskManWindow);
+ ret = (DWORD_PTR)GetW32ThreadInfo()->Desktop->hTaskManWindow;
+ break;
case THREADSTATE_ACTIVEWINDOW:
- RETURN ( (DWORD)UserGetActiveWindow());
+ ret = (DWORD_PTR)UserGetActiveWindow();
+ break;
}
- RETURN( 0);
-CLEANUP:
- DPRINT("Leave NtUserGetThreadState, ret=%i\n",_ret_);
+ DPRINT("Leave NtUserGetThreadState, ret=%i\n", ret);
UserLeave();
- END_CLEANUP;
+
+ return ret;
}
if(idThread)
{
- Status = PsLookupThreadByThreadId((HANDLE)idThread, &Thread);
+ Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread, &Thread);
if(!NT_SUCCESS(Status))
{
SetLastWin32Error(ERROR_ACCESS_DENIED);
(ULONG_PTR)W32Process->HeapMappings.UserMapping;
pi->psi = gpsi;
- if (InterlockedCompareExchangePointer(&W32Process->ProcessInfo,
+ if (InterlockedCompareExchangePointer((PVOID*)&W32Process->ProcessInfo,
pi,
NULL) != NULL)
{
&& !(Wnd->ExStyle & WS_EX_TOOLWINDOW);
}
else
- HasIcon = (BOOL) hIcon;
+ HasIcon = (hIcon != 0);
IconWidth = UserGetSystemMetrics(SM_CXSIZE) + Padding;
/*
* @unimplemented
*/
-DWORD
+DWORD_PTR
STDCALL
NtUserCallNoParam(DWORD Routine)
{
- DWORD Result = 0;
- DECLARE_RETURN(DWORD);
+ DWORD_PTR Result = 0;
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallNoParam\n");
UserEnterExclusive();
switch(Routine)
{
case NOPARAM_ROUTINE_CREATEMENU:
- Result = (DWORD)UserCreateMenu(FALSE);
+ Result = (DWORD_PTR)UserCreateMenu(FALSE);
break;
case NOPARAM_ROUTINE_CREATEMENUPOPUP:
- Result = (DWORD)UserCreateMenu(TRUE);
+ Result = (DWORD_PTR)UserCreateMenu(TRUE);
break;
case NOPARAM_ROUTINE_DESTROY_CARET:
- Result = (DWORD)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
+ Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
break;
case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP:
- Result = (DWORD)IntInitMessagePumpHook();
+ Result = (DWORD_PTR)IntInitMessagePumpHook();
break;
case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP:
- Result = (DWORD)IntUninitMessagePumpHook();
+ Result = (DWORD_PTR)IntUninitMessagePumpHook();
break;
case NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO:
- Result = (DWORD)MsqGetMessageExtraInfo();
+ Result = (DWORD_PTR)MsqGetMessageExtraInfo();
break;
case NOPARAM_ROUTINE_ANYPOPUP:
- Result = (DWORD)IntAnyPopup();
+ Result = (DWORD_PTR)IntAnyPopup();
break;
case NOPARAM_ROUTINE_CSRSS_INITIALIZED:
- Result = (DWORD)CsrInit();
+ Result = (DWORD_PTR)CsrInit();
break;
case NOPARAM_ROUTINE_MSQCLEARWAKEMASK:
- RETURN( (DWORD)IntMsqClearWakeMask());
+ RETURN( (DWORD_PTR)IntMsqClearWakeMask());
default:
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
/*
* @implemented
*/
-DWORD
+DWORD_PTR
STDCALL
NtUserCallOneParam(
DWORD Param,
DWORD Routine)
{
- DECLARE_RETURN(DWORD);
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallOneParam\n");
switch(Routine)
{
case ONEPARAM_ROUTINE_SHOWCURSOR:
- RETURN( (DWORD)UserShowCursor((BOOL)Param) );
+ RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) );
case ONEPARAM_ROUTINE_GETDESKTOPMAPPING:
{
{
/* Try convert the pointer to a user mode pointer if the desktop is
mapped into the process */
- RETURN((DWORD)DesktopHeapAddressToUser((PVOID)Param));
+ RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param));
}
else
{
case ONEPARAM_ROUTINE_GETMENU:
{
PWINDOW_OBJECT Window;
- DWORD Result;
+ DWORD DWORD_PTR;
if(!(Window = UserGetWindowObject((HWND)Param)))
{
RETURN( FALSE);
}
- Result = (DWORD)Window->Wnd->IDMenu;
+ Result = (DWORD_PTR)Window->Wnd->IDMenu;
RETURN( Result);
}
case ONEPARAM_ROUTINE_ISWINDOWUNICODE:
{
PWINDOW_OBJECT Window;
- DWORD Result;
+ DWORD_PTR Result;
Window = UserGetWindowObject((HWND)Param);
if(!Window)
}
case ONEPARAM_ROUTINE_WINDOWFROMDC:
- RETURN( (DWORD)IntWindowFromDC((HDC)Param));
+ RETURN( (DWORD_PTR)IntWindowFromDC((HDC)Param));
case ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID:
{
PWINDOW_OBJECT Window;
- DWORD Result;
+ DWORD_PTR Result;
Window = UserGetWindowObject((HWND)Param);
if(!Window)
{
PWINSTATION_OBJECT WinSta;
NTSTATUS Status;
- DWORD Result;
+ DWORD_PTR Result;
Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
KernelMode,
0,
&WinSta);
if (!NT_SUCCESS(Status))
- RETURN( (DWORD)FALSE);
+ RETURN( (DWORD_PTR)FALSE);
/* FIXME
- Result = (DWORD)IntSwapMouseButton(WinStaObject, (BOOL)Param); */
+ Result = (DWORD_PTR)IntSwapMouseButton(WinStaObject, (BOOL)Param); */
Result = 0;
ObDereferenceObject(WinSta);
}
case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
- RETURN( (DWORD)IntSwitchCaretShowing((PVOID)Param));
+ RETURN( (DWORD_PTR)IntSwitchCaretShowing((PVOID)Param));
case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
- RETURN( (DWORD)IntSetCaretBlinkTime((UINT)Param));
+ RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param));
case ONEPARAM_ROUTINE_GETWINDOWINSTANCE:
{
RETURN( FALSE);
}
- Result = (DWORD)Window->Wnd->Instance;
+ Result = (DWORD_PTR)Window->Wnd->Instance;
RETURN( Result);
}
case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
- RETURN( (DWORD)MsqSetMessageExtraInfo((LPARAM)Param));
+ RETURN( (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param));
case ONEPARAM_ROUTINE_CREATECURICONHANDLE:
{
}
ObDereferenceObject(WinSta);
- RETURN((DWORD)CurIcon->Self);
+ RETURN((DWORD_PTR)CurIcon->Self);
}
case ONEPARAM_ROUTINE_GETCURSORPOSITION:
POINT Pos;
if(!Param)
- RETURN( (DWORD)FALSE);
+ RETURN( (DWORD_PTR)FALSE);
Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
KernelMode,
0,
&WinSta);
if (!NT_SUCCESS(Status))
- RETURN( (DWORD)FALSE);
+ RETURN( (DWORD_PTR)FALSE);
/* FIXME - check if process has WINSTA_READATTRIBUTES */
IntGetCursorLocation(WinSta, &Pos);
ObDereferenceObject(WinSta);
- RETURN( (DWORD)TRUE);
+ RETURN( (DWORD_PTR)TRUE);
}
case ONEPARAM_ROUTINE_ISWINDOWINDESTROY:
{
PWINDOW_OBJECT Window;
- DWORD Result;
+ DWORD_PTR Result;
if(!(Window = UserGetWindowObject((HWND)Param)))
{
RETURN( FALSE);
}
- Result = (DWORD)IntIsWindowInDestroy(Window);
+ Result = (DWORD_PTR)IntIsWindowInDestroy(Window);
RETURN( Result);
}
}
case ONEPARAM_ROUTINE_MSQSETWAKEMASK:
- RETURN( (DWORD)IntMsqSetWakeMask(Param));
+ RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param));
case ONEPARAM_ROUTINE_GETKEYBOARDTYPE:
RETURN( UserGetKeyboardType(Param));
case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT:
- RETURN( (DWORD)UserGetKeyboardLayout(Param));
+ RETURN( (DWORD_PTR)UserGetKeyboardLayout(Param));
case ONEPARAM_ROUTINE_REGISTERUSERMODULE:
{
/*
* @implemented
*/
-DWORD
+DWORD_PTR
STDCALL
NtUserCallTwoParam(
DWORD Param1,
{
NTSTATUS Status;
PWINDOW_OBJECT Window;
- DECLARE_RETURN(DWORD);
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallTwoParam\n");
UserEnterExclusive();
{
case TWOPARAM_ROUTINE_GETWINDOWRGNBOX:
{
- DWORD Ret;
+ DWORD_PTR Ret;
RECT rcRect;
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(ERROR);
- Ret = (DWORD)IntGetWindowRgnBox(Window, &rcRect);
+ Ret = (DWORD_PTR)IntGetWindowRgnBox(Window, &rcRect);
Status = MmCopyToCaller((PVOID)Param2, &rcRect, sizeof(RECT));
if(!NT_SUCCESS(Status))
{
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(ERROR);
- RETURN( (DWORD)IntGetWindowRgn(Window, (HRGN)Param2));
+ RETURN( (DWORD_PTR)IntGetWindowRgn(Window, (HRGN)Param2));
}
case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
{
- DWORD Ret;
+ DWORD_PTR Ret;
PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1);
if(!MenuObject)
RETURN( 0);
MenuObject->MenuInfo.Height = (int)Param2;
}
else
- Ret = (DWORD)MenuObject->MenuInfo.Height;
+ Ret = (DWORD_PTR)MenuObject->MenuInfo.Height;
IntReleaseMenuObject(MenuObject);
RETURN( Ret);
}
Ret = IntSetMenuItemRect(MenuObject, smir.uItem, smir.fByPosition, &smir.rcRect);
IntReleaseMenuObject(MenuObject);
- RETURN( (DWORD)Ret);
+ RETURN( (DWORD_PTR)Ret);
}
case TWOPARAM_ROUTINE_SETGUITHRDHANDLE:
PUSER_MESSAGE_QUEUE MsgQueue = ((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessageQueue;
ASSERT(MsgQueue);
- RETURN( (DWORD)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
+ RETURN( (DWORD_PTR)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
}
case TWOPARAM_ROUTINE_ENABLEWINDOW:
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(0);
- RETURN( (DWORD)IntShowOwnedPopups(Window, (BOOL) Param2));
+ RETURN( (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL) Param2));
}
case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE:
if(!(Window = UserGetWindowObject((HWND)Param1)))
{
- RETURN( (DWORD)FALSE);
+ RETURN( (DWORD_PTR)FALSE);
}
Window->Wnd->ContextHelpId = Param2;
- RETURN( (DWORD)TRUE);
+ RETURN( (DWORD_PTR)TRUE);
case TWOPARAM_ROUTINE_SETCARETPOS:
- RETURN( (DWORD)co_IntSetCaretPos((int)Param1, (int)Param2));
+ RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2));
case TWOPARAM_ROUTINE_GETWINDOWINFO:
{
WINDOWINFO wi;
- DWORD Ret;
+ DWORD_PTR Ret;
if(!(Window = UserGetWindowObject((HWND)Param1)))
{
}
#endif
- if((Ret = (DWORD)IntGetWindowInfo(Window, &wi)))
+ if((Ret = (DWORD_PTR)IntGetWindowInfo(Window, &wi)))
{
Status = MmCopyToCaller((PVOID)Param2, &wi, sizeof(WINDOWINFO));
if(!NT_SUCCESS(Status))
}
case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
- RETURN( (DWORD)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
+ RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
case TWOPARAM_ROUTINE_GETSYSCOLORS:
{
- DWORD Ret = 0;
+ DWORD_PTR Ret = 0;
union
{
PVOID Pointer;
switch(Routine)
{
case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
- Ret = (DWORD)IntGetSysColorBrushes(Buffer.Brushes, (UINT)Param2);
+ Ret = (DWORD_PTR)IntGetSysColorBrushes(Buffer.Brushes, (UINT)Param2);
break;
case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
- Ret = (DWORD)IntGetSysColorPens(Buffer.Pens, (UINT)Param2);
+ Ret = (DWORD_PTR)IntGetSysColorPens(Buffer.Pens, (UINT)Param2);
break;
case TWOPARAM_ROUTINE_GETSYSCOLORS:
- Ret = (DWORD)IntGetSysColors(Buffer.Colors, (UINT)Param2);
+ Ret = (DWORD_PTR)IntGetSysColors(Buffer.Colors, (UINT)Param2);
break;
default:
Ret = 0;
case TWOPARAM_ROUTINE_ROS_REGSYSCLASSES:
{
- DWORD Ret = 0;
+ DWORD_PTR Ret = 0;
DWORD Count = Param1;
PREGISTER_SYSCLASS RegSysClassArray = (PREGISTER_SYSCLASS)Param2;
Count,
2);
- Ret = (DWORD)UserRegisterSystemClasses(Count,
+ Ret = (DWORD_PTR)UserRegisterSystemClasses(Count,
RegSysClassArray);
}
_SEH_HANDLE
* PROJECT: Native Call Interface Support Tool
* PURPOSE: Generates NCI Tables and Stubs.
* PROGRAMMER; Alex Ionescu (alex@relsoft.net)
- * CHANGE HISTORY: 14/01/05 - Created. Based on original code by
+ * CHANGE HISTORY: 14/01/05 - Created. Based on original code by
* KJK::Hyperion and Emanuelle Aliberti.
*
*/
/********** Stub Code ************/
/*
- * This stubs calls into KUSER_SHARED_DATA where either a
+ * This stubs calls into KUSER_SHARED_DATA where either a
* sysenter or interrupt is performed, depending on CPU support.
- */
+ */
#if defined(__GNUC__)
#define UserModeStub_x86 " movl $0x%x, %%eax\n" \
" movl $KUSER_SHARED_SYSCALL, %%ecx\n" \
" call *(%%ecx)\n" \
" ret $0x%x\n\n"
+#define UserModeStub_amd64 " movq $0x%x, %%rax\n" \
+ " movq $KUSER_SHARED_SYSCALL, %%rcx\n" \
+ " call *(%%rcx)\n" \
+ " ret $0x%x\n\n"
+
#define UserModeStub_ppc " stwu 1,-16(1)\n" \
" mflr 0\n\t" \
" stw 0,0(1)\n" \
/*
* This stub calls KiSystemService directly with a fake INT2E stack.
- * Because EIP is pushed during the call, the handler will return here.
+ * Because EIP is pushed during the call, the handler will return here.
*/
#if defined(__GNUC__)
#define KernelModeStub_x86 " movl $0x%x, %%eax\n" \
" call _KiSystemService\n" \
" ret $0x%x\n\n"
+#define KernelModeStub_amd64 " movq $0x%x, %%rax\n" \
+ " leaq 4(%%rsp), %%rdx\n" \
+ " pushfq\n" \
+ " pushq $KGDT_R0_CODE\n" \
+ " call _KiSystemService\n" \
+ " ret $0x%x\n\n"
+
/* For now, use the usermode stub. We'll optimize later */
#define KernelModeStub_ppc UserModeStub_ppc
struct ncitool_data_t ncitool_data[] = {
{ "i386", 4, KernelModeStub_x86, UserModeStub_x86,
".global _%s@%d\n", "_%s@%d:\n" },
+ { "amd64", 4, KernelModeStub_amd64, UserModeStub_amd64,
+ ".global _%s@%d\n", "_%s@%d:\n" },
{ "powerpc", 4, KernelModeStub_ppc, UserModeStub_ppc,
"\t.globl %s\n", "%s:\n" },
{ "mips", 4, KernelModeStub_mips, UserModeStub_mips,
/* FUNCTIONS ****************************************************************/
/*++
- * WriteFileHeader
+ * WriteFileHeader
*
* Prints out the File Header for a Stub File.
*
* FileLocation is only used for printing the header.
*
*--*/
-void
+void
WriteFileHeader(FILE * StubFile,
char* FileDescription,
char* FileLocation)
}
/*++
- * WriteFileHeader
+ * WriteFileHeader
*
* Prints out the File Header for a Stub File.
*
* FileLocation is only used for printing the header.
*
*--*/
-void
-WriteStubHeader(FILE* StubFile,
- char* SyscallName,
+void
+WriteStubHeader(FILE* StubFile,
+ char* SyscallName,
unsigned StackBytes)
{
/* Export the function */
fprintf(StubFile, GlobalHeader, SyscallName, StackBytes);
-
+
/* Define it */
fprintf(StubFile, Declaration, SyscallName, StackBytes);
}
-
+
/*++
- * WriteKernelModeStub
+ * WriteKernelModeStub
*
* Prints out the Kernel Mode Stub for a System Call.
*
* On i386, StackBytes is the number of arguments x 4.
*
*--*/
-void
-WriteKernelModeStub(FILE* StubFile,
- char* SyscallName,
+void
+WriteKernelModeStub(FILE* StubFile,
+ char* SyscallName,
unsigned StackBytes,
unsigned int SyscallId)
-{
+{
/* Write the Stub Header and export the Function */
WriteStubHeader(StubFile, SyscallName, StackBytes);
}
/*++
- * WriteUserModeStub
+ * WriteUserModeStub
*
* Prints out the User Mode Stub for a System Call.
*
* On i386, StackBytes is the number of arguments x 4.
*
*--*/
-void
-WriteUserModeStub(FILE* StubFile,
- char* SyscallName,
+void
+WriteUserModeStub(FILE* StubFile,
+ char* SyscallName,
unsigned StackBytes,
unsigned int SyscallId)
-{
+{
/* Write the Stub Header and export the Function */
WriteStubHeader(StubFile, SyscallName, StackBytes);
}
/*++
- * GetNameAndArgumentsFromDb
+ * GetNameAndArgumentsFromDb
*
* Parses an entry from a System Call Database, extracting
* the function's name and arguments that it takes.
* On i386, StackBytes is the number of arguments x 4.
*
*--*/
-void
+void
GetNameAndArgumentsFromDb(char Line[],
char ** NtSyscallName,
char ** SyscallArguments)
{
char *s;
char *stmp;
-
+
/* Remove new line */
if ((s = (char *) strchr(Line,'\r')) != NULL) {
*s = '\0';
}
-
+
/* Skip comments (#) and empty lines */
s = &Line[0];
if ((*s) != '#' && (*s) != '\0') {
-
+
/* Extract the NtXXX name */
*NtSyscallName = (char *)strtok(s," \t");
if ((stmp = strchr(*SyscallArguments, '\n')) != NULL) {
*stmp = '\0';
}
-
+
} else {
-
+
/* Skip this entry */
*NtSyscallName = NULL;
*SyscallArguments = NULL;
}
/*++
- * CreateStubs
+ * CreateStubs
*
* Parses a System Call Database and creates stubs for all the entries.
*
char *SyscallArguments;
int SyscallId;
unsigned StackBytes;
-
+
/* We loop, incrementing the System Call Index, until the end of the file */
for (SyscallId = 0; ((!feof(SyscallDb)) && (fgets(Line, sizeof(Line), SyscallDb) != NULL));) {
-
+
/* Extract the Name and Arguments */
- GetNameAndArgumentsFromDb(Line, &NtSyscallName, &SyscallArguments);
+ GetNameAndArgumentsFromDb(Line, &NtSyscallName, &SyscallArguments);
if (SyscallArguments != NULL)
StackBytes = ARGS_TO_BYTES(strtoul(SyscallArguments, NULL, 0));
else
StackBytes = 0;
-
+
/* Make sure we really extracted something */
if (NtSyscallName) {
-
+
/* Create Usermode Stubs for Nt/Zw syscalls in each Usermode file */
int i;
for (i= 0; i < UserFiles; i++) {
-
+
/* Write the Nt Version */
- WriteUserModeStub(UserModeFiles[i],
- NtSyscallName,
- StackBytes,
+ WriteUserModeStub(UserModeFiles[i],
+ NtSyscallName,
+ StackBytes,
SyscallId | Index);
/* If a Zw Version is needed (was specified), write it too */
StackBytes,
SyscallId | Index);
}
-
+
/* Only increase if we actually added something */
SyscallId++;
}
}
/*++
- * CreateSystemServiceTable
+ * CreateSystemServiceTable
*
* Parses a System Call Database and creates a System Call Service Table for it.
*
*
*--*/
void
-CreateSystemServiceTable(FILE *SyscallDb,
+CreateSystemServiceTable(FILE *SyscallDb,
FILE *SyscallTable,
char * Name,
char * FileLocation)
/* Extract the Name and Arguments */
GetNameAndArgumentsFromDb(Line, &NtSyscallName, &SyscallArguments);
-
+
/* Make sure we really extracted something */
if (NtSyscallName) {
-
+
/* Add a new line */
if (SyscallId > 0) fprintf(SyscallTable,",\n");
-
+
/* Write the syscall name in the service table. */
fprintf(SyscallTable,"\t\t(ULONG_PTR)%s", NtSyscallName);
-
+
/* Only increase if we actually added something */
SyscallId++;
}
}
-
+
/* Close the service table (C syntax) */
fprintf(SyscallTable,"\n};\n");
/* Extract the Name and Arguments */
GetNameAndArgumentsFromDb(Line, &NtSyscallName, &SyscallArguments);
-
+
/* Make sure we really extracted something */
if (NtSyscallName) {
-
+
/* Add a new line */
if (SyscallId > 0) fprintf(SyscallTable,",\n");
-
+
/* Write the syscall arguments in the argument table. */
if (SyscallArguments != NULL)
fprintf(SyscallTable,"\t\t%lu * sizeof(void *)",strtoul(SyscallArguments, NULL, 0));
else
fprintf(SyscallTable,"\t\t0");
-
+
/* Only increase if we actually added something */
SyscallId++;
}
}
-
+
/* Close the service table (C syntax) */
fprintf(SyscallTable,"\n};\n");
usage(argv[0]);
return(1);
}
-
+
/* Open all Output and bail out if any fail */
for (FileNumber = 0; FileNumber < Arguments; FileNumber++) {
-
+
/* Open the File */
if (FileNumber == 2) OpenType = "wb";
Files[FileNumber] = fopen(argv[FileNumber + ArgOffset], OpenType);
-
+
/* Check for failure and error out if so */
if (!Files[FileNumber]) {
perror(argv[FileNumber + ArgOffset]);
}
/* Write the File Headers */
- WriteFileHeader(Files[NtosUserStubs],
- "System Call Stubs for Native API",
+ WriteFileHeader(Files[NtosUserStubs],
+ "System Call Stubs for Native API",
argv[NtosUserStubs + ArgOffset]);
-
- WriteFileHeader(Files[NtosKernelStubs],
- "System Call Stubs for Native API",
+
+ WriteFileHeader(Files[NtosKernelStubs],
+ "System Call Stubs for Native API",
argv[NtosKernelStubs + ArgOffset]);
fputs("#include <ndk/asm.h>\n\n", Files[NtosKernelStubs]);
- WriteFileHeader(Files[Win32kStubs],
- "System Call Stubs for Native API",
+ WriteFileHeader(Files[Win32kStubs],
+ "System Call Stubs for Native API",
argv[Win32kStubs + ArgOffset]);
/* Create the System Stubs */
CreateStubs(Files[NativeSystemDb],
- &Files[NtosUserStubs],
- Files[NtosKernelStubs],
- MAIN_INDEX,
+ &Files[NtosUserStubs],
+ Files[NtosKernelStubs],
+ MAIN_INDEX,
1,
1);
/* Create the Graphics Stubs */
- CreateStubs(Files[NativeGuiDb],
- &Files[Win32kStubs],
- NULL,
- WIN32K_INDEX,
+ CreateStubs(Files[NativeGuiDb],
+ &Files[Win32kStubs],
+ NULL,
+ WIN32K_INDEX,
1,
0);
rewind(Files[NativeGuiDb]);
/* Create the Service Tables */
- CreateSystemServiceTable(Files[NativeSystemDb],
+ CreateSystemServiceTable(Files[NativeSystemDb],
Files[NtosServiceTable],
"Main",
argv[NtosServiceTable + ArgOffset]);
-
- CreateSystemServiceTable(Files[NativeGuiDb],
+
+ CreateSystemServiceTable(Files[NativeGuiDb],
Files[Win32kServiceTable],
"Win32k",
argv[Win32kServiceTable + ArgOffset]);
/* Close all files */
for (FileNumber = 0; FileNumber < Arguments-ArgOffset; FileNumber++) {
-
+
/* Close the File */
fclose(Files[FileNumber]);
-
+
}
return(0);
result = "_";
result += entrypoint;
+
+ if (Environment::GetArch() == "amd64")
+ {
+ size_t at_index = result.find_last_of( '@' );
+ if ( at_index != result.npos )
+ return result.substr (0, at_index );
+ }
+
return result;
}
write_function_stubs(iface->iface, &proc_offset);
print_client("#if !defined(__RPC_WIN32__)\n");
- print_client("#error Invalid build platform for this stub.\n");
+ print_client("//#error Invalid build platform for this stub.\n");
print_client("#endif\n");
fprintf(client, "\n");
}
if (phase == PHASE_MARSHAL)
- print_file(file, indent, "MIDL_memset(_StubMsg.Buffer, 0, (0x%x - (long)_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
- print_file(file, indent, "_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + %u) & ~0x%x);\n",
+ print_file(file, indent, "MIDL_memset(_StubMsg.Buffer, 0, (0x%x - (size_t)_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
+ print_file(file, indent, "_StubMsg.Buffer = (unsigned char *)(((size_t)_StubMsg.Buffer + %u) & ~0x%x);\n",
alignment - 1, alignment - 1);
if (phase == PHASE_MARSHAL)
return;
}
- output( "#include <stdarg.h>\n");
- output( "#include \"windef.h\"\n");
- output( "#include \"winbase.h\"\n");
- output( "#include \"wine/config.h\"\n");
- output( "#include \"wine/exception.h\"\n\n");
+ output( "#include <windows.h>\n");
+ output( "#include <reactos/debug.h>\n");
- output( "void __wine_spec_unimplemented_stub( const char *module, const char *function )\n");
+ output( "DWORD __wine_spec_unimplemented_stub( const char *module, const char *function )\n");
output( "{\n");
- output( " ULONG_PTR args[2];\n");
+ output( " DPRINT1(\"%%s hit stub for %%s\\n\",module,function);");
output( "\n");
- output( " args[0] = (ULONG_PTR)module;\n");
- output( " args[1] = (ULONG_PTR)function;\n");
- output( " RaiseException( EXCEPTION_WINE_STUB, EH_NONCONTINUABLE, 2, args );\n");
- output( "}\n\n");
+ output( " SetLastError(ERROR_CALL_NOT_IMPLEMENTED);\n");
+ output( " return -1;\n");
+ output( "}\n");
output( "static const char __wine_spec_file_name[] = \"%s\";\n\n", spec->file_name );
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-
+#include <string.h>
#include "utils.h"
#include "wmc.h"
#include "lang.h"
+++ /dev/null
-/*
- *
- * PROJECT: Add or Remove Programs (Console Version)
- * FILE: rosapps/applications/cmdutils/appwiz/appwiz.c
- * PURPOSE: ReactOS Software Control Panel
- * PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
- * UPDATE HISTORY:
- * 07-28-2008 Created
- */
-
-#define SHOW_ALL 1
-#define APP_ONLY 2
-#define UPD_ONLY 3
-
-#include <windows.h>
-#include <stdio.h>
-#include <conio.h>
-#include <tchar.h>
-
-
-void PrintHelp()
-{
- printf(_T("Add or Remove Programs\n\
-APPWIZ [/? /l] [/all /app /upd]\n\
- /?\t Help\n\
- /l\t Show list\n\
- /all\t Show programs and updates\n\
- /app\t Show programs only\n\
- /upd\t Show updates only\n"));
- _getch();
-}
-
-
-void RunGUIAppWiz()
-{
- SHELLEXECUTEINFO shInputDll;
-
- memset(&shInputDll, 0x0, sizeof(SHELLEXECUTEINFO));
- shInputDll.cbSize = sizeof(shInputDll);
- shInputDll.hwnd = NULL;
- shInputDll.lpVerb = _T("open");
- shInputDll.lpFile = _T("RunDll32.exe");
- shInputDll.lpParameters = _T("shell32.dll,Control_RunDLL appwiz.cpl");
-
- if (ShellExecuteEx(&shInputDll) == 0)
- {
- MessageBox(NULL, _T("Can not start appwiz.cpl"), NULL, MB_OK | MB_ICONERROR);
- }
-}
-
-void CallUninstall(LPTSTR szUninstallString)
-{
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- DWORD dwRet;
- MSG msg;
-
- ZeroMemory(&si, sizeof(si));
- si.cb = sizeof(si);
- si.wShowWindow = SW_SHOW;
-
- if (CreateProcess(NULL, szUninstallString, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
- {
- CloseHandle(pi.hThread);
-
- for (;;)
- {
- dwRet = MsgWaitForMultipleObjects(1, &pi.hProcess, FALSE, INFINITE, QS_ALLEVENTS);
- if (dwRet == WAIT_OBJECT_0 + 1)
- {
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- else if (dwRet == WAIT_OBJECT_0 || dwRet == WAIT_FAILED)
- break;
- }
- CloseHandle(pi.hProcess);
- }
-}
-
-
-/*
- dwMode:
- SHOW_ALL - Applications & Updates
- APP_ONLY - Applications only
- UPD_ONLY - Updates only
-*/
-int ShowAppList(DWORD dwMode, INT iItem)
-{
- HKEY hKey, hSubKey;
- DWORD dwSize, dwType, dwValue;
- TCHAR szName[MAX_PATH];
- TCHAR szParentKeyName[MAX_PATH];
- TCHAR szDisplayName[MAX_PATH];
- TCHAR szOutBuf[MAX_PATH];
- FILETIME FileTime;
- BOOL bIsUpdate = FALSE;
- BOOL bIsSystemComponent = FALSE;
- INT iIndex = 0, iColor = 0, iCount = 1;
- HANDLE hOutput;
-
- if (RegOpenKey(HKEY_LOCAL_MACHINE,
- _T("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"),
- &hKey) != ERROR_SUCCESS)
- {
- printf(_T("ERROR: Can not open Uninstall key. Press any key for continue...\n"));
- _getch();
- return 0;
- }
-
- hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- SetConsoleTextAttribute(hOutput, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
-
- dwSize = MAX_PATH;
- while (RegEnumKeyEx(hKey, iIndex, szName, &dwSize, NULL, NULL, NULL, &FileTime) == ERROR_SUCCESS)
- {
- if (RegOpenKey(hKey, szName, &hSubKey) == ERROR_SUCCESS)
- {
- dwType = REG_DWORD;
- dwSize = sizeof(DWORD);
-
- if (RegQueryValueEx(hSubKey, _T("SystemComponent"),
- NULL, &dwType,
- (LPBYTE)&dwValue, &dwSize) == ERROR_SUCCESS)
- {
- bIsSystemComponent = (dwValue == 0x1);
- }
- else
- {
- bIsSystemComponent = FALSE;
- }
-
- dwType = REG_SZ;
- dwSize = MAX_PATH;
-
- bIsUpdate = (RegQueryValueEx(hSubKey, _T("ParentKeyName"),
- NULL, &dwType,
- (LPBYTE) szParentKeyName,
- &dwSize) == ERROR_SUCCESS);
- dwSize = MAX_PATH;
- if (RegQueryValueEx(hSubKey, _T("DisplayName"),
- NULL, &dwType,
- (LPBYTE) szDisplayName,
- &dwSize) == ERROR_SUCCESS)
- {
- if (!bIsSystemComponent)
- {
- if ((dwMode == SHOW_ALL) || ((dwMode == APP_ONLY) && (!bIsUpdate)) || ((dwMode == UPD_ONLY) && (bIsUpdate)))
- {
- if (iItem == -1)
- {
- wsprintf(szOutBuf, _T(" %d \t %s\n"), iCount, szDisplayName);
- CharToOem(szOutBuf, szOutBuf);
- printf("%s", szOutBuf);
- }
- else
- {
- dwType = REG_SZ;
- dwSize = MAX_PATH;
-
- if ((RegQueryValueEx(hSubKey, _T("UninstallString"), NULL, &dwType,
- (LPBYTE) szOutBuf, &dwSize) == ERROR_SUCCESS) && (iItem == iCount))
- {
- CallUninstall(szOutBuf);
- }
- }
- iCount++;
- iColor++;
- }
- }
- }
- }
-
- if (iColor <= 5)
- {
- SetConsoleTextAttribute(hOutput, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
- }
- else
- {
- SetConsoleTextAttribute(hOutput, FOREGROUND_GREEN | FOREGROUND_INTENSITY | FOREGROUND_RED);
- if (iColor >= 10) iColor = 0;
- }
-
- dwSize = MAX_PATH;
- iIndex++;
- }
-
- RegCloseKey(hSubKey);
- RegCloseKey(hKey);
-
- SetConsoleTextAttribute(hOutput, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
- printf("\n\nPlease enter application/update number and press ENTER for uninstall\nor press any key for Exit...\n");
-
- return 1;
-}
-
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- INT iNumber;
- TCHAR Char[4 + 1];
-
- SetConsoleTitle(_T("Application Wizard"));
-
- if (argc < 2)
- {
- RunGUIAppWiz();
- return 0;
- }
-
- if (_tcsncmp(argv[1], _T("/?"), 2) == 0)
- {
- PrintHelp();
- return 0;
- }
-
- if (_tcsncmp(argv[1], _T("/l"), 2) == 0)
- {
- if (argc < 3) goto ShowAll;
- if (_tcsncmp(argv[2], _T("/all"), 4) == 0)
- {
-ShowAll:
- if (ShowAppList(SHOW_ALL, -1) == 0) return 0;
- scanf(_T("%s"), Char);
-
- iNumber = atoi(Char);
-
- if (iNumber == 0) return 0;
- ShowAppList(SHOW_ALL, iNumber);
- }
- else if (_tcsncmp(argv[2], _T("/app"), 4) == 0)
- {
- if (ShowAppList(APP_ONLY, -1) == 0) return 0;
-
- scanf(_T("%s"), Char);
-
- iNumber = atoi(Char);
-
- if (iNumber == 0) return 0;
- ShowAppList(APP_ONLY, iNumber);
- }
- else if (_tcsncmp(argv[2], _T("/upd"), 4) == 0)
- {
- if (ShowAppList(UPD_ONLY, -1) == 0) return 0;
-
- scanf(_T("%s"), Char);
-
- iNumber = atoi(Char);
-
- if (iNumber == 0) return 0;
- ShowAppList(UPD_ONLY, iNumber);
- }
-
- return 0;
- }
-
- return 0;
-}
+++ /dev/null
-<module name="appwiz.exe" type="win32cui" installbase="system32" installname="appwiz.exe">
- <define name="_WIN32_IE">0x0501</define>
- <define name="_WIN32_WINNT">0x0501</define>
- <library>kernel32</library>
- <library>advapi32</library>
- <library>user32</library>
- <library>shell32</library>
- <file>appwiz.c</file>
- <file>appwiz.rc</file>
-</module>
+++ /dev/null
-#define REACTOS_STR_FILE_DESCRIPTION "Add or Remove Programs (Console Version)\0"
-#define REACTOS_STR_INTERNAL_NAME "appwiz\0"
-#define REACTOS_STR_ORIGINAL_FILENAME "appwiz.exe\0"
-#include <reactos/version.rc>
<?xml version="1.0"?>
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <directory name="appwiz">
- <xi:include href="appwiz/appwiz.rbuild" />
- </directory>
<directory name="comp">
<xi:include href="comp/comp.rbuild" />
</directory>