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
This commit is contained in:
Timo Kreuzer
2015-04-19 10:03:21 +00:00
parent 75a0594a4a
commit 8d7d45ce07
10 changed files with 381 additions and 0 deletions
+67
View File
@@ -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 */
@@ -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 */
@@ -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 */
@@ -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 */
@@ -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 */
@@ -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 */
+38
View File
@@ -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 ([email protected])
*/
/* 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;
}
+20
View File
@@ -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 */
+79
View File
@@ -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 */
+67
View File
@@ -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;
}