Author: sir_richard
Date: Mon Feb 1 04:51:45 2010
New Revision: 45368
URL:
http://svn.reactos.org/svn/reactos?rev=45368&view=rev
Log:
[ARM]: Fix the ARM build, hopefully without breaking the x86 build in the process. Sorry
buds!
Modified:
trunk/reactos/ReactOS-arm.rbuild
trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c
trunk/reactos/hal/halarm/generic/hal.c
trunk/reactos/include/ndk/arm/ketypes.h
trunk/reactos/ntoskrnl/config/ntapi.c
trunk/reactos/ntoskrnl/include/internal/arm/ke.h
trunk/reactos/ntoskrnl/include/internal/i386/ke.h
trunk/reactos/ntoskrnl/include/internal/ke.h
trunk/reactos/ntoskrnl/ke/arm/kiinit.c
trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s
trunk/reactos/ntoskrnl/ke/arm/trap.s
trunk/reactos/ntoskrnl/ke/except.c
trunk/reactos/ntoskrnl/ke/time.c
trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ReactOS-arm.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=453…
==============================================================================
--- trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -111,17 +111,7 @@
<xi:include href="ntoskrnl/ntoskrnl.rbuild" />
</directory>
<directory name="hal">
- <directory name="halarm">
- <directory name="generic">
- <xi:include href="hal/halarm/generic/generic.rbuild" />
- </directory>
- <directory name="up">
- <xi:include href="hal/halarm/up/halup.rbuild" />
- </directory>
- </directory>
- <directory name="hal">
- <xi:include href="hal/hal/hal.rbuild" />
- </directory>
+ <xi:include href="hal/hal.rbuild" />
</directory>
<directory name="boot">
<xi:include href="boot/boot.rbuild" />
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] Mon Feb 1 04:51:45
2010
@@ -1016,7 +1016,7 @@
//
// Jump to Kernel
//
- (*KernelEntryPoint)(Magic, (PVOID)((ULONG_PTR)ArmLoaderBlock | KSEG0_BASE));
+ (*KernelEntryPoint)((PVOID)((ULONG_PTR)ArmLoaderBlock | KSEG0_BASE));
}
VOID
Modified: trunk/reactos/hal/halarm/generic/hal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halarm/generic/hal.c?r…
==============================================================================
--- trunk/reactos/hal/halarm/generic/hal.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halarm/generic/hal.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -23,6 +23,14 @@
#define READ_REGISTER_ULONG(r) (*((volatile ULONG * const)(r)))
#define WRITE_REGISTER_ULONG(r, v) (*((volatile ULONG *)(r)) = (v))
+
+VOID
+FASTCALL
+KeUpdateSystemTime(
+ IN PKTRAP_FRAME TrapFrame,
+ IN ULONG Increment,
+ IN KIRQL OldIrql
+);
/* DATA **********************************************************************/
@@ -256,9 +264,9 @@
BOOLEAN
NTAPI
-HalBeginSystemInterrupt (KIRQL Irql,
- ULONG Vector,
- PKIRQL OldIrql)
+HalBeginSystemInterrupt(IN KIRQL Irql,
+ IN UCHAR Vector,
+ OUT PKIRQL OldIrql)
{
UNIMPLEMENTED;
@@ -278,8 +286,8 @@
VOID
NTAPI
-HalDisableSystemInterrupt(ULONG Vector,
- KIRQL Irql)
+HalDisableSystemInterrupt(IN UCHAR Vector,
+ IN KIRQL Irql)
{
UNIMPLEMENTED;
}
@@ -330,10 +338,9 @@
BOOLEAN
NTAPI
-HalEnableSystemInterrupt(
- ULONG Vector,
- KIRQL Irql,
- KINTERRUPT_MODE InterruptMode)
+HalEnableSystemInterrupt(IN UCHAR Vector,
+ IN KIRQL Irql,
+ IN KINTERRUPT_MODE InterruptMode)
{
UNIMPLEMENTED;
@@ -343,9 +350,8 @@
VOID
NTAPI
-HalEndSystemInterrupt(
- KIRQL Irql,
- ULONG Unknown2)
+HalEndSystemInterrupt(IN KIRQL OldIrql,
+ IN PKTRAP_FRAME TrapFrame)
{
UNIMPLEMENTED;
}
Modified: trunk/reactos/include/ndk/arm/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/ketypes.h?…
==============================================================================
--- trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -343,6 +343,7 @@
ULONG KeDcacheFlushCount;
ULONG KeExceptionDispatchCount;
ULONG KeFirstLevelTbFills;
+ ULONG KeFloatingEmulationCount;
ULONG KeIcacheFlushCount;
ULONG KeSecondLevelTbFills;
ULONG KeSystemCalls;
Modified: trunk/reactos/ntoskrnl/config/ntapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/ntapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -891,12 +891,7 @@
if (KeGetPreviousMode() == UserMode) return ZwInitializeRegistry(Flag);
/* Enough of the system has booted by now */
- BootCyclesEnd = __rdtsc();
- DPRINT1("Boot took %I64d cycles!\n", BootCyclesEnd - BootCycles);
- DPRINT1("Interrupts: %d System Calls: %d Context Switches: %d\n",
- KeGetCurrentPrcb()->InterruptCount,
- KeGetCurrentPrcb()->KeSystemCalls,
- KeGetContextSwitches(KeGetCurrentPrcb()));
+ Ki386PerfEnd();
/* Validate flag */
if (Flag > CM_BOOT_FLAG_MAX) return STATUS_INVALID_PARAMETER;
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] Mon Feb 1 04:51:45
2010
@@ -2,6 +2,8 @@
#define __NTOSKRNL_INCLUDE_INTERNAL_ARM_KE_H
#include "intrin_i.h"
+
+#define KiServiceExit2 KiExceptionExit
//
//Lockdown TLB entries
@@ -91,8 +93,12 @@
VOID
KiPassiveRelease(
VOID
+);
-);
+VOID
+KiSystemService(IN PKTHREAD Thread,
+ IN PKTRAP_FRAME TrapFrame,
+ IN ULONG Instruction);
VOID
KiApcInterrupt(
@@ -113,7 +119,11 @@
VOID
);
-#define KiSystemStartupReal KiSystemStartup
+#define Ki386PerfEnd()
+#define KiEndInterrupt(x,y)
+
+#define KiGetLinkedTrapFrame(x) \
+ (PKTRAP_FRAME)((x)->PreviousTrapFrame)
#define KiGetPreviousMode(tf) \
((tf->Spsr & CPSR_MODES) == CPSR_USER_MODE) ? UserMode: KernelMode
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] Mon Feb 1 04:51:45
2010
@@ -33,6 +33,9 @@
#define KeGetTrapFramePc(TrapFrame) \
((TrapFrame)->Eip)
+#define KiGetLinkedTrapFrame(x) \
+ (PKTRAP_FRAME)((x)->Edx)
+
#define KeGetContextReturnRegister(Context) \
((Context)->Eax)
@@ -451,7 +454,6 @@
extern VOID __cdecl KiTrap02(VOID);
extern VOID __cdecl KiTrap08(VOID);
extern VOID __cdecl KiTrap13(VOID);
-extern VOID __cdecl KiInterruptTemplate(VOID);
extern VOID __cdecl KiFastCallEntry(VOID);
extern VOID NTAPI ExpInterlockedPopEntrySListFault(VOID);
extern VOID __cdecl CopyParams(VOID);
@@ -740,5 +742,38 @@
);
}
+//
+// Normally this is done by the HAL, but on x86 as an optimization, the kernel
+// initiates the end by calling back into the HAL and exiting the trap here.
+//
+VOID
+FORCEINLINE
+KiEndInterrupt(IN KIRQL Irql,
+ IN PKTRAP_FRAME TrapFrame)
+{
+ /* Disable interrupts and end the interrupt */
+ _disable();
+ HalEndSystemInterrupt(Irql, TrapFrame);
+
+ /* Exit the interrupt */
+ KiEoiHelper(TrapFrame);
+}
+
+//
+// PERF Code
+//
+VOID
+FORCEINLINE
+Ki386PerfEnd(VOID)
+{
+ extern ULONGLONG BootCyclesEnd, BootCycles;
+ BootCyclesEnd = __rdtsc();
+ DbgPrint("Boot took %I64d cycles!\n", BootCyclesEnd - BootCycles);
+ DbgPrint("Interrupts: %d System Calls: %d Context Switches: %d\n",
+ KeGetCurrentPrcb()->InterruptCount,
+ KeGetCurrentPrcb()->KeSystemCalls,
+ KeGetContextSwitches(KeGetCurrentPrcb()));
+}
+
#endif
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H */
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -140,6 +140,7 @@
extern PGDI_BATCHFLUSH_ROUTINE KeGdiFlushUserBatch;
extern ULONGLONG BootCycles, BootCyclesEnd;
extern ULONG ProcessCount;
+extern VOID __cdecl KiInterruptTemplate(VOID);
/* MACROS *************************************************************************/
Modified: trunk/reactos/ntoskrnl/ke/arm/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/kiinit.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -18,6 +18,7 @@
BOOLEAN KeIsArmV6;
ULONG KeNumberProcessIds;
ULONG KeNumberTbEntries;
+ULONG ProcessCount; // PERF
extern PVOID KiArmVectorTable;
#define __ARMV6__ KeIsArmV6
@@ -114,7 +115,7 @@
//
// Copy the template code
//
- KxUnexpectedInterrupt.DispatchCode[i] = KiInterruptTemplate[i];
+ KxUnexpectedInterrupt.DispatchCode[i] = ((PULONG)KiInterruptTemplate)[i];
}
//
Modified: trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/stubs_asm.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -15,7 +15,6 @@
GENERATE_ARM_STUB DbgBreakPointWithStatus
GENERATE_ARM_STUB KeRaiseUserException
GENERATE_ARM_STUB KdpGdbStubInit
-GENERATE_ARM_STUB NtRaiseException
//
// Driver ISRs
@@ -37,4 +36,3 @@
GENERATE_ARM_STUB KeUserModeCallback
GENERATE_ARM_STUB KiCallUserMode
GENERATE_ARM_STUB NtCallbackReturn
-GENERATE_ARM_STUB NtContinue
Modified: trunk/reactos/ntoskrnl/ke/arm/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/trap.s?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/trap.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/trap.s [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -127,7 +127,6 @@
TRAP_EPILOG 0 // NotFromSystemCall
ENTRY_END KiExceptionExit
-
NESTED_ENTRY KiServiceExit
PROLOG_END KiServiceExit
//
Modified: trunk/reactos/ntoskrnl/ke/except.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/except.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/except.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/except.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -180,10 +180,12 @@
/* Get trap frame and link previous one*/
Thread = KeGetCurrentThread();
TrapFrame = Thread->TrapFrame;
- Thread->TrapFrame = (PKTRAP_FRAME)TrapFrame->Edx;
+ Thread->TrapFrame = KiGetLinkedTrapFrame(TrapFrame);
/* Set exception list */
+#ifdef _M_IX86
KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList;
+#endif
/* Raise the exception */
Status = KiRaiseException(ExceptionRecord,
@@ -218,7 +220,7 @@
/* Get trap frame and link previous one*/
Thread = KeGetCurrentThread();
TrapFrame = Thread->TrapFrame;
- Thread->TrapFrame = (PKTRAP_FRAME)TrapFrame->Edx;
+ Thread->TrapFrame = KiGetLinkedTrapFrame(TrapFrame);
/* Continue from this point on */
Status = KiContinue(Context, NULL, TrapFrame);
Modified: trunk/reactos/ntoskrnl/ke/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/time.c?rev=453…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/time.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/time.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -113,11 +113,7 @@
}
/* Disable interrupts and end the interrupt */
- _disable();
- HalEndSystemInterrupt(Irql, TrapFrame);
-
- /* Exit the interrupt */
- KiEoiHelper(TrapFrame);
+ KiEndInterrupt(Irql, TrapFrame);
}
VOID
Modified: trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/arm/init.…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -57,6 +57,7 @@
PVOID MmSystemCacheStart;
PVOID MmSystemCacheEnd;
MMSUPPORT MmSystemCacheWs;
+PVOID MmHyperSpaceEnd;
/* PRIVATE FUNCTIONS **********************************************************/
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Mon Feb 1 04:51:45 2010
@@ -845,16 +845,7 @@
PspRunCreateProcessNotifyRoutines(Process, TRUE);
/* If 12 processes have been created, enough of user-mode is ready */
- if (++ProcessCount == 12)
- {
- /* Enough of the system has booted by now */
- BootCyclesEnd = __rdtsc();
- DPRINT1("User Boot took %I64d cycles!\n", BootCyclesEnd - BootCycles);
- DPRINT1("Interrupts: %d System Calls: %d Context Switches: %d\n",
- KeGetCurrentPrcb()->InterruptCount,
- KeGetCurrentPrcb()->KeSystemCalls,
- KeGetContextSwitches(KeGetCurrentPrcb()));
- }
+ if (++ProcessCount == 12) Ki386PerfEnd();
CleanupWithRef:
/*