ReactOS 0.4.16-dev-306-g647d351
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];
63
66
67
68// conversion.c
69#if 0
73#endif
75
76// winldr.c
77extern BOOLEAN SosEnabled;
78#ifdef _M_IX86
79extern BOOLEAN PaeModeOn;
80#endif
81
83VOID
85{
86#ifdef _M_ARM
87 /* Re-initialize the UI */
89#else
90 /* Reset the UI and switch to MiniTui */
94#endif
95 /* Disable the progress bar */
97}
98
99VOID
103
105 TYPE_OF_MEMORY MemoryType);
106
107// wlmemory.c
110
111// wlregistry.c
114 IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
117
120
124 _In_ PCSTR DirectoryPath,
125 _In_ PCUNICODE_STRING AnsiFileName,
126 _In_ PCUNICODE_STRING OemFileName,
127 _In_ PCUNICODE_STRING LangFileName, // CaseTable
128 _In_ PCUNICODE_STRING OemHalFileName);
129
132 _Inout_ PLIST_ENTRY DriverListHead,
133 _In_ BOOLEAN InsertAtHead,
134 _In_ PCWSTR DriverName,
135 _In_opt_ PCWSTR ImagePath,
136 _In_opt_ PCWSTR GroupName,
137 _In_ ULONG ErrorControl,
138 _In_ ULONG Tag);
139
140// winldr.c
141VOID
144 PCSTR SystemPath,
145 PCSTR BootPath,
146 USHORT VersionToBoot);
147
148VOID
150
151VOID
153
154VOID
156
159 IN USHORT OperatingSystemVersion,
160 IN PLOADER_PARAMETER_BLOCK LoaderBlock,
162 IN PCSTR BootPath);
163
164VOID
166
167VOID
169 _In_ USHORT OperatingSystemVersion);
170
171// arch/xxx/winldr.c
174 IN PFN_NUMBER NumberOfPages,
175 IN BOOLEAN KernelMapping);
176
177VOID
179
180VOID
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
@ 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
return pTarget Start()
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: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#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
VOID WinLdrSetProcessorContext(_In_ USHORT OperatingSystemVersion)
Definition: winldr.c:342
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:1327
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:84
VOID MempUnmapPage(PFN_NUMBER Page)
Definition: winldr.c:205
VOID WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:1289
VOID WinLdrpDumpBootDriver(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:1308
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:1173
struct _LOADER_SYSTEM_BLOCK * PLOADER_SYSTEM_BLOCK
PVOID WinLdrLoadModule(PCSTR ModuleName, PULONG Size, TYPE_OF_MEMORY MemoryType)
Definition: winldr.c:441
VOID WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:374
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:424
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
LOADER_PERFORMANCE_DATA LoaderPerformanceData
Definition: winldr.h:61
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
_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