Author: tkreuzer
Date: Sat Aug 20 10:41:44 2011
New Revision: 53334
URL:
http://svn.reactos.org/svn/reactos?rev=53334&view=rev
Log:
[NTOSKRNL]
Fix amd64 build and some warnings
Modified:
trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
trunk/reactos/ntoskrnl/kd64/kdprint.c
trunk/reactos/ntoskrnl/ke/amd64/interrupt.c
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
trunk/reactos/ntoskrnl/mm/amd64/page.c
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Sat Aug 20 10:41:44
2011
@@ -135,20 +135,18 @@
BooleanFlagOn((TrapFrame)->EFlags, EFLAGS_INTERRUPT_MASK)
/* Diable interrupts and return whether they were enabled before */
+FORCEINLINE
BOOLEAN
-NTAPI
KeDisableInterrupts(VOID)
{
- ULONG Flags;
- BOOLEAN Return;
+ ULONG_PTR Flags;
/* Get EFLAGS and check if the interrupt bit is set */
Flags = __readeflags();
- Return = (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE: FALSE;
/* Disable interrupts */
_disable();
- return Return;
+ return (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE : FALSE;
}
/* Restore previous interrupt state */
Modified: trunk/reactos/ntoskrnl/kd64/kdprint.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdprint.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] Sat Aug 20 10:41:44 2011
@@ -35,7 +35,7 @@
/* Build the packet header */
DebugIo.ApiNumber = DbgKdPrintStringApi;
- DebugIo.ProcessorLevel = KeProcessorLevel;
+ DebugIo.ProcessorLevel = (USHORT)KeProcessorLevel;
DebugIo.Processor = KeGetCurrentPrcb()->Number;
DebugIo.u.PrintString.LengthOfString = Length;
Header.Length = sizeof(DBGKD_DEBUG_IO);
@@ -76,7 +76,7 @@
/* Build the packet header */
DebugIo.ApiNumber = DbgKdGetStringApi;
- DebugIo.ProcessorLevel = KeProcessorLevel;
+ DebugIo.ProcessorLevel = (USHORT)KeProcessorLevel;
DebugIo.Processor = KeGetCurrentPrcb()->Number;
DebugIo.u.GetString.LengthOfPromptString = Length;
DebugIo.u.GetString.LengthOfStringRead = ResponseString->MaximumLength;
@@ -115,7 +115,7 @@
/* Copy back the string and return the length */
RtlCopyMemory(ResponseString->Buffer, KdpMessageBuffer, Length);
- ResponseString->Length = Length;
+ ResponseString->Length = (USHORT)Length;
/* Success; we don't need to resend */
return FALSE;
Modified: trunk/reactos/ntoskrnl/ke/amd64/interrupt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/interrup…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/interrupt.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/interrupt.c [iso-8859-1] Sat Aug 20 10:41:44 2011
@@ -16,24 +16,6 @@
#include <debug.h>
/* FUNCTIONS ****************************************************************/
-
-
-
-BOOLEAN
-NTAPI
-KeDisableInterrupts(VOID)
-{
- ULONG64 Flags;
-
- /* Get the flags */
- Flags = __readeflags();
-
- /* Disable interrupts */
- _disable();
-
- return !!(Flags & EFLAGS_INTERRUPT_MASK);
-}
-
BOOLEAN
NTAPI
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sat Aug 20 10:41:44 2011
@@ -530,7 +530,7 @@
//
// Figures out the hardware bits for a PTE
//
-ULONG
+ULONG_PTR
FORCEINLINE
MiDetermineUserGlobalPteMask(IN PVOID PointerPte)
{
Modified: trunk/reactos/ntoskrnl/mm/amd64/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/amd64/page.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sat Aug 20 10:41:44 2011
@@ -120,7 +120,7 @@
FORCEINLINE
MiIsHyperspaceAddress(PVOID Address)
{
- return ((ULONG64)Address >= HYPER_SPACE &&
+ return ((ULONG64)Address >= HYPER_SPACE &&
(ULONG64)Address <= HYPER_SPACE_END);
}
@@ -147,7 +147,7 @@
MMPTE TmplPte, *Pte;
/* Check if we need hypersapce mapping */
- if (Address < MmSystemRangeStart &&
+ if (Address < MmSystemRangeStart &&
Process && Process != PsGetCurrentProcess())
{
UNIMPLEMENTED;
@@ -313,7 +313,7 @@
{
MMPTE Pte;
Pte.u.Long = MiGetPteValueForProcess(Process, Address);
- return Pte.u.Hard.Valid;
+ return (BOOLEAN)Pte.u.Hard.Valid;
}
BOOLEAN
@@ -469,7 +469,7 @@
/* Return information to the caller */
if (WasDirty)
- *WasDirty = OldPte.u.Hard.Dirty;;
+ *WasDirty = (BOOLEAN)OldPte.u.Hard.Dirty;;
if (Page)
*Page = Pfn;
@@ -537,7 +537,7 @@
Pte = MiGetPteForProcess(Process, Address, TRUE);
-DPRINT1("MmCreateVirtualMappingUnsafe, Address=%p, TmplPte=%p, Pte=%p\n",
+DPRINT1("MmCreateVirtualMappingUnsafe, Address=%p, TmplPte=%p, Pte=%p\n",
Address, TmplPte.u.Long, Pte);
if (InterlockedExchangePte(Pte, TmplPte))
@@ -592,13 +592,13 @@
/* No page colors yet */
Process->NextPageColor = 0;
-
+
/* Setup the hyperspace lock */
KeInitializeSpinLock(&Process->HyperSpaceLock);
/* Lock PFN database */
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
-
+
/* Get a page for the table base and for hyperspace */
TableBasePfn = MiRemoveAnyPage(0);
HyperPfn = MiRemoveAnyPage(0);
@@ -647,14 +647,14 @@
/* Now write the PTE/PDE entry for hyperspace itself */
TempPte = ValidKernelPte;
TempPte.u.Hard.PageFrameNumber = HyperPfn;
- TableIndex = MiAddressToPxi(HYPER_SPACE);
+ TableIndex = MiAddressToPxi((PVOID)HYPER_SPACE);
SystemTable[TableIndex] = TempPte;
/* Sanity check */
ASSERT(MiAddressToPxi(MmHyperSpaceEnd) > TableIndex);
/* Now do the x86 trick of making the PDE a page table itself */
- TableIndex = MiAddressToPxi(PTE_BASE);
+ TableIndex = MiAddressToPxi((PVOID)PTE_BASE);
TempPte.u.Hard.PageFrameNumber = TableBasePfn;
SystemTable[TableIndex] = TempPte;