ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

winldr.h
Go to the documentation of this file.
00001 /*
00002  *  FreeLoader
00003  *  Copyright (C) 1998-2003  Brian Palmer    <brianp@sginet.com>
00004  *  Copyright (C) 2006       Aleksey Bragin  <aleksey@reactos.org>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00019  */
00020 
00021 #pragma once
00022 
00023 #include <arc/setupblk.h>
00024 
00025 /* Entry-point to kernel */
00026 typedef VOID (NTAPI *KERNEL_ENTRY_POINT) (PLOADER_PARAMETER_BLOCK LoaderBlock);
00027 
00028 
00029 // Some definitions
00030 #define SECTOR_SIZE 512
00031 
00032 // Descriptors
00033 #define NUM_GDT 128 // Must be 128
00034 #define NUM_IDT 0x100 // only 16 are used though. Must be 0x100
00035 
00036 #include <pshpack1.h>
00037 typedef struct  /* Root System Descriptor Pointer */
00038 {
00039     CHAR             signature [8];          /* contains "RSD PTR " */
00040     UCHAR            checksum;               /* to make sum of struct == 0 */
00041     CHAR             oem_id [6];             /* OEM identification */
00042     UCHAR            revision;               /* Must be 0 for 1.0, 2 for 2.0 */
00043     ULONG            rsdt_physical_address;  /* 32-bit physical address of RSDT */
00044     ULONG            length;                 /* XSDT Length in bytes including hdr */
00045     ULONGLONG        xsdt_physical_address;  /* 64-bit physical address of XSDT */
00046     UCHAR            extended_checksum;      /* Checksum of entire table */
00047     CHAR             reserved [3];           /* reserved field must be 0 */
00048 } RSDP_DESCRIPTOR, *PRSDP_DESCRIPTOR;
00049 #include <poppack.h>
00050 
00051 typedef struct _ARC_DISK_SIGNATURE_EX
00052 {
00053     ARC_DISK_SIGNATURE DiskSignature;
00054     CHAR ArcName[MAX_PATH];
00055 } ARC_DISK_SIGNATURE_EX, *PARC_DISK_SIGNATURE_EX;
00056 
00057 #define MAX_OPTIONS_LENGTH 255
00058 
00059 typedef struct _LOADER_SYSTEM_BLOCK
00060 {
00061     LOADER_PARAMETER_BLOCK LoaderBlock;
00062     LOADER_PARAMETER_EXTENSION Extension;
00063     SETUP_LOADER_BLOCK SetupBlock;
00064 #ifdef _M_IX86
00065     HEADLESS_LOADER_BLOCK HeadlessLoaderBlock;
00066 #endif
00067     NLS_DATA_BLOCK NlsDataBlock;
00068     CHAR LoadOptions[MAX_OPTIONS_LENGTH+1];
00069     CHAR ArcBootDeviceName[MAX_PATH+1];
00070     // CHAR ArcHalDeviceName[MAX_PATH];
00071     CHAR NtBootPathName[MAX_PATH+1];
00072     CHAR NtHalPathName[MAX_PATH+1];
00073     ARC_DISK_INFORMATION ArcDiskInformation;
00074     ARC_DISK_SIGNATURE_EX ArcDiskSignature[];
00075 } LOADER_SYSTEM_BLOCK, *PLOADER_SYSTEM_BLOCK;
00076 
00077 extern PLOADER_SYSTEM_BLOCK WinLdrSystemBlock;
00078 
00080 //
00081 // ReactOS Loading Functions
00082 //
00084 VOID LoadAndBootWindows(PCSTR OperatingSystemName,
00085                         PSTR SettingsValue,
00086                         USHORT OperatingSystemVersion);
00087 
00088 // conversion.c
00089 PVOID VaToPa(PVOID Va);
00090 PVOID PaToVa(PVOID Pa);
00091 VOID List_PaToVa(LIST_ENTRY *ListEntry);
00092 VOID ConvertConfigToVA(PCONFIGURATION_COMPONENT_DATA Start);
00093 
00094 // peloader.c
00095 BOOLEAN
00096 WinLdrLoadImage(IN PCHAR FileName,
00097                 TYPE_OF_MEMORY MemoryType,
00098                 OUT PVOID *ImageBasePA);
00099 
00100 
00101 BOOLEAN
00102 WinLdrAllocateDataTableEntry(IN OUT PLIST_ENTRY ModuleListHead,
00103                              IN PCCH BaseDllName,
00104                              IN PCCH FullDllName,
00105                              IN PVOID BasePA,
00106                              OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
00107 
00108 BOOLEAN
00109 WinLdrScanImportDescriptorTable(IN OUT PLIST_ENTRY ModuleListHead,
00110                                 IN PCCH DirectoryPath,
00111                                 IN PLDR_DATA_TABLE_ENTRY ScanDTE);
00112 
00113 // winldr.c
00114 PVOID WinLdrLoadModule(PCSTR ModuleName, ULONG *Size,
00115                        TYPE_OF_MEMORY MemoryType);
00116 
00117 // wlmemory.c
00118 BOOLEAN
00119 WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock);
00120 
00121 // wlregistry.c
00122 BOOLEAN WinLdrInitSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
00123                              IN LPCSTR DirectoryPath);
00124 
00125 BOOLEAN WinLdrScanSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
00126                              IN LPCSTR DirectoryPath);
00127 
00128 
00129 BOOLEAN
00130 WinLdrCheckForLoadedDll(IN OUT PLIST_ENTRY ModuleListHead,
00131                         IN PCH DllName,
00132                         OUT PLDR_DATA_TABLE_ENTRY *LoadedEntry);
00133 
00134 VOID
00135 WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
00136                        LPCSTR Options,
00137                        LPCSTR SystemPath,
00138                        LPCSTR BootPath,
00139                        USHORT VersionToBoot);
00140 BOOLEAN
00141 WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
00142                   IN LPCSTR DirectoryPath,
00143                   IN LPCSTR AnsiFileName,
00144                   IN LPCSTR OemFileName,
00145                   IN LPCSTR LanguageFileName);
00146 BOOLEAN
00147 WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead,
00148                       LPWSTR RegistryPath,
00149                       LPWSTR ImagePath,
00150                       LPWSTR ServiceName);
00151 
00152 VOID
00153 WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock);
00154 
00155 VOID
00156 WinLdrpDumpBootDriver(PLOADER_PARAMETER_BLOCK LoaderBlock);
00157 
00158 VOID
00159 WinLdrpDumpArcDisks(PLOADER_PARAMETER_BLOCK LoaderBlock);
00160 
00161 BOOLEAN
00162 MempAllocatePageTables();
00163 
00164 BOOLEAN
00165 MempSetupPaging(IN PFN_NUMBER StartPage,
00166                 IN PFN_NUMBER NumberOfPages,
00167                 IN BOOLEAN KernelMapping);
00168 
00169 VOID
00170 MempUnmapPage(PFN_NUMBER Page);
00171 
00172 VOID
00173 MempDump();
00174 
00175 VOID
00176 LoadAndBootWindowsCommon(
00177     USHORT OperatingSystemVersion,
00178     PLOADER_PARAMETER_BLOCK LoaderBlock,
00179     LPCSTR BootOptions,
00180     LPCSTR BootPath,
00181     BOOLEAN Setup);
00182 
00183 VOID LoadReactOSSetup(VOID);
00184 
00185 VOID
00186 WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock);
00187 
00188 VOID
00189 WinLdrSetProcessorContext(VOID);
00190 

Generated on Sat May 26 2012 04:18:01 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.