ReactOS 0.4.15-dev-7906-g1b85a5f
winldr.h
Go to the documentation of this file.
1/*
2 * PROJECT: FreeLoader
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Windows-compatible NT OS Loader.
5 * COPYRIGHT: Copyright 2006-2019 Aleksey Bragin <aleksey@reactos.org>
6 */
7
8#pragma once
9
10#include <arc/setupblk.h>
11
12/* Entry-point to kernel */
14
15/* Descriptors */
16#define NUM_GDT 128 // Must be 128
17#define NUM_IDT 0x100 // Only 16 are used though. Must be 0x100
18
19#if 0
20
21#include <pshpack1.h>
22typedef struct /* Root System Descriptor Pointer */
23{
24 CHAR signature [8]; /* contains "RSD PTR " */
25 UCHAR checksum; /* to make sum of struct == 0 */
26 CHAR oem_id [6]; /* OEM identification */
27 UCHAR revision; /* Must be 0 for 1.0, 2 for 2.0 */
28 ULONG rsdt_physical_address; /* 32-bit physical address of RSDT */
29 ULONG length; /* XSDT Length in bytes including hdr */
30 ULONGLONG xsdt_physical_address; /* 64-bit physical address of XSDT */
31 UCHAR extended_checksum; /* Checksum of entire table */
32 CHAR reserved [3]; /* reserved field must be 0 */
34#include <poppack.h>
35
36typedef struct _ARC_DISK_SIGNATURE_EX
37{
41
42#endif
43
44#define MAX_OPTIONS_LENGTH 255
45
47{
51#ifdef _M_IX86
52 HEADLESS_LOADER_BLOCK HeadlessLoaderBlock;
53#endif
57 // CHAR ArcHalDeviceName[MAX_PATH];
62
65
66
67// conversion.c
68#if 0
72#endif
74
75// winldr.c
76extern BOOLEAN SosEnabled;
77#ifdef _M_IX86
78extern BOOLEAN PaeModeOn;
79#endif
80
82VOID
84{
85#ifdef _M_ARM
86 /* Re-initialize the UI */
88#else
89 /* Reset the UI and switch to MiniTui */
93#endif
94 /* Disable the progress bar */
96}
97
98VOID
102
104 TYPE_OF_MEMORY MemoryType);
105
106// wlmemory.c
109
110// wlregistry.c
113 IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
116
119
123 _In_ PCSTR DirectoryPath,
124 _In_ PCUNICODE_STRING AnsiFileName,
125 _In_ PCUNICODE_STRING OemFileName,
126 _In_ PCUNICODE_STRING LangFileName, // CaseTable
127 _In_ PCUNICODE_STRING OemHalFileName);
128
131 _Inout_ PLIST_ENTRY DriverListHead,
132 _In_ BOOLEAN InsertAtHead,
133 _In_ PCWSTR DriverName,
134 _In_opt_ PCWSTR ImagePath,
135 _In_opt_ PCWSTR GroupName,
136 _In_ ULONG ErrorControl,
137 _In_ ULONG Tag);
138
139// winldr.c
140VOID
143 PCSTR SystemPath,
144 PCSTR BootPath,
145 USHORT VersionToBoot);
146
147VOID
149
150VOID
152
153VOID
155
158 IN USHORT OperatingSystemVersion,
159 IN PLOADER_PARAMETER_BLOCK LoaderBlock,
161 IN PCSTR BootPath);
162
163VOID
165
166VOID
168
169// arch/xxx/winldr.c
172 IN PFN_NUMBER NumberOfPages,
173 IN BOOLEAN KernelMapping);
174
175VOID
177
178VOID
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:834
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1280
VOID WinLdrSetProcessorContext(void)
Definition: winldr.c:349
@ BootOptions
Definition: bl.h:898
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:62
UIVTBL UiVtbl
Definition: ui.c:64
BOOLEAN UiInitialize(BOOLEAN ShowUi)
Definition: ui.c:92
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR SystemRoot[]
Definition: reg.c:38
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
Definition: fdi.c:353
static const WCHAR Description[]
Definition: oid.c:1266
#define MAX_PATH
Definition: compat.h:34
r reserved
Definition: btrfs.c:3006
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
VOID List_PaToVa(_In_ LIST_ENTRY *ListEntry)
struct _ARC_DISK_SIGNATURE_EX ARC_DISK_SIGNATURE_EX
struct RSDP_DESCRIPTOR * PRSDP_DESCRIPTOR
struct _ARC_DISK_SIGNATURE_EX * PARC_DISK_SIGNATURE_EX
PVOID VaToPa(PVOID Va)
Definition: conversion.h:15
PVOID PaToVa(PVOID Pa)
Definition: conversion.h:22
const UIVTBL MiniTuiVtbl
Definition: minitui.c:237
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define MAX_OPTIONS_LENGTH
Definition: winldr.h:44
struct _LOADER_SYSTEM_BLOCK LOADER_SYSTEM_BLOCK
VOID ConvertConfigToVA(PCONFIGURATION_COMPONENT_DATA Start)
Definition: conversion.c:51
BOOLEAN WinLdrLoadNLSData(_Inout_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ PCSTR DirectoryPath, _In_ PCUNICODE_STRING AnsiFileName, _In_ PCUNICODE_STRING OemFileName, _In_ PCUNICODE_STRING LangFileName, _In_ PCUNICODE_STRING OemHalFileName)
Definition: wlregistry.c:406
VOID(NTAPI * KERNEL_ENTRY_POINT)(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.h:13
BOOLEAN MempSetupPaging(IN PFN_NUMBER StartPage, IN PFN_NUMBER NumberOfPages, IN BOOLEAN KernelMapping)
Definition: winldr.c:171
VOID WinLdrpDumpArcDisks(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:1310
BOOLEAN WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: wlmemory.c:181
BOOLEAN WinLdrAddDriverToList(_Inout_ PLIST_ENTRY DriverListHead, _In_ BOOLEAN InsertAtHead, _In_ PCWSTR DriverName, _In_opt_ PCWSTR ImagePath, _In_opt_ PCWSTR GroupName, _In_ ULONG ErrorControl, _In_ ULONG Tag)
Inserts the specified driver entry into the driver list, or updates an existing entry with new ImageP...
Definition: wlregistry.c:645
FORCEINLINE VOID UiResetForSOS(VOID)
Definition: winldr.h:83
VOID MempUnmapPage(PFN_NUMBER Page)
Definition: winldr.c:205
VOID WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:1272
VOID WinLdrpDumpBootDriver(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:1291
VOID NtLdrOutputLoadMsg(_In_ PCSTR FileName, _In_opt_ PCSTR Description)
Definition: winldr.c:54
BOOLEAN WinLdrInitSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, IN PCSTR SystemRoot, IN BOOLEAN Setup)
Definition: wlregistry.c:125
ARC_STATUS LoadAndBootWindowsCommon(IN USHORT OperatingSystemVersion, IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PCSTR BootOptions, IN PCSTR BootPath)
Definition: winldr.c:1156
struct _LOADER_SYSTEM_BLOCK * PLOADER_SYSTEM_BLOCK
PVOID WinLdrLoadModule(PCSTR ModuleName, PULONG Size, TYPE_OF_MEMORY MemoryType)
Definition: winldr.c:428
VOID WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:380
VOID WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock, PCSTR Options, PCSTR SystemPath, PCSTR BootPath, USHORT VersionToBoot)
Definition: winldr.c:117
PCWSTR BootFileSystem
Definition: winldr.c:30
PLOADER_SYSTEM_BLOCK WinLdrSystemBlock
Definition: winldr.c:29
VOID MempDump(VOID)
Definition: winldr.c:430
BOOLEAN SosEnabled
Definition: winldr.c:33
BOOLEAN WinLdrScanSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, IN PCSTR SystemRoot)
Definition: wlregistry.c:231
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1306
unsigned short USHORT
Definition: pedump.c:61
ULONG ARC_STATUS
Definition: arc.h:4
enum _TYPE_OF_MEMORY TYPE_OF_MEMORY
ULONG PFN_NUMBER
Definition: ke.h:9
CHAR ArcName[MAX_PATH]
Definition: winldr.h:37
ARC_DISK_SIGNATURE DiskSignature
Definition: winldr.h:36
Definition: typedefs.h:120
CHAR NtHalPathName[MAX_PATH+1]
Definition: winldr.h:59
ARC_DISK_INFORMATION ArcDiskInformation
Definition: winldr.h:60
CHAR NtBootPathName[MAX_PATH+1]
Definition: winldr.h:58
NLS_DATA_BLOCK NlsDataBlock
Definition: winldr.h:54
LOADER_PARAMETER_EXTENSION Extension
Definition: winldr.h:49
CHAR ArcBootDeviceName[MAX_PATH+1]
Definition: winldr.h:56
LOADER_PARAMETER_BLOCK LoaderBlock
Definition: winldr.h:48
CHAR LoadOptions[MAX_OPTIONS_LENGTH+1]
Definition: winldr.h:55
SETUP_LOADER_BLOCK SetupBlock
Definition: winldr.h:50
BOOLEAN Show
Definition: ui.h:136
BOOLEAN(* Initialize)(VOID)
Definition: ui.h:250
VOID(* UnInitialize)(VOID)
Definition: ui.h:251
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define NTAPI
Definition: typedefs.h:36
const char * PCSTR
Definition: typedefs.h:52
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
@ Start
Definition: partlist.h:33
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define FORCEINLINE
Definition: wdftypes.h:67
int WINAPI StartPage(_In_ HDC)
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175