mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[KERNEL32/KSECDD/GDI32/BMFD/DBGHELP/HALARM/SETUPLDR]
Fix ARM build svn path=/trunk/; revision=67736
This commit is contained in:
parent
adc234ba9c
commit
369786f126
11 changed files with 79 additions and 18 deletions
|
@ -243,11 +243,17 @@ endif()
|
|||
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})
|
||||
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_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
|
||||
add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION loader NO_CAB FOR bootcd regtest)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ static BOOL arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
|
|||
#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 @@ static BOOL arm_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CON
|
|||
/* 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 @@ static void* arm_fetch_context_reg(CONTEXT* ctx, unsigned regno, unsigned* size)
|
|||
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;
|
||||
|
|
|
@ -90,6 +90,10 @@ elseif(ARCH STREQUAL "amd64")
|
|||
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})
|
||||
|
|
|
@ -62,8 +62,14 @@ _dump_context(PCONTEXT pc)
|
|||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -606,6 +606,33 @@ BaseInitializeContext(IN PCONTEXT Context,
|
|||
|
||||
/* 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 @@ BasepCheckWinSaferRestrictions(IN HANDLE UserToken,
|
|||
OUT PHANDLE JobHandle)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
|
||||
/* Validate that there's a name */
|
||||
if ((ApplicationName) && *(ApplicationName))
|
||||
{
|
||||
|
|
|
@ -43,8 +43,13 @@ typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
|
|||
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
|
||||
|
|
|
@ -76,6 +76,11 @@ KsecReadMachineSpecificCounters(
|
|||
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
|
||||
|
|
|
@ -15,3 +15,5 @@ list(APPEND SOURCES
|
|||
|
||||
add_library(hal SHARED
|
||||
${SOURCES})
|
||||
|
||||
set_module_type(hal kerneldll ENTRYPOINT 0)
|
||||
|
|
|
@ -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 @@ typedef struct _FONTDIRENTRY
|
|||
} FONTDIRENTRY, *PFONTDIRENTRY;
|
||||
|
||||
typedef struct _DIRENTRY
|
||||
{
|
||||
{
|
||||
WORD fontOrdinal;
|
||||
FONTDIRENTRY fde;
|
||||
} DIRENTRY, *PDIRENTRY;
|
||||
|
||||
typedef struct _FONTGROUPHDR
|
||||
{
|
||||
{
|
||||
WORD NumberOfFonts;
|
||||
DIRENTRY ade[1];
|
||||
} FONTGROUPHDR, *PFONTGROUPHDR;
|
||||
|
|
|
@ -138,8 +138,14 @@ extern void push_dc_driver_ros(PHYSDEV *dev, PHYSDEV physdev, const struct gdi_d
|
|||
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 */
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ _assert (
|
|||
const char *file,
|
||||
unsigned line)
|
||||
{
|
||||
__int2c();
|
||||
DbgRaiseAssertionFailure();
|
||||
}
|
||||
|
||||
double
|
||||
|
|
Loading…
Reference in a new issue