ReactOS  0.4.13-dev-247-g0f29b3f
winldr.h
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4  * Copyright (C) 2006 Aleksey Bragin <aleksey@reactos.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #pragma once
22 
23 #include <arc/setupblk.h>
24 
25 // See freeldr/ntldr/winldr.h
26 #define TAG_WLDR_DTE 'eDlW'
27 #define TAG_WLDR_BDE 'dBlW'
28 #define TAG_WLDR_NAME 'mNlW'
29 
30 
31 // Some definitions
32 
33 // FIXME: This one has nothing to do here!!
34 #define SECTOR_SIZE 512
35 
36 // Descriptors
37 #define NUM_GDT 128 // Must be 128
38 #define NUM_IDT 0x100 // Only 16 are used though. Must be 0x100
39 
40 #include <pshpack1.h>
41 typedef struct /* Root System Descriptor Pointer */
42 {
43  CHAR signature [8]; /* contains "RSD PTR " */
44  UCHAR checksum; /* to make sum of struct == 0 */
45  CHAR oem_id [6]; /* OEM identification */
46  UCHAR revision; /* Must be 0 for 1.0, 2 for 2.0 */
47  ULONG rsdt_physical_address; /* 32-bit physical address of RSDT */
48  ULONG length; /* XSDT Length in bytes including hdr */
49  ULONGLONG xsdt_physical_address; /* 64-bit physical address of XSDT */
50  UCHAR extended_checksum; /* Checksum of entire table */
51  CHAR reserved [3]; /* reserved field must be 0 */
53 #include <poppack.h>
54 
55 typedef struct _ARC_DISK_SIGNATURE_EX
56 {
60 
62 //
63 // ReactOS Loading Functions
64 //
68 
69 VOID
70 LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
72 
73 
74 // conversion.c and conversion.h
75 PVOID VaToPa(PVOID Va);
76 PVOID PaToVa(PVOID Pa);
77 VOID List_PaToVa(_In_ LIST_ENTRY *ListEntry);
78 
79 
80 // peloader.c
81 BOOLEAN
83  TYPE_OF_MEMORY MemoryType,
84  OUT PVOID *ImageBasePA);
85 
86 BOOLEAN
88  IN PCCH BaseDllName,
90  IN PVOID BasePA,
91  OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
92 
93 BOOLEAN
95  IN PCCH DirectoryPath,
96  IN PLDR_DATA_TABLE_ENTRY ScanDTE);
97 
98 BOOLEAN
100  IN PCH DllName,
101  OUT PLDR_DATA_TABLE_ENTRY *LoadedEntry);
102 
103 
104 // arch/xxx/winldr.c
105 BOOLEAN
107  IN PFN_NUMBER NumberOfPages,
108  IN BOOLEAN KernelMapping);
109 
110 VOID
112 
113 VOID
114 MempDump(VOID);
115 
116 VOID
118 
119 VOID
UCHAR revision
Definition: winldr.h:46
signed char * PCHAR
Definition: retypes.h:7
UCHAR checksum
Definition: winldr.h:44
ULONGLONG xsdt_physical_address
Definition: winldr.h:49
#define IN
Definition: typedefs.h:38
struct _ARC_DISK_SIGNATURE_EX * PARC_DISK_SIGNATURE_EX
VOID WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: winldr.c:379
BOOLEAN WinLdrAllocateDataTableEntry(IN OUT PLIST_ENTRY ModuleListHead, IN PCCH BaseDllName, IN PCCH FullDllName, IN PVOID BasePA, OUT PLDR_DATA_TABLE_ENTRY *NewEntry)
Definition: peloader.c:172
PVOID VaToPa(PVOID Va)
Definition: conversion.h:15
struct _ARC_DISK_SIGNATURE_EX ARC_DISK_SIGNATURE_EX
char CHAR
Definition: xmlstorage.h:175
VOID LoadReactOSSetup(IN OperatingSystemItem *OperatingSystem, IN USHORT OperatingSystemVersion)
Definition: setupldr.c:140
VOID MempUnmapPage(PFN_NUMBER Page)
Definition: winldr.c:204
struct RSDP_DESCRIPTOR * PRSDP_DESCRIPTOR
ULONG length
Definition: winldr.h:48
enum _TYPE_OF_MEMORY TYPE_OF_MEMORY
int WINAPI StartPage(_In_ HDC)
BOOLEAN WinLdrCheckForLoadedDll(IN OUT PLIST_ENTRY ModuleListHead, IN PCH DllName, OUT PLDR_DATA_TABLE_ENTRY *LoadedEntry)
Definition: peloader.c:58
PVOID PaToVa(PVOID Pa)
Definition: conversion.h:22
ULONG PFN_NUMBER
Definition: ke.h:8
VOID List_PaToVa(_In_ LIST_ENTRY *ListEntry)
r reserved
Definition: btrfs.c:2673
CHAR * PCH
Definition: ntbasedef.h:398
unsigned char BOOLEAN
_In_ PCWSTR FullDllName
Definition: ldrtypes.h:246
BOOLEAN MempSetupPaging(IN PFN_NUMBER StartPage, IN PFN_NUMBER NumberOfPages, IN BOOLEAN KernelMapping)
Definition: winldr.c:170
USHORT OperatingSystemVersion
Definition: bootmgr.c:35
VOID WinLdrSetProcessorContext(VOID)
Definition: winldr.c:348
CONST CHAR * PCCH
Definition: ntbasedef.h:399
CHAR ArcName[MAX_PATH]
Definition: winldr.h:58
uint64_t ULONGLONG
Definition: typedefs.h:65
#define MAX_PATH
Definition: compat.h:26
ARC_DISK_SIGNATURE DiskSignature
Definition: winldr.h:57
BOOLEAN WinLdrScanImportDescriptorTable(IN OUT PLIST_ENTRY ModuleListHead, IN PCCH DirectoryPath, IN PLDR_DATA_TABLE_ENTRY ScanDTE)
Definition: peloader.c:101
VOID LoadAndBootWindows(IN OperatingSystemItem *OperatingSystem, IN USHORT OperatingSystemVersion)
Definition: winldr.c:650
unsigned char UCHAR
Definition: xmlstorage.h:181
Definition: btrfs_drv.h:1814
Definition: typedefs.h:117
VOID MempDump(VOID)
Definition: winldr.c:429
#define _In_
Definition: no_sal2.h:204
ULONG rsdt_physical_address
Definition: winldr.h:47
UCHAR extended_checksum
Definition: winldr.h:50
unsigned short USHORT
Definition: pedump.c:61
BOOLEAN WinLdrLoadImage(IN PCHAR FileName, TYPE_OF_MEMORY MemoryType, OUT PVOID *ImageBasePA)
Definition: peloader.c:268
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
LIST_ENTRY * ModuleListHead
Definition: kdpacket.c:23