mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:16:17 +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 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)
|
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(
|
if(NOT ARCH STREQUAL "arm")
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
concatenate_files(
|
||||||
${_freeldr_pe_output_file})
|
${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)
|
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__
|
#ifdef __arm__
|
||||||
case cpu_addr_pc: addr->Offset = ctx->Pc; return TRUE;
|
case cpu_addr_pc: addr->Offset = ctx->Pc; return TRUE;
|
||||||
case cpu_addr_stack: addr->Offset = ctx->Sp; 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
|
#endif
|
||||||
default: addr->Mode = -1;
|
default: addr->Mode = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -116,7 +116,7 @@ static BOOL arm_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CON
|
||||||
/* set frame information */
|
/* set frame information */
|
||||||
frame->AddrStack.Offset = context->Sp;
|
frame->AddrStack.Offset = context->Sp;
|
||||||
frame->AddrReturn.Offset = context->Lr;
|
frame->AddrReturn.Offset = context->Lr;
|
||||||
frame->AddrFrame.Offset = context->Fp;
|
frame->AddrFrame.Offset = context->Fpscr;
|
||||||
frame->AddrPC.Offset = context->Pc;
|
frame->AddrPC.Offset = context->Pc;
|
||||||
|
|
||||||
frame->Far = TRUE;
|
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 + 8: *size = sizeof(ctx->R8); return &ctx->R8;
|
||||||
case CV_ARM_R0 + 9: *size = sizeof(ctx->R9); return &ctx->R9;
|
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 + 10: *size = sizeof(ctx->R10); return &ctx->R10;
|
||||||
case CV_ARM_R0 + 11: *size = sizeof(ctx->Fp); return &ctx->Fp;
|
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_R0 + 12: *size = sizeof(ctx->Ip); return &ctx->Ip;
|
||||||
|
|
||||||
case CV_ARM_SP: *size = sizeof(ctx->Sp); return &ctx->Sp;
|
case CV_ARM_SP: *size = sizeof(ctx->Sp); return &ctx->Sp;
|
||||||
case CV_ARM_LR: *size = sizeof(ctx->Lr); return &ctx->Lr;
|
case CV_ARM_LR: *size = sizeof(ctx->Lr); return &ctx->Lr;
|
||||||
|
|
|
@ -90,6 +90,10 @@ elseif(ARCH STREQUAL "amd64")
|
||||||
list(APPEND ASM_SOURCE
|
list(APPEND ASM_SOURCE
|
||||||
client/amd64/fiber.S
|
client/amd64/fiber.S
|
||||||
client/amd64/thread.S)
|
client/amd64/thread.S)
|
||||||
|
elseif(ARCH STREQUAL "arm")
|
||||||
|
list(APPEND ASM_SOURCE
|
||||||
|
client/arm/fiber.S
|
||||||
|
client/arm/thread.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_asm_files(kernel32_asm ${ASM_SOURCE})
|
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("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("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12, pc->R13, pc->R14, pc->R15);
|
||||||
DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
|
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
|
#else
|
||||||
#warning Unknown architecture
|
#error "Unknown architecture"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -606,6 +606,33 @@ BaseInitializeContext(IN PCONTEXT Context,
|
||||||
|
|
||||||
/* Give it some room for the Parameter */
|
/* Give it some room for the Parameter */
|
||||||
Context->Rsp -= sizeof(PVOID);
|
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
|
#else
|
||||||
#warning Unknown architecture
|
#warning Unknown architecture
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
|
@ -907,7 +934,7 @@ BasepCheckWinSaferRestrictions(IN HANDLE UserToken,
|
||||||
OUT PHANDLE JobHandle)
|
OUT PHANDLE JobHandle)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Validate that there's a name */
|
/* Validate that there's a name */
|
||||||
if ((ApplicationName) && *(ApplicationName))
|
if ((ApplicationName) && *(ApplicationName))
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,8 +43,13 @@ typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
|
||||||
ULONG64 Ctr0;
|
ULONG64 Ctr0;
|
||||||
ULONG64 Ctr1;
|
ULONG64 Ctr1;
|
||||||
} KSEC_MACHINE_SPECIFIC_COUNTERS, *PKSEC_MACHINE_SPECIFIC_COUNTERS;
|
} 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
|
#else
|
||||||
typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS;
|
typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS, *PKSEC_MACHINE_SPECIFIC_COUNTERS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _KSEC_ENTROPY_DATA
|
typedef struct _KSEC_ENTROPY_DATA
|
||||||
|
|
|
@ -76,6 +76,11 @@ KsecReadMachineSpecificCounters(
|
||||||
MachineSpecificCounters->Pmc1 = __readpmc(1);
|
MachineSpecificCounters->Pmc1 = __readpmc(1);
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
#else
|
||||||
#error Implement me!
|
#error Implement me!
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,3 +15,5 @@ list(APPEND SOURCES
|
||||||
|
|
||||||
add_library(hal SHARED
|
add_library(hal SHARED
|
||||||
${SOURCES})
|
${SOURCES})
|
||||||
|
|
||||||
|
set_module_type(hal kerneldll ENTRYPOINT 0)
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#else
|
#else
|
||||||
// FIXME: BE
|
// FIXME: BE
|
||||||
#define GETVAL(x) \
|
#define GETVAL(x) \
|
||||||
sizeof(x) == 1 ? (x) : \
|
(sizeof(x) == 1) ? (x) : \
|
||||||
sizeof(x) == 2 ? (((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8)) : \
|
(sizeof(x) == 2) ? (((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8)) : \
|
||||||
(((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8) + (((PCHAR)&(x))[2] << 16) + \
|
(((PCHAR)&(x))[0] + (((PCHAR)&(x))[1] << 8) + (((PCHAR)&(x))[2] << 16) + \
|
||||||
(((PCHAR)&(x))[3] << 24))
|
(((PCHAR)&(x))[3] << 24))
|
||||||
|
|
||||||
|
@ -121,13 +121,13 @@ typedef struct _FONTDIRENTRY
|
||||||
} FONTDIRENTRY, *PFONTDIRENTRY;
|
} FONTDIRENTRY, *PFONTDIRENTRY;
|
||||||
|
|
||||||
typedef struct _DIRENTRY
|
typedef struct _DIRENTRY
|
||||||
{
|
{
|
||||||
WORD fontOrdinal;
|
WORD fontOrdinal;
|
||||||
FONTDIRENTRY fde;
|
FONTDIRENTRY fde;
|
||||||
} DIRENTRY, *PDIRENTRY;
|
} DIRENTRY, *PDIRENTRY;
|
||||||
|
|
||||||
typedef struct _FONTGROUPHDR
|
typedef struct _FONTGROUPHDR
|
||||||
{
|
{
|
||||||
WORD NumberOfFonts;
|
WORD NumberOfFonts;
|
||||||
DIRENTRY ade[1];
|
DIRENTRY ade[1];
|
||||||
} FONTGROUPHDR, *PFONTGROUPHDR;
|
} 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);
|
BOOL WINAPI SetWorldTransformForMetafile(HDC hdc, const XFORM *pxform);
|
||||||
#define SetWorldTransform SetWorldTransformForMetafile
|
#define SetWorldTransform SetWorldTransformForMetafile
|
||||||
|
|
||||||
|
#ifdef _M_ARM
|
||||||
|
#define DbgRaiseAssertionFailure() __emit(0xdefc)
|
||||||
|
#else
|
||||||
|
#define DbgRaiseAssertionFailure() __int2c()
|
||||||
|
#endif // _M_ARM
|
||||||
|
|
||||||
#undef ASSERT
|
#undef ASSERT
|
||||||
#define ASSERT(x) if (!(x)) __int2c()
|
#define ASSERT(x) if (!(x)) DbgRaiseAssertionFailure()
|
||||||
|
|
||||||
#endif /* __WINE_GDI_PRIVATE_H */
|
#endif /* __WINE_GDI_PRIVATE_H */
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ _assert (
|
||||||
const char *file,
|
const char *file,
|
||||||
unsigned line)
|
unsigned line)
|
||||||
{
|
{
|
||||||
__int2c();
|
DbgRaiseAssertionFailure();
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue