[CRT]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 19 Apr 2015 10:03:21 +0000 (10:03 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 19 Apr 2015 10:03:21 +0000 (10:03 +0000)
Add ARM stubs for _abnormal_termination, _except_handler2, _except_handler3, _global_unwind2, _local_unwind2, __C_specific_handler, __CxxFrameHandler, __rt_srsh

[RTL]
Add ARM stubs for RtlGetCallersAddress, RtlDispatchException, RtlUnwind, RtlInitializeContext

[NTOSKRNL]
Add ARM stubs for READ/WRITE_REGISTER_*

svn path=/trunk/; revision=67294

reactos/lib/rtl/arm/except.c [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/_abnormal_termination.s [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/_except_handler2.s [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/_except_handler3.s [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/_global_unwind2.s [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/_local_unwind2.s [new file with mode: 0644]
reactos/lib/sdk/crt/except/arm/ehandler.c [new file with mode: 0644]
reactos/lib/sdk/crt/math/arm/__rt_srsh.s [new file with mode: 0644]
reactos/ntoskrnl/ex/arm/ioport.s [new file with mode: 0644]
reactos/ntoskrnl/ke/arm/interrupt.c [new file with mode: 0644]

diff --git a/reactos/lib/rtl/arm/except.c b/reactos/lib/rtl/arm/except.c
new file mode 100644 (file)
index 0000000..c205ea7
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS Run-Time Library
+ * PURPOSE:           User-mode exception support for IA-32
+ * FILE:              lib/rtl/arm/exception.c
+ * PROGRAMERS:
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <rtl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* PUBLIC FUNCTIONS **********************************************************/
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+RtlGetCallersAddress(
+    _Out_ PVOID *CallersAddress,
+    _Out_ PVOID *CallersCaller)
+{
+    ASSERT(FALSE);
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+RtlDispatchException(
+    _In_ PEXCEPTION_RECORD ExceptionRecord,
+    _In_ PCONTEXT Context)
+{
+    ASSERT(FALSE);
+    return FALSE;
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+RtlUnwind(
+    _In_opt_ PVOID TargetFrame,
+    _In_opt_ PVOID TargetIp,
+    _In_opt_ PEXCEPTION_RECORD ExceptionRecord,
+    _In_ PVOID ReturnValue)
+{
+    ASSERT(FALSE);
+}
+
+VOID
+NTAPI
+RtlInitializeContext(
+    IN HANDLE ProcessHandle,
+    OUT PCONTEXT ThreadContext,
+    IN PVOID ThreadStartParam  OPTIONAL,
+    IN PTHREAD_START_ROUTINE ThreadStartAddress,
+    IN PINITIAL_TEB StackBase)
+{
+}
+
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/_abnormal_termination.s b/reactos/lib/sdk/crt/except/arm/_abnormal_termination.s
new file mode 100644 (file)
index 0000000..ad6cb35
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of _abnormal_termination
+ * FILE:              lib/sdk/crt/except/arm/_abnormal_termination.s
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY _abnormal_termination
+    DCD 0xdefc // __assertfail
+    bx lr
+    LEAF_END _abnormal_termination
+
+    END
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/_except_handler2.s b/reactos/lib/sdk/crt/except/arm/_except_handler2.s
new file mode 100644 (file)
index 0000000..aa235f3
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of _except_handler2
+ * FILE:              lib/sdk/crt/except/arm/_except_handler2.s
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY _except_handler2
+    DCD 0xdefc // __assertfail
+    bx lr
+    LEAF_END _except_handler2
+
+    END
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/_except_handler3.s b/reactos/lib/sdk/crt/except/arm/_except_handler3.s
new file mode 100644 (file)
index 0000000..acbd99a
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of _except_handler3
+ * FILE:              lib/sdk/crt/except/arm/_except_handler3.s
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY _except_handler3
+    DCD 0xdefc // __assertfail
+    bx lr
+    LEAF_END _except_handler3
+
+    END
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/_global_unwind2.s b/reactos/lib/sdk/crt/except/arm/_global_unwind2.s
new file mode 100644 (file)
index 0000000..e88f5da
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of _global_unwind2
+ * FILE:              lib/sdk/crt/except/arm/_global_unwind2.s
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY _global_unwind2
+    DCD 0xdefc // __assertfail
+    bx lr
+    LEAF_END _global_unwind2
+
+    END
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/_local_unwind2.s b/reactos/lib/sdk/crt/except/arm/_local_unwind2.s
new file mode 100644 (file)
index 0000000..b2270d1
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of _local_unwind2
+ * FILE:              lib/sdk/crt/except/arm/_local_unwind2.s
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY _local_unwind2
+    DCD 0xdefc // __assertfail
+    bx lr
+    LEAF_END _local_unwind2
+
+    END
+/* EOF */
diff --git a/reactos/lib/sdk/crt/except/arm/ehandler.c b/reactos/lib/sdk/crt/except/arm/ehandler.c
new file mode 100644 (file)
index 0000000..aee41d0
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+* PROJECT:         ReactOS Kernel
+* LICENSE:         GPL - See COPYING in the top level directory
+* FILE:            lib/sdk/crt/except/ehandler.c
+* PURPOSE:         Low level exception handler functions
+* PROGRAMMERS:     Timo Kreuzer (timo.kreuzer@reactos.org)
+*/
+
+/* INCLUDES *****************************************************************/
+
+#include <precomp.h>
+
+_CRTIMP
+EXCEPTION_DISPOSITION
+__cdecl
+__C_specific_handler(
+    struct _EXCEPTION_RECORD *_ExceptionRecord,
+    void *_EstablisherFrame,
+    struct _CONTEXT *_ContextRecord,
+    struct _DISPATCHER_CONTEXT *_DispatcherContext)
+{
+    UNIMPLEMENTED;
+    __debugbreak();
+    return 0;
+}
+
+DWORD
+__CxxFrameHandler(
+    PEXCEPTION_RECORD rec,
+    EXCEPTION_REGISTRATION_RECORD* ExceptionRegistrationFrame,
+    PCONTEXT context,
+    EXCEPTION_REGISTRATION_RECORD** _ExceptionRecord)
+{
+    UNIMPLEMENTED;
+    __debugbreak();
+    return 0;
+}
+
diff --git a/reactos/lib/sdk/crt/math/arm/__rt_srsh.s b/reactos/lib/sdk/crt/math/arm/__rt_srsh.s
new file mode 100644 (file)
index 0000000..92a27c5
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Implementation of __rt_srsh
+ * PROGRAMMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <kxarm.h>
+
+/* CODE **********************************************************************/
+    TEXTAREA
+
+    LEAF_ENTRY __rt_srsh
+
+    LEAF_END __rt_srsh
+
+    END
+/* EOF */
diff --git a/reactos/ntoskrnl/ex/arm/ioport.s b/reactos/ntoskrnl/ex/arm/ioport.s
new file mode 100644 (file)
index 0000000..9f12e44
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+* PROJECT:         ReactOS Kernel
+* LICENSE:         GPL - See COPYING in the top level directory
+* FILE:            ntoskrnl/ex/arm/ioport.s
+* PURPOSE:         Low level port communication functions for ARM
+* PROGRAMMERS:     Timo Kreuzer (timo.kreuzer@reactos.org)
+*/
+
+/* INCLUDES *****************************************************************/
+
+#include <ksarm.h>
+
+#define __assertfail DCD 0xDEFC
+
+    TEXTAREA
+
+    LEAF_ENTRY READ_REGISTER_UCHAR
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_UCHAR
+
+    LEAF_ENTRY READ_REGISTER_USHORT
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_USHORT
+
+    LEAF_ENTRY READ_REGISTER_ULONG
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_ULONG
+
+    LEAF_ENTRY WRITE_REGISTER_UCHAR
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_UCHAR
+
+    LEAF_ENTRY WRITE_REGISTER_USHORT
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_USHORT
+
+    LEAF_ENTRY WRITE_REGISTER_ULONG
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_ULONG
+
+
+    LEAF_ENTRY READ_REGISTER_BUFFER_UCHAR
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_BUFFER_UCHAR
+
+    LEAF_ENTRY READ_REGISTER_BUFFER_USHORT
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_BUFFER_USHORT
+
+    LEAF_ENTRY READ_REGISTER_BUFFER_ULONG
+    __assertfail
+    bx lr
+    LEAF_END READ_REGISTER_BUFFER_ULONG
+
+    LEAF_ENTRY WRITE_REGISTER_BUFFER_UCHAR
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_BUFFER_UCHAR
+
+    LEAF_ENTRY WRITE_REGISTER_BUFFER_USHORT
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_BUFFER_USHORT
+
+    LEAF_ENTRY WRITE_REGISTER_BUFFER_ULONG
+    __assertfail
+    bx lr
+    LEAF_END WRITE_REGISTER_BUFFER_ULONG
+
+    END
+/* EOF */
diff --git a/reactos/ntoskrnl/ke/arm/interrupt.c b/reactos/ntoskrnl/ke/arm/interrupt.c
new file mode 100644 (file)
index 0000000..6bda901
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * PROJECT:         ReactOS Kernel
+ * LICENSE:         BSD - See COPYING.ARM in the top level directory
+ * FILE:            ntoskrnl/ke/arm/interrupt.c
+ * PURPOSE:         Implements interrupt related routines for ARM machines
+ * PROGRAMMERS:
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ******************************************************************/
+
+VOID
+NTAPI
+KeInitializeInterrupt(IN PKINTERRUPT Interrupt,
+                      IN PKSERVICE_ROUTINE ServiceRoutine,
+                      IN PVOID ServiceContext,
+                      IN PKSPIN_LOCK SpinLock,
+                      IN ULONG Vector,
+                      IN KIRQL Irql,
+                      IN KIRQL SynchronizeIrql,
+                      IN KINTERRUPT_MODE InterruptMode,
+                      IN BOOLEAN ShareVector,
+                      IN CHAR ProcessorNumber,
+                      IN BOOLEAN FloatingSave)
+{
+    ASSERT(FALSE);
+}
+
+BOOLEAN
+NTAPI
+KeConnectInterrupt(IN PKINTERRUPT Interrupt)
+{
+    ASSERT(FALSE);
+    return FALSE;
+}
+
+BOOLEAN
+NTAPI
+KeDisconnectInterrupt(IN PKINTERRUPT Interrupt)
+{
+    ASSERT(FALSE);
+    return FALSE;
+}
+
+VOID
+KiUnexpectedInterrupt(VOID)
+{
+    /* Crash the machine */
+    KeBugCheck(TRAP_CAUSE_UNKNOWN);
+}
+
+BOOLEAN
+NTAPI
+KeSynchronizeExecution(
+    IN OUT PKINTERRUPT Interrupt,
+    IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
+    IN PVOID SynchronizeContext OPTIONAL)
+{
+    ASSERT(FALSE);
+    return FALSE;
+}
+