Author: tkreuzer
Date: Sun Dec 20 14:30:35 2009
New Revision: 44669
URL:
http://svn.reactos.org/svn/reactos?rev=44669&view=rev
Log:
Merge from amd64 branch:
[NTOSKRNL]
44415 Move architecture specific inline functions in into the respective headers.
[FREELDR]
39639 Fix 2 small typos.
40247 Fix a number of ULONG / ULONG_PTR issues, remove LoadReactOSSetup2 for non-x86
builds.
40324 Fix switching from long mode to real mode, by jumping into a compatibility segment
first.
43566 move wlmemory.c into arch specific folder. add wlmemory.c and ntsetup.c for amd64
(stubbed)
43574 Enable winldr style boot for amd64
43598 Split wlmemory into portable and arch specific code. Partly implement amd64
version.
43600 Fix a bug.
43601 Move definition of KIP0PCRADDRESS into arch specific header. Implement
WinLdrSetupForNt for amd64. Fix mapping of PCR and KI_USER_SHARED_DATA. Don't enable
paging again on amd64. Fix WinLdrSetProcessorContext to take a ULONG_PTR not ULONG for Pcr
and Tss
43602 Round up to pages when updating LoaderPagesSpanned to avoid a bug when the last
memory region is not mapped.
43604 Add MempIsPageMapped for debugging puposes. Map pages for kernel, too in amd64
version of MempSetupPaging.
43605 Include the intrinsics from the kernel. Set segement selectors
43757 Pass pointer to debugprint function to the kernel in
LoaderBlock->u.I386.CommonDataArea. Comment out __lldt
43775 Fixed build with MinGW-w64 4.4.3
44065 Use LoaderMemoryData instead of LoaderSpecialMemory for page tables
44095 Use the kernel mode address for the gdt/idt
44123 Fix a typo
44144 Share some more inline functions between the kernel and freeldr. Use __ltr instead
of Ke386SetTr. refactor KiInitializeTss. Update some Mm constants. Halfplement
KeFlushEntireTb. Clean the mapping of page 0 in KiSystemStartup, as long as we don't
clean mappings in freeldr. Fix a bug in KiPageFault, where ebp was used instead of rbp.
Refactor MmArmInitSystem and related.
44205 Improve the code in wlmemory.c, no real functional change.
44426 remove unused variables.
44530 Don't include i386/ke.h from ntoskrnl.
44540 Detect if this is a amd64 CPU before attempting to boot. (Basil Gello)
Added:
trunk/reactos/boot/freeldr/freeldr/windows/amd64/ (props changed)
- copied from r43566,
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/
trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
- copied, changed from r43566,
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
- copied, changed from r43598,
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c
Modified:
trunk/reactos/ (props changed)
trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S
trunk/reactos/boot/freeldr/freeldr/arch/amd64/fathelp.S
trunk/reactos/boot/freeldr/freeldr/bootmgr.c
trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
trunk/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/mm/mm.c
trunk/reactos/boot/freeldr/freeldr/setupldr_main.rbuild
trunk/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c
trunk/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c
trunk/reactos/boot/freeldr/freeldr/windows/peloader.c
trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
trunk/reactos/dll/directx/d3d8/d3d8.spec (props changed)
trunk/reactos/dll/directx/dsound_new/classfactory.c (props changed)
trunk/reactos/dll/directx/dsound_new/dsound.spec (props changed)
trunk/reactos/dll/directx/dsound_new/regsvr.c (props changed)
trunk/reactos/dll/shellext/devcpux/devcpux.spec (props changed)
trunk/reactos/dll/shellext/slayer/slayer.spec (props changed)
trunk/reactos/include/ndk/amd64/ (props changed)
trunk/reactos/include/ndk/amd64/asmmacro.S (props changed)
trunk/reactos/lib/sdk/crt/time/ (props changed)
trunk/reactos/ntoskrnl/include/internal/arm/ke.h
trunk/reactos/ntoskrnl/include/internal/i386/ke.h
trunk/reactos/ntoskrnl/include/internal/ke_x.h
trunk/reactos/ntoskrnl/include/internal/powerpc/ke.h
trunk/reactos/subsystems/win32/win32k/include/engobjects.h (props changed)
trunk/reactos/tools/rsym/log2lines.c (props changed)
trunk/reactos/tools/rsym/log2lines.mak (props changed)
trunk/reactos/tools/rsym/rsym.c (props changed)
trunk/reactos/tools/rsym/rsym.h (props changed)
trunk/reactos/tools/rsym/rsym.mak (props changed)
trunk/reactos/tools/rsym/rsym_common.c (props changed)
Propchange: trunk/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41499,41549,43080,43426,43454,43506,43677,43682,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41499,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -20,6 +20,10 @@
mov gs, ax
mov ss, ax
+ /* checkPoint Charlie - where it all began... */
+ mov si, offset _CheckPoint0
+ call writestr
+
/* Setup a real mode stack */
mov sp, stack16
@@ -41,17 +45,88 @@
call x86_16_EnableA20
+ /* checkPoint Charlie - where it all began... */
+ mov si, offset _CheckPoint1
+ call writestr
+
call x86_16_BuildPageTables
-
- /* Switch to long mode */
+
+ /* checkPoint Charlie - where it all began... */
+ mov si, offset _CheckPoint2
+ call writestr
+
+ /* Check if CPU supports CPUID */
+
+ pushfd
+ pop eax
+ mov ebx, eax
+ xor eax, 0x00200000
+ push eax
+ popfd
+ pushfd
+ pop eax
+ cmp eax,ebx
+ jz NO_CPUID_SUPPORT_DETECTED
+
+ /* CPUID support detected - getting the PAE/PGE */
+
+ mov eax,1 // Fn0000_0001 - PAE in EDX[6]
+ cpuid
+ xor eax,eax
+ and edx,0x00a0
+ test edx,edx // are PAE and PGE bits set?
+ jz NO_X64_SUPPORT_DETECTED
+
+ /* PAE and PGE are here */
+
+ xor edx, edx
+ mov eax, 0x80000001
+ cpuid
+ and edx, 0x20000000
+ test edx,edx
+ jz NO_X64_SUPPORT_DETECTED
+
+ /* X64 Processor */
+
+ /* checkPoint Charlie - where it all began... */
+ mov si, offset _CheckPoint3
+ call writestr
+
+ jmp _switch64
+
+NO_X64_SUPPORT_DETECTED:
+ mov si, offset _NotAnX64Processor // Loading message
+ call writestr
+ jmp _fail
+
+NO_CPUID_SUPPORT_DETECTED:
+ mov si, offset _NoCPUIDSupport // Loading message
+ call writestr
+
+_fail:
+ jmp _fail
+ nop
+ nop
+
+_switch64:
call x86_16_SwitchToLong
.code64
+
+// mov ax, LMODE_DS
+// mov ds, ax
+// mov word ptr ds:[0xb8000], 0x0e00 + '1'
/* GO! */
xor rcx, rcx
call _BootMain
+ /* Checkpoint */
+// mov ax, LMODE_DS
+// mov ds, ax
+// mov word ptr ds:[0xb8002], 0x0e02 + '2'
+
+
/* Return into real mode */
call x86_64_SwitchToReal
.code16
@@ -90,7 +165,6 @@
popa
ret
-
/*
* We define 512 2MB pages at the start of memory, so we can access the first
* 1 GB as if paging was disabled
@@ -143,9 +217,39 @@
popa
ret
+/*
+ * writechr,writestr
+ *
+ *
+ */
+writestr:
+ pushfd
+ pushad
+.top:
+ lodsb
+ and al, al
+ jz .end
+ call writechr
+ jmp short .top
+.end:
+ popad
+ popfd
+ ret
+
+
+writechr:
+ pushf
+ pusha
+ mov ah, 0x0E
+ xor bx, bx
+ int 0x10
+ popa
+ popf
+ ret
//.global x86_16_SwitchToLong
x86_16_SwitchToLong:
+
cli
xor ax,ax
@@ -190,8 +294,7 @@
/* Now return in long mode! */
ret
-
-/** 64 But functions **********************************************************/
+/** 64 Bit functions **********************************************************/
.code64
.global x86_64_SwitchToReal
@@ -203,25 +306,40 @@
/* Save 64-bit stack pointer */
mov stack64, rsp
- /* Step 1 - deactivate long mode, by disabling paging */
- mov rax, cr0
- and rax, 0x000000007fffffff //~0x80000000
- mov cr0, rax
+// mov ax, LMODE_DS
+// mov ds, ax
+// mov word ptr ds:[0xb8004], 0x0e00 + '3'
+
+ /* Step 1 - jump to compatibility segment */
+ ljmp jumpvector
+
+jumpvector:
+ .long SwitchToReal1
+ .word CMODE_CS
+
+SwitchToReal1:
+.code32
+
+// mov word ptr ds:[0xb8006], 0x0e00 + '4'
+
+ /* Step 2 - deactivate long mode, by disabling paging */
+ mov eax, cr0
+ and eax, 0x000000007fffffff //~0x80000000
+ mov cr0, eax
/* Step 2 - disable long mode in EFER MSR */
- mov rcx, 0xC0000080 // Specify EFER MSR
- rdmsr
- and eax, ~0x00000100 // Disable EFER.LME
- wrmsr
-
- .code32
- /* jmp to 16-bit segment to set the limit correctly */
+// mov ecx, 0xC0000080 // Specify EFER MSR
+// rdmsr
+// and eax, ~0x00000100 // Disable EFER.LME
+// wrmsr
+
+ /* Step 3 - jump to 16-bit segment to set the limit correctly */
jmp RMODE_CS: offset SwitchToReal2
SwitchToReal2:
.code16
- /* Step 3 - Disable Protected Mode */
+ /* Step 4 - Disable Protected Mode */
mov eax, cr0
and eax, ~0x00000001
mov cr0, eax
@@ -230,6 +348,11 @@
jmp 0:offset BeReal
BeReal:
+ /* Checkpoint */
+// mov ax, 0xb800
+// mov fs, ax
+// mov word ptr fs:[0x0C], 0x0e00 + '7'
+
/* Restore segment registers */
mov ax, 0
mov ds, ax
@@ -238,7 +361,7 @@
mov gs, ax
mov ss, ax
- /* Rstore 16 bit stack */
+ /* Restore 16 bit stack */
mov sp, stack16
// lidt rmode_idtptr /* Load IDTR with real mode value */
@@ -266,17 +389,19 @@
code64ret:
.quad 0
+.p2align 2
gdt:
.quad 0x0000000000000000 /* 00: NULL descriptor */
.quad 0x0000000000000000 /* 08: */
.quad 0x0020980000000000 /* 10: long mode cs */
- .quad 0x0000900000000000 /* 18: long mode ds */
+ .quad 0x00cff3000000ffff /* 18: long mode ds */
.word 0xFFFF, 0x0000, 0x9E00, 0x0000 /* 16-bit real mode CS */
.word 0xFFFF, 0x0000, 0x9200, 0x0000 /* 16-bit real mode DS */
+ .quad 0x00CF9B000000FFFF /* 30: compat mode cs */
/* GDT table pointer */
gdtptr:
- .word 0x2f /* Limit */
+ .word 0x37 /* Limit */
.long gdt /* Base Address */
@@ -288,6 +413,36 @@
_BootPartition:
.long 0
+.global _NotAnX64Processor
+_NotAnX64Processor:
+ .ascii "FreeLoader: No x64-compatible CPU detected! Exiting..."
+ .byte 0x0d, 0x0a, 0
+
+.global _NoCPUIDSupport
+_NoCPUIDSupport:
+ .ascii "FreeLoader: No CPUID instruction support detected! Exiting..."
+ .byte 0x0d, 0x0a, 0
+
+/////////////////////////// Checkpoint messages ///////////////////////////////
+.global _CheckPoint0
+_CheckPoint0:
+ .ascii "Starting FreeLoader..."
+ .byte 0x0d, 0x0a, 0
+
+.global _CheckPoint1
+_CheckPoint1:
+ .ascii "FreeLoader[16-bit]: building page tables..."
+ .byte 0x0d, 0x0a, 0
+
+.global _CheckPoint2
+_CheckPoint2:
+ .ascii "FreeLoader[16-bit]: checking CPU for x64 long mode..."
+ .byte 0x0d, 0x0a, 0
+
+.global _CheckPoint3
+_CheckPoint3:
+ .ascii "FreeLoader: Switching to x64 long mode..."
+ .byte 0x0d, 0x0a, 0
///////////////////////////////////////////////////////////////////////////////
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/fathelp.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/amd64/fathelp.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/fathelp.S [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -155,7 +155,7 @@
add bx,dx
mov es,bx
mov bx,ax // Restore FAT entry offset
- mov ax, [es:bx] // Get FAT entry
+ mov ax, es:[bx] // Get FAT entry
ret
@@ -173,7 +173,7 @@
mov bx,0x7000
mov es,bx
mov bx,ax // Put FAT entry offset into BX
- mov ax, [es:bx] // Get FAT entry
+ mov ax, es:[bx] // Get FAT entry
pop cx // Get cluster number from stack
and cx,1
jz UseLow12Bits
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootm…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Sun Dec 20 14:30:35 2009
@@ -233,7 +233,7 @@
// to have different install methods, etc.
LoadReactOSSetup();
}
-#ifdef __i386__
+#if defined(__i386__) || defined(__x86_64__)
else if (_stricmp(BootType, "ReactOSSetup2") == 0)
{
// WinLdr-style boot
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -108,6 +108,13 @@
<if property="ARCH" value="i386">
<directory name="i386">
<file>ntsetup.c</file>
+ <file>wlmemory.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>ntsetup.c</file>
+ <file>wlmemory.c</file>
</directory>
</if>
</directory>
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -77,6 +77,15 @@
<file>wlregistry.c</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="windows">
+ <file>conversion.c</file>
+ <file>peloader.c</file>
+ <file>winldr.c</file>
+ <file>wlmemory.c</file>
+ <file>wlregistry.c</file>
+ </directory>
+ </if>
<file>freeldr.c</file>
<file>debug.c</file>
<file>version.c</file>
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -21,6 +21,10 @@
#ifndef __AMD64_AMD64_H_
#define __AMD64_AMD64_H_
+// This is needed because headers define wrong one for ReactOS
+#undef KIP0PCRADDRESS
+#define KIP0PCRADDRESS 0xFFFFF78000001000ULL /* FIXME!!! */
+
#define STACK64ADDR 0x74000 /* The 64-bit stack top will be at 0x74000 */
/* Long mode selectors */
@@ -28,6 +32,7 @@
#define LMODE_DS 0x18
#define RMODE_CS 0x20 /* RMode code selector, base 0 limit 64k */
#define RMODE_DS 0x28 /* RMode data selector, base 0 limit 64k */
+#define CMODE_CS 0x30
#define VA_MASK 0x0000FFFFFFFFFFFFUL
@@ -53,35 +58,6 @@
HARDWARE_PTE Pde[512];
} PAGE_DIRECTORY_AMD64, *PPAGE_DIRECTORY_AMD64;
-VOID
-FORCEINLINE
-__lgdt(void *gdt)
-{
- asm volatile ("lgdt %0\n" : : "m"(*(short*)gdt));
-}
-
-PKGDTENTRY64
-FORCEINLINE
-KiGetGdtEntry(PVOID pGdt, USHORT Index)
-{
- return (PKGDTENTRY64)((ULONG64)pGdt + (Index & ~RPL_MASK));
-}
-
-VOID
-FORCEINLINE
-KiInitGdtEntry(PKGDTENTRY64 Entry, ULONG64 Base, ULONG Limit, UCHAR Type, UCHAR Dpl)
-{
- Entry->Bits.Type = Type;
- Entry->Bits.Present = 1;
- Entry->Bits.Dpl = Dpl;
- Entry->BaseLow = (USHORT)(Base & 0xFFFF);
- Entry->Bytes.BaseMiddle = (UCHAR)(Base >> 16);
- Entry->Bytes.BaseHigh = (UCHAR)(Base >> 24);
- Entry->BaseUpper = (ULONG)(Base >> 32);
- Entry->LimitLow = (USHORT)(Limit & 0xFFFF);
- Entry->Bits.LimitHigh = (ULONG)((Limit >> 16) & 0xf);
- Entry->MustBeZero = 0;
-}
VOID FrLdrSetupGdtIdt();
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -21,6 +21,9 @@
#ifndef __I386_I386_H_
#define __I386_I386_H_
+// This is needed because headers define wrong one for ReactOS
+#undef KIP0PCRADDRESS
+#define KIP0PCRADDRESS 0xffdff000
#endif /* __I386_I386_H_ */
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -80,7 +80,6 @@
#include <arch/i386/machxbox.h>
#include <arch/i386/miscboot.h>
#include <internal/i386/intrin_i.h>
-#include <internal/i386/ke.h>
#elif defined(_M_PPC)
#include <arch/powerpc/hardware.h>
#elif defined(_M_ARM)
@@ -90,6 +89,7 @@
#elif defined(_M_AMD64)
#include <arch/amd64/hardware.h>
#include <arch/amd64/machpc.h>
+#include <internal/amd64/intrin_i.h>
#endif
/* misc files */
#include <keycodes.h>
Modified: trunk/reactos/boot/freeldr/freeldr/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/mm…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/mm.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/mm.c [iso-8859-1] Sun Dec 20 14:30:35 2009
@@ -75,8 +75,8 @@
#endif // DBG
// Update LoaderPagesSpanned count
- if ((((ULONG_PTR)MemPointer + MemorySize) >> PAGE_SHIFT) > LoaderPagesSpanned)
- LoaderPagesSpanned = (((ULONG_PTR)MemPointer + MemorySize) >> PAGE_SHIFT);
+ if ((((ULONG_PTR)MemPointer + MemorySize + PAGE_SIZE - 1) >> PAGE_SHIFT) >
LoaderPagesSpanned)
+ LoaderPagesSpanned = (((ULONG_PTR)MemPointer + MemorySize + PAGE_SIZE - 1) >>
PAGE_SHIFT);
// Now return the pointer
return MemPointer;
@@ -175,8 +175,8 @@
#endif // DBG
// Update LoaderPagesSpanned count
- if ((((ULONG_PTR)MemPointer + MemorySize) >> PAGE_SHIFT) > LoaderPagesSpanned)
- LoaderPagesSpanned = (((ULONG_PTR)MemPointer + MemorySize) >> PAGE_SHIFT);
+ if ((((ULONG_PTR)MemPointer + MemorySize + PAGE_SIZE - 1) >> PAGE_SHIFT) >
LoaderPagesSpanned)
+ LoaderPagesSpanned = (((ULONG_PTR)MemPointer + MemorySize + PAGE_SIZE - 1) >>
PAGE_SHIFT);
// Now return the pointer
return MemPointer;
Modified: trunk/reactos/boot/freeldr/freeldr/setupldr_main.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/setup…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/setupldr_main.rbuild [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/setupldr_main.rbuild [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -20,8 +20,13 @@
<file>setupldr.c</file>
</directory>
<if property="ARCH" value="i386">
- <directory name="windows">
- <file>setupldr2.c</file>
- </directory>
- </if>
+ <directory name="windows">
+ <file>setupldr2.c</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="windows">
+ <file>setupldr2.c</file>
+ </directory>
+ </if>
</module>
Propchange: trunk/reactos/boot/freeldr/freeldr/windows/amd64/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Dec 20 14:30:35 2009
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/boot/freeldr/freeldr/windows/amd64/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/boot/freeldr/freeldr/windows/amd64/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/boot/freeldr/freeldr/windows/amd64/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Modified: trunk/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -40,5 +40,45 @@
ULONG *PcrBasePage,
ULONG *TssBasePage)
{
+ ULONG TssSize;
+ ULONG TssPages;
+ ULONG_PTR Pcr = 0;
+ ULONG_PTR Tss = 0;
+ ULONG BlockSize, NumPages;
+ LoaderBlock->u.I386.CommonDataArea = (PVOID)DbgPrint; // HACK
+ LoaderBlock->u.I386.MachineType = MACHINE_TYPE_ISA;
+
+ /* Allocate 2 pages for PCR */
+ Pcr = (ULONG_PTR)MmAllocateMemoryWithType(2 * MM_PAGE_SIZE, LoaderStartupPcrPage);
+ *PcrBasePage = Pcr >> MM_PAGE_SHIFT;
+ RtlZeroMemory((PVOID)Pcr, 2 * MM_PAGE_SIZE);
+
+ if (Pcr == 0)
+ {
+ UiMessageBox("Can't allocate PCR\n");
+ return;
+ }
+
+ /* Allocate TSS */
+ TssSize = (sizeof(KTSS) + MM_PAGE_SIZE) & ~(MM_PAGE_SIZE - 1);
+ TssPages = TssSize / MM_PAGE_SIZE;
+
+ Tss = (ULONG_PTR)MmAllocateMemoryWithType(TssSize, LoaderMemoryData);
+
+ *TssBasePage = Tss >> MM_PAGE_SHIFT;
+
+ /* Allocate space for new GDT + IDT */
+ BlockSize = NUM_GDT*sizeof(KGDTENTRY) + NUM_IDT*sizeof(KIDTENTRY);//FIXME: Use GDT/IDT
limits here?
+ NumPages = (BlockSize + MM_PAGE_SIZE - 1) >> MM_PAGE_SHIFT;
+ *GdtIdt = (PKGDTENTRY)MmAllocateMemoryWithType(NumPages * MM_PAGE_SIZE,
LoaderMemoryData);
+
+ if (*GdtIdt == NULL)
+ {
+ UiMessageBox("Can't allocate pages for GDT+IDT!\n");
+ return;
+ }
+
+ /* Zero newly prepared GDT+IDT */
+ RtlZeroMemory(*GdtIdt, NumPages << MM_PAGE_SHIFT);
}
Modified: trunk/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -1,9 +1,9 @@
/*
* PROJECT: EFI Windows Loader
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: freeldr/winldr/wlmemory.c
+ * FILE: freeldr/amd64/wlmemory.c
* PURPOSE: Memory related routines
- * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.org)
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org)
*/
/* INCLUDES ***************************************************************/
@@ -13,82 +13,14 @@
#include <ndk/asm.h>
#include <debug.h>
-extern ULONG TotalNLSSize;
-extern ULONG LoaderPagesSpanned;
-
-// This is needed because headers define wrong one for ReactOS
-#undef KIP0PCRADDRESS
-#define KIP0PCRADDRESS 0xffdff000
-
-#define HYPER_SPACE_ENTRY 0x300
-
-PCHAR MemTypeDesc[] = {
- "ExceptionBlock ", // ?
- "SystemBlock ", // ?
- "Free ",
- "Bad ", // used
- "LoadedProgram ", // == Free
- "FirmwareTemporary ", // == Free
- "FirmwarePermanent ", // == Bad
- "OsloaderHeap ", // used
- "OsloaderStack ", // == Free
- "SystemCode ",
- "HalCode ",
- "BootDriver ", // not used
- "ConsoleInDriver ", // ?
- "ConsoleOutDriver ", // ?
- "StartupDpcStack ", // ?
- "StartupKernelStack", // ?
- "StartupPanicStack ", // ?
- "StartupPcrPage ", // ?
- "StartupPdrPage ", // ?
- "RegistryData ", // used
- "MemoryData ", // not used
- "NlsData ", // used
- "SpecialMemory ", // == Bad
- "BBTMemory " // == Bad
- };
-
-VOID
-WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock);
-
-
-VOID
-MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG BasePage,
- ULONG PageCount,
- ULONG Type);
-VOID
-WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor);
-
-VOID
-WinLdrRemoveDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR Descriptor);
-
-VOID
-WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss);
-
-// This is needed only for SetProcessorContext routine
-#pragma pack(2)
- typedef struct
- {
- USHORT Limit;
- ULONG Base;
- } GDTIDT;
-#pragma pack(4)
+//extern ULONG LoaderPagesSpanned;
+
+#define HYPER_SPACE_ENTRY 0x1EE
/* GLOBALS ***************************************************************/
-PHARDWARE_PTE PDE;
-PHARDWARE_PTE HalPageTable;
-
-PUCHAR PhysicalPageTablesBuffer;
-PUCHAR KernelPageTablesBuffer;
-ULONG PhysicalPageTables;
-ULONG KernelPageTables;
-
-MEMORY_ALLOCATION_DESCRIPTOR *Mad;
-ULONG MadCount = 0;
+PHARDWARE_PTE PxeBase;
+//PHARDWARE_PTE HalPageTable;
/* FUNCTIONS **************************************************************/
@@ -96,74 +28,326 @@
BOOLEAN
MempAllocatePageTables()
{
+ DPRINTM(DPRINT_WINDOWS,">>> MempAllocatePageTables\n");
+
+ /* Allocate a page for the PML4 */
+ PxeBase = MmAllocateMemoryWithType(PAGE_SIZE, LoaderMemoryData);
+ if (!PxeBase)
+ {
+ DPRINTM(DPRINT_WINDOWS,"failed to allocate PML4\n");
+ return FALSE;
+ }
+
+ // FIXME: Physical PTEs = FirmwareTemporary ?
+
+ /* Zero the PML4 */
+ RtlZeroMemory(PxeBase, PAGE_SIZE);
+
+ /* The page tables are located at 0xfffff68000000000
+ * We create a recursive self mapping through all 4 levels at
+ * virtual address 0xfffff6fb7dbedf68 */
+ PxeBase[VAtoPXI(PXE_BASE)].Valid = 1;
+ PxeBase[VAtoPXI(PXE_BASE)].Write = 1;
+ PxeBase[VAtoPXI(PXE_BASE)].PageFrameNumber = PtrToPfn(PxeBase);
+
+ // FIXME: map PDE's for hals memory mapping
+
+ DPRINTM(DPRINT_WINDOWS,">>> leave MempAllocatePageTables\n");
return TRUE;
}
-VOID
-MempAllocatePTE(ULONG Entry, PHARDWARE_PTE *PhysicalPT, PHARDWARE_PTE *KernelPT)
-{
-
+PHARDWARE_PTE
+MempGetOrCreatePageDir(PHARDWARE_PTE PdeBase, ULONG Index)
+{
+ PHARDWARE_PTE SubDir;
+
+ if (!PdeBase)
+ return NULL;
+
+ if (!PdeBase[Index].Valid)
+ {
+ SubDir = MmAllocateMemoryWithType(PAGE_SIZE, LoaderMemoryData);
+ if (!SubDir)
+ return NULL;
+ RtlZeroMemory(SubDir, PAGE_SIZE);
+ PdeBase[Index].PageFrameNumber = PtrToPfn(SubDir);
+ PdeBase[Index].Valid = 1;
+ PdeBase[Index].Write = 1;
+ }
+ else
+ {
+ SubDir = (PVOID)((ULONG64)(PdeBase[Index].PageFrameNumber) * PAGE_SIZE);
+ }
+ return SubDir;
+}
+
+BOOLEAN
+MempMapSinglePage(ULONG64 VirtualAddress, ULONG64 PhysicalAddress)
+{
+ PHARDWARE_PTE PpeBase, PdeBase, PteBase;
+ ULONG Index;
+
+ PpeBase = MempGetOrCreatePageDir(PxeBase, VAtoPXI(VirtualAddress));
+ PdeBase = MempGetOrCreatePageDir(PpeBase, VAtoPPI(VirtualAddress));
+ PteBase = MempGetOrCreatePageDir(PdeBase, VAtoPDI(VirtualAddress));
+
+ if (!PteBase)
+ {
+ DPRINTM(DPRINT_WINDOWS,"!!!No Dir %p, %p, %p, %p\n", PxeBase, PpeBase,
PdeBase, PteBase);
+ return FALSE;
+ }
+
+ Index = VAtoPTI(VirtualAddress);
+ if (PteBase[Index].Valid)
+ {
+ DPRINTM(DPRINT_WINDOWS,"!!!Already mapped %ld\n", Index);
+ return FALSE;
+ }
+
+ PteBase[Index].Valid = 1;
+ PteBase[Index].Write = 1;
+ PteBase[Index].PageFrameNumber = PhysicalAddress / PAGE_SIZE;
+
+ return TRUE;
+}
+
+BOOLEAN
+MempIsPageMapped(PVOID VirtualAddress)
+{
+ PHARDWARE_PTE PpeBase, PdeBase, PteBase;
+ ULONG Index;
+
+ Index = VAtoPXI(VirtualAddress);
+ if (!PxeBase[Index].Valid)
+ return FALSE;
+
+ PpeBase = (PVOID)((ULONG64)(PxeBase[Index].PageFrameNumber) * PAGE_SIZE);
+ Index = VAtoPPI(VirtualAddress);
+ if (!PpeBase[Index].Valid)
+ return FALSE;
+
+ PdeBase = (PVOID)((ULONG64)(PpeBase[Index].PageFrameNumber) * PAGE_SIZE);
+ Index = VAtoPDI(VirtualAddress);
+ if (!PdeBase[Index].Valid)
+ return FALSE;
+
+ PteBase = (PVOID)((ULONG64)(PdeBase[Index].PageFrameNumber) * PAGE_SIZE);
+ Index = VAtoPTI(VirtualAddress);
+ if (!PteBase[Index].Valid)
+ return FALSE;
+
+ return TRUE;
+}
+
+ULONG
+MempMapRangeOfPages(ULONG64 VirtualAddress, ULONG64 PhysicalAddress, ULONG cPages)
+{
+ ULONG i;
+
+ for (i = 0; i < cPages; i++)
+ {
+ if (!MempMapSinglePage(VirtualAddress, PhysicalAddress))
+ {
+ return i;
+ }
+ VirtualAddress += PAGE_SIZE;
+ PhysicalAddress += PAGE_SIZE;
+ }
+ return i;
}
BOOLEAN
MempSetupPaging(IN ULONG StartPage,
IN ULONG NumberOfPages)
{
+ DPRINTM(DPRINT_WINDOWS,">>> MempSetupPaging(0x%lx, %ld, %p)\n",
+ StartPage, NumberOfPages, StartPage * PAGE_SIZE + KSEG0_BASE);
+
+ /* Identity mapping */
+ if (MempMapRangeOfPages(StartPage * PAGE_SIZE,
+ StartPage * PAGE_SIZE,
+ NumberOfPages) != NumberOfPages)
+ {
+ DPRINTM(DPRINT_WINDOWS,"Failed to map pages 1\n");
+ return FALSE;
+ }
+
+ /* Kernel mapping */
+ if (MempMapRangeOfPages(StartPage * PAGE_SIZE + KSEG0_BASE,
+ StartPage * PAGE_SIZE,
+ NumberOfPages) != NumberOfPages)
+ {
+ DPRINTM(DPRINT_WINDOWS,"Failed to map pages 2\n");
+ return FALSE;
+ }
return TRUE;
}
VOID
-MempDisablePages()
-{
-
-}
-
-VOID
-MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG BasePage,
- ULONG PageCount,
- ULONG Type)
-{
-
-}
-
-#ifdef _M_IX86
+MempUnmapPage(ULONG Page)
+{
+ // DPRINTM(DPRINT_WINDOWS,">>> MempUnmapPage\n");
+}
+
VOID
WinLdrpMapApic()
{
-
-}
-#else
-VOID
-WinLdrpMapApic()
-{
- /* Implement it for another arch */
-}
-#endif
-
-BOOLEAN
-WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG PcrBasePage,
- ULONG TssBasePage,
- PVOID GdtIdt)
-{
-return 1;
-}
-
-// Two special things this func does: it sorts descriptors,
-// and it merges free ones
-VOID
-WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor)
-{
-
-}
-
-VOID
-WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss)
-{
-
-}
-
+ BOOLEAN LocalAPIC;
+ LARGE_INTEGER MsrValue;
+ ULONG CpuInfo[4];
+ ULONG64 APICAddress;
+
+ DPRINTM(DPRINT_WINDOWS,">>> WinLdrpMapApic\n");
+
+ /* Check if we have a local APIC */
+ __cpuid((int*)CpuInfo, 1);
+ LocalAPIC = (((CpuInfo[3] >> 9) & 1) != 0);
+
+ /* If there is no APIC, just return */
+ if (!LocalAPIC)
+ {
+ DPRINTM(DPRINT_WINDOWS,"No APIC found.\n");
+ return;
+ }
+
+ /* Read the APIC Address */
+ MsrValue.QuadPart = __readmsr(0x1B);
+ APICAddress = (MsrValue.LowPart & 0xFFFFF000);
+
+ DPRINTM(DPRINT_WINDOWS, "Local APIC detected at address 0x%x\n",
+ APICAddress);
+
+ /* Map it */
+ MempMapSinglePage(APIC_BASE, APICAddress);
+}
+
+BOOLEAN
+WinLdrMapSpecialPages(ULONG PcrBasePage)
+{
+ /* Map the PCR page */
+ if (!MempMapSinglePage(KIP0PCRADDRESS, PcrBasePage * PAGE_SIZE))
+ {
+ DPRINTM(DPRINT_WINDOWS, "Could not map PCR @ %lx\n", PcrBasePage);
+ return FALSE;
+ }
+
+ /* Map KI_USER_SHARED_DATA */
+ if (!MempMapSinglePage(KI_USER_SHARED_DATA, (PcrBasePage+1) * PAGE_SIZE))
+ {
+ DPRINTM(DPRINT_WINDOWS, "Could not map KI_USER_SHARED_DATA\n");
+ return FALSE;
+ }
+
+ /* Map the APIC page */
+ WinLdrpMapApic();
+
+ return TRUE;
+}
+
+VOID
+WinLdrSetupGdt(PVOID GdtBase, ULONG64 TssBase)
+{
+ PKGDTENTRY64 Entry;
+ KDESCRIPTOR GdtDesc;
+
+ /* Setup KGDT_64_R0_CODE */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_CODE);
+ *(PULONG64)Entry = 0x00209b0000000000ULL;
+
+ /* Setup KGDT_64_R0_SS */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_SS);
+ *(PULONG64)Entry = 0x00cf93000000ffffULL;
+
+ /* Setup KGDT_64_DATA */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_64_DATA);
+ *(PULONG64)Entry = 0x00cff3000000ffffULL;
+
+ /* Setup KGDT_64_R3_CODE */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_64_R3_CODE);
+ *(PULONG64)Entry = 0x0020fb0000000000ULL;
+
+ /* Setup KGDT_32_R3_TEB */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_32_R3_TEB);
+ *(PULONG64)Entry = 0xff40f3fd50003c00ULL;
+
+ /* Setup TSS entry */
+ Entry = KiGetGdtEntry(GdtBase, KGDT_TSS);
+ KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
+
+ /* Setup GDT descriptor */
+ GdtDesc.Base = GdtBase;
+ GdtDesc.Limit = NUM_GDT * sizeof(KGDTENTRY) - 1;
+
+ /* Set the new Gdt */
+ __lgdt(&GdtDesc.Limit);
+ DbgPrint("Gdtr.Base = %p, num = %ld\n", GdtDesc.Base, NUM_GDT);
+
+}
+
+VOID
+WinLdrSetupIdt(PVOID IdtBase)
+{
+ KDESCRIPTOR IdtDesc, OldIdt;
+
+ /* Get old IDT */
+ __sidt(&OldIdt);
+
+ /* Copy the old IDT */
+ RtlCopyMemory(IdtBase, (PVOID)OldIdt.Base, OldIdt.Limit + 1);
+
+ /* Setup the new IDT descriptor */
+ IdtDesc.Base = IdtBase;
+ IdtDesc.Limit = NUM_IDT * sizeof(KIDTENTRY) - 1;
+
+ /* Set the new IDT */
+ __lidt(&IdtDesc.Limit);
+ DbgPrint("Idtr.Base = %p\n", IdtDesc.Base);
+
+}
+
+VOID
+WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG64 Pcr, IN ULONG64 Tss)
+{
+ DPRINTM(DPRINT_WINDOWS, "WinLdrSetProcessorContext %p\n", Pcr);
+
+ /* Disable Interrupts */
+ _disable();
+
+ /* Re-initalize EFLAGS */
+ __writeeflags(0);
+
+ /* Set the new PML4 */
+ __writecr3((ULONG64)PxeBase);
+
+ /* Get kernel mode address of gdt / idt */
+ GdtIdt = (PVOID)((ULONG64)GdtIdt + KSEG0_BASE);
+
+ /* Create gdt entries and load gdtr */
+ WinLdrSetupGdt(GdtIdt, Tss);
+
+ /* Copy old Idt and set idtr */
+ WinLdrSetupIdt((PVOID)((ULONG64)GdtIdt + 2048)); // HACK!
+
+ /* LDT is unused */
+// __lldt(0);
+
+ /* Load selectors for DS/ES/FS/GS/SS */
+ Ke386SetDs(KGDT_64_DATA | RPL_MASK); // 0x2b
+ Ke386SetEs(KGDT_64_DATA | RPL_MASK); // 0x2b
+ Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK); // 0x53
+ Ke386SetGs(KGDT_64_DATA | RPL_MASK); // 0x2b
+ Ke386SetSs(KGDT_64_R0_SS); // 0x18
+
+ /* Load TSR */
+ __ltr(KGDT_TSS);
+
+ DPRINTM(DPRINT_WINDOWS, "leave WinLdrSetProcessorContext\n");
+}
+
+VOID
+MempDump()
+{
+}
+
Copied: trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c (from r43566,
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
[iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c [iso-8859-1] Sun Dec 20
14:30:35 2009
@@ -1,7 +1,7 @@
/*
* PROJECT: EFI Windows Loader
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: freeldr/winldr/wlmemory.c
+ * FILE: freeldr/winldr/i386/wlmemory.c
* PURPOSE: Memory related routines
* PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.org)
*/
@@ -21,52 +21,6 @@
#define KIP0PCRADDRESS 0xffdff000
#define HYPER_SPACE_ENTRY 0x300
-
-PCHAR MemTypeDesc[] = {
- "ExceptionBlock ", // ?
- "SystemBlock ", // ?
- "Free ",
- "Bad ", // used
- "LoadedProgram ", // == Free
- "FirmwareTemporary ", // == Free
- "FirmwarePermanent ", // == Bad
- "OsloaderHeap ", // used
- "OsloaderStack ", // == Free
- "SystemCode ",
- "HalCode ",
- "BootDriver ", // not used
- "ConsoleInDriver ", // ?
- "ConsoleOutDriver ", // ?
- "StartupDpcStack ", // ?
- "StartupKernelStack", // ?
- "StartupPanicStack ", // ?
- "StartupPcrPage ", // ?
- "StartupPdrPage ", // ?
- "RegistryData ", // used
- "MemoryData ", // not used
- "NlsData ", // used
- "SpecialMemory ", // == Bad
- "BBTMemory " // == Bad
- };
-
-VOID
-WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock);
-
-
-VOID
-MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG BasePage,
- ULONG PageCount,
- ULONG Type);
-VOID
-WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor);
-
-VOID
-WinLdrRemoveDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR Descriptor);
-
-VOID
-WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss);
// This is needed only for SetProcessorContext routine
#pragma pack(2)
@@ -86,10 +40,6 @@
PUCHAR KernelPageTablesBuffer;
ULONG PhysicalPageTables;
ULONG KernelPageTables;
-
-MEMORY_ALLOCATION_DESCRIPTOR *Mad;
-ULONG MadCount = 0;
-
/* FUNCTIONS **************************************************************/
@@ -253,133 +203,24 @@
}
VOID
-MempDisablePages()
-{
- ULONG i;
-
- //
- // We need to delete kernel mapping from memory areas which are
- // marked as Special or Permanent memory (thus non-accessible)
- //
-
- for (i=0; i<MadCount; i++)
- {
- ULONG StartPage, EndPage, Page;
-
- StartPage = Mad[i].BasePage;
- EndPage = Mad[i].BasePage + Mad[i].PageCount;
-
- if (Mad[i].MemoryType == LoaderFirmwarePermanent ||
- Mad[i].MemoryType == LoaderSpecialMemory ||
- Mad[i].MemoryType == LoaderFree ||
- (Mad[i].MemoryType == LoaderFirmwareTemporary && EndPage <=
LoaderPagesSpanned) ||
- Mad[i].MemoryType == LoaderOsloaderStack ||
- Mad[i].MemoryType == LoaderLoadedProgram)
- {
- //
- // But, the first megabyte of memory always stays!
- // And, to tell the truth, we don't care about what's higher
- // than LoaderPagesSpanned
- if (Mad[i].MemoryType == LoaderFirmwarePermanent ||
- Mad[i].MemoryType == LoaderSpecialMemory)
- {
- if (StartPage < 0x100)
- StartPage = 0x100;
-
- if (EndPage > LoaderPagesSpanned)
- EndPage = LoaderPagesSpanned;
- }
-
- for (Page = StartPage; Page < EndPage; Page++)
- {
- PHARDWARE_PTE KernelPT;
- ULONG Entry = (Page >> 10) + (KSEG0_BASE >> 22);
-
- if (PDE[Entry].Valid)
- {
- KernelPT = (PHARDWARE_PTE)(PDE[Entry].PageFrameNumber << MM_PAGE_SHIFT);
-
- if (KernelPT)
- {
- KernelPT[Page & 0x3ff].PageFrameNumber = 0;
- KernelPT[Page & 0x3ff].Valid = 0;
- KernelPT[Page & 0x3ff].Write = 0;
- }
- }
- }
- }
- }
-}
-
-VOID
-MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG BasePage,
- ULONG PageCount,
- ULONG Type)
-{
- BOOLEAN Status;
-
- //
- // Check for some weird stuff at the top
- //
- if (BasePage + PageCount > 0xF0000)
- {
- //
- // Just skip this, without even adding to MAD list
- //
- return;
- }
-
- //
- // Set Base page, page count and type
- //
- Mad[MadCount].BasePage = BasePage;
- Mad[MadCount].PageCount = PageCount;
- Mad[MadCount].MemoryType = Type;
-
- //
- // Check if it's more than the allowed for OS loader
- // if yes - don't map the pages, just add as FirmwareTemporary
- //
- if (BasePage + PageCount > LoaderPagesSpanned)
- {
- if (Mad[MadCount].MemoryType != LoaderSpecialMemory &&
- Mad[MadCount].MemoryType != LoaderFirmwarePermanent &&
- Mad[MadCount].MemoryType != LoaderFree)
- {
- DPRINTM(DPRINT_WINDOWS, "Setting page %x %x to Temporary from %d\n",
- BasePage, PageCount, Mad[MadCount].MemoryType);
- Mad[MadCount].MemoryType = LoaderFirmwareTemporary;
- }
-
- WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]);
- MadCount++;
-
- return;
- }
-
- //
- // Add descriptor
- //
- WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]);
- MadCount++;
-
- //
- // Map it (don't map low 1Mb because it was already contigiously
- // mapped in WinLdrTurnOnPaging)
- //
- if (BasePage >= 0x100)
- {
- Status = MempSetupPaging(BasePage, PageCount);
- if (!Status)
- {
- DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging\n");
- return;
- }
- }
-}
-
-#ifdef _M_IX86
+MempUnmapPage(ULONG Page)
+{
+ PHARDWARE_PTE KernelPT;
+ ULONG Entry = (Page >> 10) + (KSEG0_BASE >> 22);
+
+ if (PDE[Entry].Valid)
+ {
+ KernelPT = (PHARDWARE_PTE)(PDE[Entry].PageFrameNumber << MM_PAGE_SHIFT);
+
+ if (KernelPT)
+ {
+ KernelPT[Page & 0x3ff].PageFrameNumber = 0;
+ KernelPT[Page & 0x3ff].Valid = 0;
+ KernelPT[Page & 0x3ff].Write = 0;
+ }
+ }
+}
+
VOID
WinLdrpMapApic()
{
@@ -410,149 +251,10 @@
HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].WriteThrough = 1;
HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].CacheDisable = 1;
}
-#else
-VOID
-WinLdrpMapApic()
-{
- /* Implement it for another arch */
-}
-#endif
BOOLEAN
-WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- ULONG PcrBasePage,
- ULONG TssBasePage,
- PVOID GdtIdt)
-{
- ULONG i, PagesCount, MemoryMapSizeInPages;
- ULONG LastPageIndex, LastPageType, MemoryMapStartPage;
- PPAGE_LOOKUP_TABLE_ITEM MemoryMap;
- ULONG NoEntries;
- PKTSS Tss;
- BOOLEAN Status;
-
- //
- // Creating a suitable memory map for the Windows can be tricky, so let's
- // give a few advices:
- // 1) One must not map the whole available memory pages to PDE!
- // Map only what's needed - 16Mb, 24Mb, 32Mb max I think,
- // thus occupying 4, 6 or 8 PDE entries for identical mapping,
- // the same quantity for KSEG0_BASE mapping, one more entry for
- // hyperspace and one more entry for HAL physical pages mapping.
- // 2) Memory descriptors must map *the whole* physical memory
- // showing any memory above 16/24/32 as FirmwareTemporary
- //
- // 3) Overall memory blocks count must not exceed 30 (?? why?)
- //
-
- //
- // During MmInitMachineDependent, the kernel zeroes PDE at the following address
- // 0xC0300000 - 0xC03007FC
- //
- // Then it finds the best place for non-paged pool:
- // StartPde C0300F70, EndPde C0300FF8, NumberOfPages C13, NextPhysPage 3AD
- //
-
- // Before we start mapping pages, create a block of memory, which will contain
- // PDE and PTEs
- if (MempAllocatePageTables() == FALSE)
- return FALSE;
-
- // Allocate memory for memory allocation descriptors
- Mad = MmHeapAlloc(sizeof(MEMORY_ALLOCATION_DESCRIPTOR) * 1024);
-
- // Setup an entry for each descriptor
- MemoryMap = MmGetMemoryMap(&NoEntries);
- if (MemoryMap == NULL)
- {
- UiMessageBox("Can not retrieve the current memory map");
- return FALSE;
- }
-
- // Calculate parameters of the memory map
- MemoryMapStartPage = (ULONG_PTR)MemoryMap >> MM_PAGE_SHIFT;
- MemoryMapSizeInPages = NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM);
-
- DPRINTM(DPRINT_WINDOWS, "Got memory map with %d entries\n", NoEntries);
-
- // Always contigiously map low 1Mb of memory
- Status = MempSetupPaging(0, 0x100);
- if (!Status)
- {
- DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging of low 1Mb\n");
- return FALSE;
- }
-
- // Construct a good memory map from what we've got,
- // but mark entries which the memory allocation bitmap takes
- // as free entries (this is done in order to have the ability
- // to place mem alloc bitmap outside lower 16Mb zone)
- PagesCount = 1;
- LastPageIndex = 0;
- LastPageType = MemoryMap[0].PageAllocated;
- for(i=1;i<NoEntries;i++)
- {
- // Check if its memory map itself
- if (i >= MemoryMapStartPage &&
- i < (MemoryMapStartPage+MemoryMapSizeInPages))
- {
- // Exclude it if current page belongs to the memory map
- MemoryMap[i].PageAllocated = LoaderFree;
- }
-
- // Process entry
- if (MemoryMap[i].PageAllocated == LastPageType &&
- (i != NoEntries-1) )
- {
- PagesCount++;
- }
- else
- {
- // Add the resulting region
- MempAddMemoryBlock(LoaderBlock, LastPageIndex, PagesCount, LastPageType);
-
- // Reset our counter vars
- LastPageIndex = i;
- LastPageType = MemoryMap[i].PageAllocated;
- PagesCount = 1;
- }
- }
-
- // TEMP, DEBUG!
- // adding special reserved memory zones for vmware workstation
-#if 0
- {
- Mad[MadCount].BasePage = 0xfec00;
- Mad[MadCount].PageCount = 0x10;
- Mad[MadCount].MemoryType = LoaderSpecialMemory;
- WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]);
- MadCount++;
-
- Mad[MadCount].BasePage = 0xfee00;
- Mad[MadCount].PageCount = 0x1;
- Mad[MadCount].MemoryType = LoaderSpecialMemory;
- WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]);
- MadCount++;
-
- Mad[MadCount].BasePage = 0xfffe0;
- Mad[MadCount].PageCount = 0x20;
- Mad[MadCount].MemoryType = LoaderSpecialMemory;
- WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]);
- MadCount++;
- }
-#endif
-
- DPRINTM(DPRINT_WINDOWS, "MadCount: %d\n", MadCount);
-
- WinLdrpDumpMemoryDescriptors(LoaderBlock); //FIXME: Delete!
-
- // Map our loader image, so we can continue running
- /*Status = MempSetupPaging(OsLoaderBase >> MM_PAGE_SHIFT, OsLoaderSize >>
MM_PAGE_SHIFT);
- if (!Status)
- {
- UiMessageBox("Error during MempSetupPaging");
- return;
- }*/
+WinLdrMapSpecialPages(ULONG PcrBasePage)
+{
//VideoDisplayString(L"Hello from VGA, going into the kernel\n");
DPRINTM(DPRINT_WINDOWS, "HalPageTable: 0x%X\n", HalPageTable);
@@ -574,127 +276,9 @@
//VideoMemoryBase = MmMapIoSpace(0xb8000, 4000, MmNonCached);
//DPRINTM(DPRINT_WINDOWS, "VideoMemoryBase: 0x%X\n", VideoMemoryBase);
- Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT));
-
- // Unmap what is not needed from kernel page table
- MempDisablePages();
-
- // Fill the memory descriptor list and
- //PrepareMemoryDescriptorList();
- DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n");
- List_PaToVa(&LoaderBlock->MemoryDescriptorListHead);
-
-#if DBG
- {
- ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000;
- int j;
-
- DPRINTM(DPRINT_WINDOWS, "\nPDE\n");
-
- for (i=0; i<128; i++)
- {
- DPRINTM(DPRINT_WINDOWS, "0x%04X | ", i*8);
-
- for (j=0; j<8; j++)
- {
- DPRINTM(DPRINT_WINDOWS, "0x%08X ", PDE_Addr[i*8+j]);
- }
-
- DPRINTM(DPRINT_WINDOWS, "\n");
- }
- }
-#endif
-
-
- // Enable paging
- //BS->ExitBootServices(ImageHandle,MapKey);
-
- // Disable Interrupts
- _disable();
-
- // Re-initalize EFLAGS
- __writeeflags(0);
-
- // Set the PDBR
- __writecr3((ULONG_PTR)PDE);
-
- // Enable paging by modifying CR0
- __writecr0(__readcr0() | CR0_PG);
-
- // Set processor context
- WinLdrSetProcessorContext(GdtIdt, KIP0PCRADDRESS, KSEG0_BASE | (TssBasePage <<
MM_PAGE_SHIFT));
-
- // Zero KI_USER_SHARED_DATA page
- memset((PVOID)KI_USER_SHARED_DATA, 0, MM_PAGE_SIZE);
-
- return TRUE;
-}
-
-// Two special things this func does: it sorts descriptors,
-// and it merges free ones
-VOID
-WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor)
-{
- PLIST_ENTRY ListHead = &LoaderBlock->MemoryDescriptorListHead;
- PLIST_ENTRY PreviousEntry, NextEntry;
- PMEMORY_ALLOCATION_DESCRIPTOR PreviousDescriptor = NULL, NextDescriptor = NULL;
-
- DPRINTM(DPRINT_WINDOWS, "BP=0x%X PC=0x%X %s\n", NewDescriptor->BasePage,
- NewDescriptor->PageCount, MemTypeDesc[NewDescriptor->MemoryType]);
-
- /* Find a place where to insert the new descriptor to */
- PreviousEntry = ListHead;
- NextEntry = ListHead->Flink;
- while (NextEntry != ListHead)
- {
- NextDescriptor = CONTAINING_RECORD(NextEntry,
- MEMORY_ALLOCATION_DESCRIPTOR,
- ListEntry);
- if (NewDescriptor->BasePage < NextDescriptor->BasePage)
- break;
-
- PreviousEntry = NextEntry;
- PreviousDescriptor = NextDescriptor;
- NextEntry = NextEntry->Flink;
- }
-
- /* Don't forget about merging free areas */
- if (NewDescriptor->MemoryType != LoaderFree)
- {
- /* Just insert, nothing to merge */
- InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry);
- }
- else
- {
- /* Previous block also free? */
- if ((PreviousEntry != ListHead) && (PreviousDescriptor->MemoryType ==
LoaderFree) &&
- ((PreviousDescriptor->BasePage + PreviousDescriptor->PageCount) ==
- NewDescriptor->BasePage))
- {
- /* Just enlarge previous descriptor's PageCount */
- PreviousDescriptor->PageCount += NewDescriptor->PageCount;
- NewDescriptor = PreviousDescriptor;
- }
- else
- {
- /* Nope, just insert */
- InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry);
- }
-
- /* Next block is free ?*/
- if ((NextEntry != ListHead) &&
- (NextDescriptor->MemoryType == LoaderFree) &&
- ((NewDescriptor->BasePage + NewDescriptor->PageCount) ==
NextDescriptor->BasePage))
- {
- /* Enlarge next descriptor's PageCount */
- NewDescriptor->PageCount += NextDescriptor->PageCount;
- RemoveEntryList(&NextDescriptor->ListEntry);
- }
- }
-
- return;
-}
+ return TRUE;
+}
+
VOID
WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss)
@@ -707,6 +291,21 @@
DPRINTM(DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n",
GdtIdt, Pcr, Tss);
+
+ // Enable paging
+ //BS->ExitBootServices(ImageHandle,MapKey);
+
+ // Disable Interrupts
+ _disable();
+
+ // Re-initalize EFLAGS
+ __writeeflags(0);
+
+ // Set the PDBR
+ __writecr3((ULONG_PTR)PDE);
+
+ // Enable paging by modifying CR0
+ __writecr0(__readcr0() | CR0_PG);
// Kernel expects the PCR to be zero-filled on startup
// FIXME: Why zero it here when we can zero it right after allocation?
@@ -937,3 +536,25 @@
ret
*/
}
+
+VOID
+MempDump()
+{
+ ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000;
+ int i, j;
+
+ DPRINTM(DPRINT_WINDOWS, "\nPDE\n");
+
+ for (i=0; i<128; i++)
+ {
+ DPRINTM(DPRINT_WINDOWS, "0x%04X | ", i*8);
+
+ for (j=0; j<8; j++)
+ {
+ DPRINTM(DPRINT_WINDOWS, "0x%08X ", PDE_Addr[i*8+j]);
+ }
+
+ DPRINTM(DPRINT_WINDOWS, "\n");
+ }
+}
+
Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -413,7 +413,7 @@
if (SizeOfRawData < VirtualSize)
{
DPRINTM(DPRINT_PELOADER, "WinLdrLoadImage(): SORD %d < VS %d\n",
SizeOfRawData, VirtualSize);
- RtlZeroMemory((PVOID)(SectionHeader->VirtualAddress + (ULONG)PhysicalBase +
SizeOfRawData), VirtualSize - SizeOfRawData);
+ RtlZeroMemory((PVOID)(SectionHeader->VirtualAddress + (ULONG_PTR)PhysicalBase +
SizeOfRawData), VirtualSize - SizeOfRawData);
}
SectionHeader++;
@@ -428,7 +428,7 @@
/* Relocate the image, if it needs it */
- if (NtHeaders->OptionalHeader.ImageBase != (ULONG)VirtualBase)
+ if (NtHeaders->OptionalHeader.ImageBase != (ULONG_PTR)VirtualBase)
{
DPRINTM(DPRINT_PELOADER, "Relocating %p -> %p\n",
NtHeaders->OptionalHeader.ImageBase, VirtualBase);
@@ -535,7 +535,7 @@
/* AddressOfData in thunk entry will become a virtual address (from relative) */
//DPRINTM(DPRINT_PELOADER, "WinLdrpBindImportName(): ThunkData->u1.AOD was
%p\n", ThunkData->u1.AddressOfData);
ThunkData->u1.AddressOfData =
- (ULONG)RVA(ImageBase, ThunkData->u1.AddressOfData);
+ (ULONG_PTR)RVA(ImageBase, ThunkData->u1.AddressOfData);
//DPRINTM(DPRINT_PELOADER, "WinLdrpBindImportName(): ThunkData->u1.AOD became
%p\n", ThunkData->u1.AddressOfData);
}
@@ -637,11 +637,11 @@
FunctionTable = (PULONG)VaToPa(RVA(DllBase, ExportDirectory->AddressOfFunctions));
/* Save a pointer to the function */
- ThunkData->u1.Function = (ULONG)RVA(DllBase, FunctionTable[Ordinal]);
+ ThunkData->u1.Function = (ULONG_PTR)RVA(DllBase, FunctionTable[Ordinal]);
/* Is it a forwarder? (function pointer isn't within the export directory) */
- if (((ULONG)VaToPa((PVOID)ThunkData->u1.Function) > (ULONG)ExportDirectory)
&&
- ((ULONG)VaToPa((PVOID)ThunkData->u1.Function) < ((ULONG)ExportDirectory +
ExportSize)))
+ if (((ULONG_PTR)VaToPa((PVOID)ThunkData->u1.Function) >
(ULONG_PTR)ExportDirectory) &&
+ ((ULONG_PTR)VaToPa((PVOID)ThunkData->u1.Function) < ((ULONG_PTR)ExportDirectory +
ExportSize)))
{
PLDR_DATA_TABLE_ENTRY DataTableEntry;
CHAR ForwardDllName[255];
@@ -692,7 +692,7 @@
ImportByName->Hint = 0;
/* And finally point ThunkData's AddressOfData to that structure */
- RefThunkData.u1.AddressOfData = (ULONG)ImportByName;
+ RefThunkData.u1.AddressOfData = (ULONG_PTR)ImportByName;
/* And recursively call ourselves */
Status = WinLdrpBindImportName(
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -417,7 +417,7 @@
PCHAR PathSeparator;
PVOID NtosBase = NULL, HalBase = NULL, KdComBase = NULL;
BOOLEAN Status;
- ULONG SectionId;
+ ULONG_PTR SectionId;
PLOADER_PARAMETER_BLOCK LoaderBlock, LoaderBlockVA;
KERNEL_ENTRY_POINT KiSystemStartup;
PLDR_DATA_TABLE_ENTRY KernelDTE, HalDTE, KdComDTE = NULL;
Copied: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c (from r43598,
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c
[iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -14,10 +14,6 @@
#include <debug.h>
extern ULONG LoaderPagesSpanned;
-
-// This is needed because headers define wrong one for ReactOS
-#undef KIP0PCRADDRESS
-#define KIP0PCRADDRESS 0xffdff000
PCHAR MemTypeDesc[] = {
"ExceptionBlock ", // ?
@@ -63,7 +59,7 @@
WinLdrRemoveDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR Descriptor);
VOID
-WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss);
+WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG_PTR Pcr, IN ULONG_PTR Tss);
BOOLEAN
MempAllocatePageTables();
Propchange: trunk/reactos/dll/directx/d3d8/d3d8.spec
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/dll/directx/d3d8/d3d8.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36930,36936,38148-38151,38264-38265,38268,38355,39333,39345,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/directx/d3d8/d3d8.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36930,36936,38148-38151,38264-38265,38268,38355,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/dll/directx/dsound_new/classfactory.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,2 +1,2 @@
-/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/classfactory.c:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,40122-40123,40125,40155,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/classfactory.c:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,39639,40122-40123,40125,40155,40247,40324,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
/branches/ros-amd64-bringup/reactos/dll/win32/netshell/classfactory.c:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41030,41050,41052,41082-41086,41499,41549,43080,43426,43454,43677,43682
Propchange: trunk/reactos/dll/directx/dsound_new/dsound.spec
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/dll/directx/dsound/dsound.spec:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41030,41050,41052,41082-41086,41499,41549,43080,43426,43454,43677,43682
-/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/dsound.spec:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,40122-40123,40125,40155,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/dsound.spec:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,39639,40122-40123,40125,40155,40247,40324,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/dll/directx/dsound_new/regsvr.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/dll/directx/dsound/regsvr.c:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41030,41050,41052,41082-41086,41499,41549,43080,43426,43454,43677,43682
-/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/regsvr.c:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,40122-40123,40125,40155,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/regsvr.c:35683,35762,35777,35827,36172,36502-36503,36505,36936,38149-38150,38264,38355,39639,40122-40123,40125,40155,40247,40324,40753,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857,43860,43905,43907,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/dll/shellext/devcpux/devcpux.spec
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/dll/shellext/devcpux/devcpux.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39333,39345,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/shellext/devcpux/devcpux.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/dll/shellext/slayer/slayer.spec
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/dll/shellext/slayer/slayer.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39333,39345,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/dll/shellext/slayer/slayer.spec:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41029,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41484,41549,43080,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/include/ndk/amd64/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/include/ndk/amd64:34925,34967,34970,35323-35324,35347-35348,35361,35436,35509,35588,35683,35739,35762,35777,35823,35827,35952,35966,36172,36360,36445,36502-36503,36505,36899,36936,37323,37434,37472,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44178,44218,44294,44338,44389,44391,44460,44491,44500,44601,44623,44631
+/branches/ros-amd64-bringup/reactos/include/ndk/amd64:34925,34967,34970,35323-35324,35347-35348,35361,35436,35509,35588,35683,35739,35762,35777,35823,35827,35952,35966,36172,36360,36445,36502-36503,36505,36899,36936,37323,37434,37472,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,39639,40088,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44178,44205,44218,44294,44338,44389,44391,44426,44460,44491,44500,44530,44540,44601,44623,44631
Propchange: trunk/reactos/include/ndk/amd64/asmmacro.S
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/include/ndk/amd64/asmmacro.S:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44178,44218,44294,44338,44389,44391,44460,44491,44500,44601,44623,44631
+/branches/ros-amd64-bringup/reactos/include/ndk/amd64/asmmacro.S:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,39639,40088,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44178,44205,44218,44294,44338,44389,44391,44426,44460,44491,44500,44530,44540,44601,44623,44631
Propchange: trunk/reactos/lib/sdk/crt/time/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,3 +1,3 @@
-/branches/ros-amd64-bringup/reactos/lib/sdk/crt/time:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/lib/sdk/crt/time:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
/branches/ros-amd64-bringup/reactos/lib/sdk/crt/time_new:42414
/trunk/reactos/lib/sdk/crt/time_new:39350-42241
Modified: trunk/reactos/ntoskrnl/include/internal/arm/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -71,6 +71,23 @@
KeArmInvalidateTlbEntry(Address);
}
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ //
+ // We need to implement this!
+ //
+ ASSERTMSG("Need ARM flush routine\n", FALSE);
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+ /* FIXME */
+}
+
VOID
KiPassiveRelease(
VOID
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -75,6 +75,39 @@
{
/* Invalidate the TLB entry for this address */
__invlpg(Address);
+}
+
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB by resetting CR3 */
+ __writecr3(__readcr3());
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ /* Return the current thread */
+ return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread;
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+#ifndef CONFIG_SMP
+ /* Check if this is the NPX Thread */
+ if (KeGetCurrentPrcb()->NpxThread == Thread)
+ {
+ /* Clear it */
+ KeGetCurrentPrcb()->NpxThread = NULL;
+ Ke386FnInit();
+ }
+#else
+ /* Nothing to do */
+#endif
}
VOID
Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] Sun Dec 20 14:30:35 2009
@@ -8,19 +8,6 @@
#ifndef _M_ARM
FORCEINLINE
-PRKTHREAD
-KeGetCurrentThread(VOID)
-{
-#ifdef _M_IX86
- /* Return the current thread */
- return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread;
-#else
- PKPRCB Prcb = KeGetCurrentPrcb();
- return Prcb->CurrentThread;
-#endif
-}
-
-FORCEINLINE
UCHAR
KeGetPreviousMode(VOID)
{
@@ -28,23 +15,6 @@
return KeGetCurrentThread()->PreviousMode;
}
#endif
-
-FORCEINLINE
-VOID
-KeFlushProcessTb(VOID)
-{
- /* Flush the TLB by resetting CR3 */
-#ifdef _M_PPC
- __asm__("sync\n\tisync\n\t");
-#elif _M_ARM
- //
- // We need to implement this!
- //
- ASSERTMSG("Need ARM flush routine\n", FALSE);
-#else
- __writecr3(__readcr3());
-#endif
-}
//
// Enters a Guarded Region
@@ -302,21 +272,6 @@
FORCEINLINE
VOID
-KiRundownThread(IN PKTHREAD Thread)
-{
-#if defined(_M_IX86) || defined(_M_AMD64)
- /* Check if this is the NPX Thread */
- if (KeGetCurrentPrcb()->NpxThread == Thread)
- {
- /* Clear it */
- KeGetCurrentPrcb()->NpxThread = NULL;
- Ke386FnInit();
- }
-#endif
-}
-
-FORCEINLINE
-VOID
KiRequestApcInterrupt(IN BOOLEAN NeedApc,
IN UCHAR Processor)
{
@@ -655,14 +610,6 @@
{
/* Scan the deferred ready lists if required */
if (Prcb->DeferredReadyListHead.Next) KiProcessDeferredReadyList(Prcb);
-}
-
-FORCEINLINE
-VOID
-KiRundownThread(IN PKTHREAD Thread)
-{
- /* Nothing to do */
- return;
}
FORCEINLINE
Modified: trunk/reactos/ntoskrnl/include/internal/powerpc/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/powerpc/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/powerpc/ke.h [iso-8859-1] Sun Dec 20 14:30:35
2009
@@ -77,6 +77,29 @@
return (struct _KPCR *)__readfsdword(0x1c);
}
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB */
+ __asm__("sync\n\tisync\n\t");
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ /* Return the current thread */
+ return KeGetCurrentPrcb()->CurrentThread;
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+ /* FIXME */
+}
+
#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
VOID
NTAPI
Propchange: trunk/reactos/subsystems/win32/win32k/include/engobjects.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,40095,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39639,40095,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/log2lines.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/log2lines.mak
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.mak:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.mak:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,38149-38150,38264,38268,38355,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/rsym.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,40122-40123,40125,40128,40155,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,39639,40122-40123,40125,40128,40155,40247,40324,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/rsym.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,40122-40123,40125,40128,40155,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,39639,40122-40123,40125,40128,40155,40247,40324,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/rsym.mak
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.mak:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,40122-40123,40125,40128,40155,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.mak:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,39639,40122-40123,40125,40128,40155,40247,40324,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601
Propchange: trunk/reactos/tools/rsym/rsym_common.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 20 14:30:35 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/tools/rsym/rsym_common.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,40122-40123,40125,40128,40155,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/tools/rsym/rsym_common.c:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37291,37302,37305,37320,37329,37462,37895,38129,38149-38150,38264,38268,38330-38331,38341,38355,38947,38973,39072,39114,39121,39639,40122-40123,40125,40128,40155,40247,40324,40605,40753,40928,40986-40987,40989,40993,40995-40996,41001,41028-41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43506,43566,43574,43598,43600-43602,43604-43605,43757,43775,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44294,44338,44389,44391,44426,44460,44530,44540,44601