Author: tkreuzer
Date: Thu May 14 22:32:35 2015
New Revision: 67736
URL:
http://svn.reactos.org/svn/reactos?rev=67736&view=rev
Log:
[KERNEL32/KSECDD/GDI32/BMFD/DBGHELP/HALARM/SETUPLDR]
Fix ARM build
Modified:
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
trunk/reactos/dll/win32/dbghelp/cpu_arm.c
trunk/reactos/dll/win32/kernel32/CMakeLists.txt
trunk/reactos/dll/win32/kernel32/client/except.c
trunk/reactos/dll/win32/kernel32/client/utils.c
trunk/reactos/drivers/crypto/ksecdd/ksecdd.h
trunk/reactos/drivers/crypto/ksecdd/random.c
trunk/reactos/hal/halarm/CMakeLists.txt
trunk/reactos/win32ss/drivers/font/bmfd/bmfd.h
trunk/reactos/win32ss/gdi/gdi32/wine/gdi_private.h
trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Thu May 14 22:32:35
2015
@@ -243,11 +243,17 @@
add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION
loader NO_CAB FOR bootcd regtest)
add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION
loader NO_CAB NOT_IN_HYBRIDCD FOR livecd hybridcd NAME_ON_CD setupldr.sys)
-concatenate_files(
- ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
- ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
- ${_freeldr_pe_output_file})
-
-add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
+if(NOT ARCH STREQUAL "arm")
+
+ concatenate_files(
+ ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
+ ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
+ ${_freeldr_pe_output_file})
+
+ add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
+else()
+ add_custom_target(setupldr ALL DEPENDS ${_freeldr_pe_output_file})
+endif()
+
add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION
loader NO_CAB FOR bootcd regtest)
Modified: trunk/reactos/dll/win32/dbghelp/cpu_arm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_arm.…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/cpu_arm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/cpu_arm.c [iso-8859-1] Thu May 14 22:32:35 2015
@@ -33,7 +33,7 @@
#ifdef __arm__
case cpu_addr_pc: addr->Offset = ctx->Pc; return TRUE;
case cpu_addr_stack: addr->Offset = ctx->Sp; return TRUE;
- case cpu_addr_frame: addr->Offset = ctx->Fp; return TRUE;
+ case cpu_addr_frame: addr->Offset = ctx->Fpscr; return TRUE;
#endif
default: addr->Mode = -1;
return FALSE;
@@ -116,7 +116,7 @@
/* set frame information */
frame->AddrStack.Offset = context->Sp;
frame->AddrReturn.Offset = context->Lr;
- frame->AddrFrame.Offset = context->Fp;
+ frame->AddrFrame.Offset = context->Fpscr;
frame->AddrPC.Offset = context->Pc;
frame->Far = TRUE;
@@ -169,8 +169,8 @@
case CV_ARM_R0 + 8: *size = sizeof(ctx->R8); return &ctx->R8;
case CV_ARM_R0 + 9: *size = sizeof(ctx->R9); return &ctx->R9;
case CV_ARM_R0 + 10: *size = sizeof(ctx->R10); return &ctx->R10;
- case CV_ARM_R0 + 11: *size = sizeof(ctx->Fp); return &ctx->Fp;
- case CV_ARM_R0 + 12: *size = sizeof(ctx->Ip); return &ctx->Ip;
+ case CV_ARM_R0 + 11: *size = sizeof(ctx->Fpscr); return &ctx->Fpscr;
+ //case CV_ARM_R0 + 12: *size = sizeof(ctx->Ip); return &ctx->Ip;
case CV_ARM_SP: *size = sizeof(ctx->Sp); return &ctx->Sp;
case CV_ARM_LR: *size = sizeof(ctx->Lr); return &ctx->Lr;
Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Thu May 14 22:32:35 2015
@@ -90,6 +90,10 @@
list(APPEND ASM_SOURCE
client/amd64/fiber.S
client/amd64/thread.S)
+elseif(ARCH STREQUAL "arm")
+ list(APPEND ASM_SOURCE
+ client/arm/fiber.S
+ client/arm/thread.S)
endif()
add_asm_files(kernel32_asm ${ASM_SOURCE})
Modified: trunk/reactos/dll/win32/kernel32/client/except.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] Thu May 14 22:32:35
2015
@@ -62,8 +62,14 @@
DbgPrint("R8: %I64x R9: %I64x R10: %I64x R11: %I64x\n", pc->R8,
pc->R9, pc->R10, pc->R11);
DbgPrint("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12,
pc->R13, pc->R14, pc->R15);
DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
+#elif defined(_M_ARM)
+ DbgPrint("PC: %08lx LR: %08lx SP: %08lx\n", pc->Pc);
+ DbgPrint("R0: %08lx R1: %08lx R2: %08lx R3: %08lx\n", pc->R0,
pc->R1, pc->R2, pc->R3);
+ DbgPrint("R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", pc->R4,
pc->R5, pc->R6, pc->R7);
+ DbgPrint("R8: %08lx R9: %08lx R10: %08lx R11: %08lx\n", pc->R8,
pc->R9, pc->R10, pc->R11);
+ DbgPrint("R12: %08lx CPSR: %08lx FPSCR: %08lx\n", pc->R12,
pc->Cpsr, pc->R1, pc->Fpscr, pc->R3);
#else
-#warning Unknown architecture
+#error "Unknown architecture"
#endif
}
Modified: trunk/reactos/dll/win32/kernel32/client/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/utils.c [iso-8859-1] Thu May 14 22:32:35 2015
@@ -606,6 +606,33 @@
/* Give it some room for the Parameter */
Context->Rsp -= sizeof(PVOID);
+#elif defined(_M_ARM)
+ DPRINT("BaseInitializeContext: %p\n", Context);
+
+ // FIXME: check if this is correct!
+ /* Setup the Initial Win32 Thread Context */
+ Context->R0 = (ULONG_PTR)StartAddress;
+ Context->R1 = (ULONG_PTR)Parameter;
+ Context->Sp = (ULONG_PTR)StackAddress;
+
+ if (ContextType == 1) /* For Threads */
+ {
+ Context->Pc = (ULONG_PTR)BaseThreadStartupThunk;
+ }
+ else if (ContextType == 2) /* For Fibers */
+ {
+ Context->Pc = (ULONG_PTR)BaseFiberStartup;
+ }
+ else /* For first thread in a Process */
+ {
+ Context->Pc = (ULONG_PTR)BaseProcessStartThunk;
+ }
+
+ /* Set the Context Flags */
+ Context->ContextFlags = CONTEXT_FULL;
+
+ /* Give it some room for the Parameter */
+ Context->Sp -= sizeof(PVOID);
#else
#warning Unknown architecture
UNIMPLEMENTED;
@@ -907,7 +934,7 @@
OUT PHANDLE JobHandle)
{
NTSTATUS Status;
-
+
/* Validate that there's a name */
if ((ApplicationName) && *(ApplicationName))
{
Modified: trunk/reactos/drivers/crypto/ksecdd/ksecdd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/crypto/ksecdd/ksec…
==============================================================================
--- trunk/reactos/drivers/crypto/ksecdd/ksecdd.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/crypto/ksecdd/ksecdd.h [iso-8859-1] Thu May 14 22:32:35 2015
@@ -43,8 +43,13 @@
ULONG64 Ctr0;
ULONG64 Ctr1;
} KSEC_MACHINE_SPECIFIC_COUNTERS, *PKSEC_MACHINE_SPECIFIC_COUNTERS;
+#elif defined(_M_ARM)
+typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
+{
+ ULONG Ccr;
+} KSEC_MACHINE_SPECIFIC_COUNTERS, *PKSEC_MACHINE_SPECIFIC_COUNTERS;
#else
-typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS;
+typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS, *PKSEC_MACHINE_SPECIFIC_COUNTERS;
#endif
typedef struct _KSEC_ENTROPY_DATA
Modified: trunk/reactos/drivers/crypto/ksecdd/random.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/crypto/ksecdd/rand…
==============================================================================
--- trunk/reactos/drivers/crypto/ksecdd/random.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/crypto/ksecdd/random.c [iso-8859-1] Thu May 14 22:32:35 2015
@@ -76,6 +76,11 @@
MachineSpecificCounters->Pmc1 = __readpmc(1);
}
#endif
+#elif defined(_M_ARM)
+/* FIXME: this should go into a public header (from ksarm.h) */
+#define CP15_PMCCNTR 15, 0, 9, 13, 0
+ /* Read the Cycle Counter Register */
+ MachineSpecificCounters->Ccr = _MoveFromCoprocessor(CP15_PMCCNTR);
#else
#error Implement me!
#endif
Modified: trunk/reactos/hal/halarm/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halarm/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/hal/halarm/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/hal/halarm/CMakeLists.txt [iso-8859-1] Thu May 14 22:32:35 2015
@@ -15,3 +15,5 @@
add_library(hal SHARED
${SOURCES})
+
+set_module_type(hal kerneldll ENTRYPOINT 0)
Modified: trunk/reactos/win32ss/drivers/font/bmfd/bmfd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/font/bmfd/…
==============================================================================
--- trunk/reactos/win32ss/drivers/font/bmfd/bmfd.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/font/bmfd/bmfd.h [iso-8859-1] Thu May 14 22:32:35 2015
@@ -19,8 +19,8 @@
#else
// FIXME: BE
#define GETVAL(x) \
- sizeof(x) == 1 ? (x) : \
- sizeof(x) == 2 ? (((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8)) : \
+ (sizeof(x) == 1) ? (x) : \
+ (sizeof(x) == 2) ? (((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8)) : \
(((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8) + (((PCHAR)&(x))[2]
<< 16) + \
(((PCHAR)&(x))[3] << 24))
@@ -121,13 +121,13 @@
} FONTDIRENTRY, *PFONTDIRENTRY;
typedef struct _DIRENTRY
-{
+{
WORD fontOrdinal;
FONTDIRENTRY fde;
} DIRENTRY, *PDIRENTRY;
typedef struct _FONTGROUPHDR
-{
+{
WORD NumberOfFonts;
DIRENTRY ade[1];
} FONTGROUPHDR, *PFONTGROUPHDR;
Modified: trunk/reactos/win32ss/gdi/gdi32/wine/gdi_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/gdi…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/wine/gdi_private.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/wine/gdi_private.h [iso-8859-1] Thu May 14 22:32:35
2015
@@ -138,8 +138,14 @@
BOOL WINAPI SetWorldTransformForMetafile(HDC hdc, const XFORM *pxform);
#define SetWorldTransform SetWorldTransformForMetafile
+#ifdef _M_ARM
+#define DbgRaiseAssertionFailure() __emit(0xdefc)
+#else
+#define DbgRaiseAssertionFailure() __int2c()
+#endif // _M_ARM
+
#undef ASSERT
-#define ASSERT(x) if (!(x)) __int2c()
+#define ASSERT(x) if (!(x)) DbgRaiseAssertionFailure()
#endif /* __WINE_GDI_PRIVATE_H */
Modified: trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/ros…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] Thu May 14 22:32:35 2015
@@ -516,7 +516,7 @@
const char *file,
unsigned line)
{
- __int2c();
+ DbgRaiseAssertionFailure();
}
double