mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ARM]: Fix the ARM build, hopefully without breaking the x86 build in the process. Sorry buds!
svn path=/trunk/; revision=45368
This commit is contained in:
parent
6aa9cce4bb
commit
02c2d27111
15 changed files with 80 additions and 54 deletions
|
@ -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" />
|
||||
|
|
|
@ -1016,7 +1016,7 @@ ArmSetupPagingAndJump(IN ULONG Magic)
|
|||
//
|
||||
// Jump to Kernel
|
||||
//
|
||||
(*KernelEntryPoint)(Magic, (PVOID)((ULONG_PTR)ArmLoaderBlock | KSEG0_BASE));
|
||||
(*KernelEntryPoint)((PVOID)((ULONG_PTR)ArmLoaderBlock | KSEG0_BASE));
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
|
@ -24,6 +24,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 **********************************************************************/
|
||||
|
||||
ULONG HalpCurrentTimeIncrement, HalpNextTimeIncrement, HalpNextIntervalCount;
|
||||
|
@ -256,9 +264,9 @@ HalAssignSlotResources(
|
|||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalBeginSystemInterrupt (KIRQL Irql,
|
||||
ULONG Vector,
|
||||
PKIRQL OldIrql)
|
||||
HalBeginSystemInterrupt(IN KIRQL Irql,
|
||||
IN UCHAR Vector,
|
||||
OUT PKIRQL OldIrql)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
||||
|
@ -278,8 +286,8 @@ HalCalibratePerformanceCounter(
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
HalDisableSystemInterrupt(ULONG Vector,
|
||||
KIRQL Irql)
|
||||
HalDisableSystemInterrupt(IN UCHAR Vector,
|
||||
IN KIRQL Irql)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
@ -330,10 +338,9 @@ HalSetDisplayParameters(IN ULONG CursorPosX,
|
|||
|
||||
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 @@ HalEnableSystemInterrupt(
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
HalEndSystemInterrupt(
|
||||
KIRQL Irql,
|
||||
ULONG Unknown2)
|
||||
HalEndSystemInterrupt(IN KIRQL OldIrql,
|
||||
IN PKTRAP_FRAME TrapFrame)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -343,6 +343,7 @@ typedef struct _KPRCB
|
|||
ULONG KeDcacheFlushCount;
|
||||
ULONG KeExceptionDispatchCount;
|
||||
ULONG KeFirstLevelTbFills;
|
||||
ULONG KeFloatingEmulationCount;
|
||||
ULONG KeIcacheFlushCount;
|
||||
ULONG KeSecondLevelTbFills;
|
||||
ULONG KeSystemCalls;
|
||||
|
|
|
@ -891,12 +891,7 @@ NtInitializeRegistry(IN USHORT Flag)
|
|||
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;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "intrin_i.h"
|
||||
|
||||
#define KiServiceExit2 KiExceptionExit
|
||||
|
||||
//
|
||||
//Lockdown TLB entries
|
||||
//
|
||||
|
@ -91,9 +93,13 @@ KiRundownThread(IN PKTHREAD Thread)
|
|||
VOID
|
||||
KiPassiveRelease(
|
||||
VOID
|
||||
|
||||
);
|
||||
|
||||
VOID
|
||||
KiSystemService(IN PKTHREAD Thread,
|
||||
IN PKTRAP_FRAME TrapFrame,
|
||||
IN ULONG Instruction);
|
||||
|
||||
VOID
|
||||
KiApcInterrupt(
|
||||
VOID
|
||||
|
@ -113,7 +119,11 @@ KeFlushTb(
|
|||
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
|
||||
|
|
|
@ -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 UCHAR KiDebugRegisterContextOffsets[9];
|
|||
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 @@ KiSwitchToBootStack(IN ULONG_PTR InitialStack)
|
|||
);
|
||||
}
|
||||
|
||||
//
|
||||
// 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 */
|
||||
|
|
|
@ -140,6 +140,7 @@ extern ULONG KiDPCTimeout;
|
|||
extern PGDI_BATCHFLUSH_ROUTINE KeGdiFlushUserBatch;
|
||||
extern ULONGLONG BootCycles, BootCyclesEnd;
|
||||
extern ULONG ProcessCount;
|
||||
extern VOID __cdecl KiInterruptTemplate(VOID);
|
||||
|
||||
/* MACROS *************************************************************************/
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ KINTERRUPT KxUnexpectedInterrupt;
|
|||
BOOLEAN KeIsArmV6;
|
||||
ULONG KeNumberProcessIds;
|
||||
ULONG KeNumberTbEntries;
|
||||
ULONG ProcessCount; // PERF
|
||||
extern PVOID KiArmVectorTable;
|
||||
#define __ARMV6__ KeIsArmV6
|
||||
|
||||
|
@ -114,7 +115,7 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
|
|||
//
|
||||
// Copy the template code
|
||||
//
|
||||
KxUnexpectedInterrupt.DispatchCode[i] = KiInterruptTemplate[i];
|
||||
KxUnexpectedInterrupt.DispatchCode[i] = ((PULONG)KiInterruptTemplate)[i];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -15,7 +15,6 @@ GENERATE_ARM_STUB RtlpGetStackLimits
|
|||
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 RtlInitializeContext
|
|||
GENERATE_ARM_STUB KeUserModeCallback
|
||||
GENERATE_ARM_STUB KiCallUserMode
|
||||
GENERATE_ARM_STUB NtCallbackReturn
|
||||
GENERATE_ARM_STUB NtContinue
|
||||
|
|
|
@ -127,7 +127,6 @@
|
|||
TRAP_EPILOG 0 // NotFromSystemCall
|
||||
ENTRY_END KiExceptionExit
|
||||
|
||||
|
||||
NESTED_ENTRY KiServiceExit
|
||||
PROLOG_END KiServiceExit
|
||||
//
|
||||
|
|
|
@ -180,10 +180,12 @@ NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord,
|
|||
/* 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 @@ NtContinue(IN PCONTEXT Context,
|
|||
/* 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);
|
||||
|
|
|
@ -113,11 +113,7 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
|||
}
|
||||
|
||||
/* Disable interrupts and end the interrupt */
|
||||
_disable();
|
||||
HalEndSystemInterrupt(Irql, TrapFrame);
|
||||
|
||||
/* Exit the interrupt */
|
||||
KiEoiHelper(TrapFrame);
|
||||
KiEndInterrupt(Irql, TrapFrame);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
|
@ -57,6 +57,7 @@ PVOID MmSystemRangeStart;
|
|||
PVOID MmSystemCacheStart;
|
||||
PVOID MmSystemCacheEnd;
|
||||
MMSUPPORT MmSystemCacheWs;
|
||||
PVOID MmHyperSpaceEnd;
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
|
|
|
@ -845,16 +845,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
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:
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue