mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
[NTOSKRNKL]
- add Ke386SetGs, Ke386SetSs macros for amd64 - fix IMAGE_FILE_MACHINE_ARCHITECTURE for amd64, fixes WinDbg kernel version detection - goto KiSystemStartupReal from KiSystemStartup directly, old boot method is now deprecated svn path=/branches/ros-amd64-bringup/; revision=43632
This commit is contained in:
@@ -132,8 +132,10 @@ static inline void Ki386Cpuid(ULONG Op, PULONG Eax, PULONG Ebx, PULONG Ecx, PULO
|
||||
#define Ke386GetSs() _Ke386GetSeg(ss)
|
||||
#define Ke386GetFs() _Ke386GetSeg(fs)
|
||||
#define Ke386SetFs(X) _Ke386SetSeg(fs, X)
|
||||
#define Ke386SetGs(X) _Ke386SetSeg(gs, X)
|
||||
#define Ke386SetDs(X) _Ke386SetSeg(ds, X)
|
||||
#define Ke386SetEs(X) _Ke386SetSeg(es, X)
|
||||
#define Ke386SetSs(X) _Ke386SetSeg(ss, X)
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct _KIDT_INIT
|
||||
|
||||
extern ULONG Ke386CacheAlignment;
|
||||
|
||||
#define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_I386
|
||||
#define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_AMD64
|
||||
|
||||
//
|
||||
// INT3 is 1 byte long
|
||||
|
||||
@@ -621,7 +621,12 @@ NTAPI
|
||||
KiSystemStartup(IN ULONG_PTR Dummy,
|
||||
IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
KiRosPrepareForSystemStartup(Dummy, LoaderBlock);
|
||||
FrLdrDbgPrint = ((PLOADER_PARAMETER_BLOCK)Dummy)->u.Amd64.DbgPrint;
|
||||
FrLdrDbgPrint("Hello from KiSystemStartup!!!\n");
|
||||
|
||||
KiSystemStartupReal((PLOADER_PARAMETER_BLOCK)Dummy);
|
||||
|
||||
// KiRosPrepareForSystemStartup(Dummy, LoaderBlock);
|
||||
}
|
||||
|
||||
|
||||
@@ -669,7 +674,7 @@ KiSystemStartupReal(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK);
|
||||
|
||||
/* LDT is unused */
|
||||
__sldt(0);
|
||||
// __lldt(0);
|
||||
|
||||
/* Align stack to 16 bytes */
|
||||
LoaderBlock->KernelStack &= ~(16 - 1);
|
||||
@@ -720,6 +725,8 @@ KiSystemStartupReal(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
|
||||
// DPRINT1("Gdt = %p, Idt = %p, Pcr = %p, Tss = %p\n", Gdt, Idt, Pcr, Tss);
|
||||
|
||||
DbgBreakPointWithStatus(0);
|
||||
|
||||
/* Initialize the Processor with HAL */
|
||||
HalInitializeProcessor(Cpu, KeLoaderBlock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user