ReactOS 0.4.15-dev-8339-g4028de8
i386.h
Go to the documentation of this file.
1/*
2 * FreeLoader
3 *
4 * Copyright (C) 2003 Eric Kohl
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// This is needed because headers define wrong one for ReactOS
24#undef KIP0PCRADDRESS
25#define KIP0PCRADDRESS 0xffdff000
26
27/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */
28#define PFN_SHIFT 12
29
30/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */
31#define PDE_SHIFT 22
32#define PDE_SHIFT_PAE 18
33
34/* Converts a Physical Address Pointer into a Page Frame Number */
35#define PaPtrToPfn(p) \
36 (((ULONG_PTR)&p) >> PFN_SHIFT)
37
38/* Converts a Physical Address into a Page Frame Number */
39#define PaToPfn(p) \
40 ((p) >> PFN_SHIFT)
41
42#define STARTUP_BASE 0xC0000000
43
44#define LowMemPageTableIndex 0
45#define StartupPageTableIndex (STARTUP_BASE >> 22)
46#define HalPageTableIndex (HAL_BASE >> 22)
47
48typedef struct _PAGE_DIRECTORY_X86
49{
52
71
72/* EOF */
#define __cdecl
Definition: accygwin.h:79
void __cdecl i386GeneralProtectionFault(void)
void __cdecl i386SegmentNotPresent(void)
void __cdecl i386MachineCheck(void)
void __cdecl i386AlignmentCheck(void)
void __cdecl i386NMIException(void)
void __cdecl i386Overflow(void)
void __cdecl i386PageFault(void)
void __cdecl i386InvalidOpcode(void)
void __cdecl i386InvalidTSS(void)
struct _PAGE_DIRECTORY_X86 * PPAGE_DIRECTORY_X86
struct _PAGE_DIRECTORY_X86 PAGE_DIRECTORY_X86
void __cdecl i386DebugException(void)
void __cdecl i386CoprocessorError(void)
void __cdecl i386Breakpoint(void)
void __cdecl i386StackException(void)
void __cdecl i386CoprocessorSegment(void)
void __cdecl i386BoundException(void)
void __cdecl i386DivideByZero(void)
void __cdecl i386FPUNotAvailable(void)
void __cdecl i386DoubleFault(void)
HARDWARE_PTE Pde[1024]
Definition: i386.h:50