mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 02:05:57 +00:00
- Create cmhardwr.c for ARM, stub it out.
- Implement KiInitMachineDependent -- this is only useful for x86 and has nothing relevant to ARM, so we just return. - Implement HalAllProcessorsStarted (again, a no-op) and HalQueryRealTimeClock (uses the RTC on the board -- uboot must set it up first). - Make sure we get the right Sp during a system call (this is still broken though). - We need to fix our system call handler next. svn path=/trunk/; revision=33977
This commit is contained in:
parent
531a8ad588
commit
def9fa66b4
8 changed files with 84 additions and 20 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <ndk/iofuncs.h>
|
||||
#include <ndk/kdfuncs.h>
|
||||
#include <ndk/kefuncs.h>
|
||||
#include <ndk/rtlfuncs.h>
|
||||
#include <internal/arm/ke.h>
|
||||
#include <internal/arm/intrin_i.h>
|
||||
#include <bugcodes.h>
|
||||
|
@ -135,13 +136,15 @@ HalAdjustResourceList(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalAllProcessorsStarted(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
||||
return TRUE;
|
||||
/* Do nothing */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -733,17 +736,32 @@ HalQueryDisplayParameters(
|
|||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
#define RTC_DATA (PVOID)0xE00E8000
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalQueryRealTimeClock(
|
||||
PTIME_FIELDS Time)
|
||||
HalQueryRealTimeClock(IN PTIME_FIELDS Time)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
LARGE_INTEGER LargeTime;
|
||||
ULONG Seconds;
|
||||
|
||||
//
|
||||
// Query the RTC value
|
||||
//
|
||||
Seconds = READ_REGISTER_ULONG(RTC_DATA);
|
||||
|
||||
//
|
||||
// Convert to time
|
||||
//
|
||||
RtlSecondsSince1970ToTime(Seconds, &LargeTime);
|
||||
|
||||
//
|
||||
// Convert to time-fields
|
||||
//
|
||||
RtlTimeToTimeFields(&LargeTime, Time);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalReadDmaCounter(
|
||||
|
|
25
reactos/ntoskrnl/config/arm/cmhardwr.c
Normal file
25
reactos/ntoskrnl/config/arm/cmhardwr.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Kernel
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: ntoskrnl/config/arm/cmhardwr.c
|
||||
* PURPOSE: Configuration Manager - ARM Specific Code
|
||||
* PROGRAMMERS: ReactOS Portable Systems Group
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include "ntoskrnl.h"
|
||||
#define NDEBUG
|
||||
#include "debug.h"
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -1265,12 +1265,6 @@ Phase1InitializationDiscard(IN PVOID Context)
|
|||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
HANDLE KeyHandle, OptionHandle;
|
||||
PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL;
|
||||
#ifdef _ARM_
|
||||
DPRINT1("*** Phase 1 Initialization Thread\n");
|
||||
DPRINT1("Beginning consistency checks...\n");
|
||||
// CHECK STACKS, IRQLS, DISPATCHER AND MAKE SURE WE ARE GOOD TO GO!
|
||||
//while (TRUE);
|
||||
#endif
|
||||
|
||||
/* Allocate the initialization buffer */
|
||||
InitBuffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||
|
|
|
@ -40,6 +40,16 @@ DebugService(IN ULONG ServiceType,
|
|||
arm_kprintf("%s", Buffer);
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiInitMachineDependent(VOID)
|
||||
{
|
||||
//
|
||||
// There is nothing to do on ARM
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiInitializeKernel(IN PKPROCESS InitProcess,
|
||||
|
|
|
@ -45,9 +45,7 @@ GENERATE_ARM_STUB KeDisableInterrupts
|
|||
GENERATE_ARM_STUB KiDispatchException
|
||||
GENERATE_ARM_STUB KiSwapProcess
|
||||
GENERATE_ARM_STUB KeSwitchKernelStack
|
||||
GENERATE_ARM_STUB KiInitMachineDependent
|
||||
GENERATE_ARM_STUB KiComputeTimerTableIndex
|
||||
GENERATE_ARM_STUB CmpInitializeMachineDependentConfiguration
|
||||
|
||||
//
|
||||
// Traps, Debugging and Execeptions
|
||||
|
|
|
@ -400,7 +400,7 @@ CopyLoop:
|
|||
cmp r6, #4
|
||||
//strne sp, [r5], #4
|
||||
//subne r6, r6, #1
|
||||
beq .
|
||||
bge .
|
||||
|
||||
//
|
||||
// Now do the system call
|
||||
|
|
|
@ -492,13 +492,27 @@ KiSystemService(IN PKTHREAD Thread,
|
|||
if (ArgumentCount > 4)
|
||||
{
|
||||
//
|
||||
// FIXME: Validate the user stack
|
||||
// Check where the stack is
|
||||
//
|
||||
|
||||
if (Thread->PreviousMode == UserMode)
|
||||
{
|
||||
//
|
||||
// FIXME: Validate the user stack
|
||||
//
|
||||
Argument = (PULONG)TrapFrame->UserSp;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// We were called from the kernel
|
||||
//
|
||||
Argument = (PULONG)TrapFrame->SvcSp;
|
||||
}
|
||||
|
||||
//
|
||||
// Copy the rest
|
||||
//
|
||||
Argument = (PULONG)TrapFrame->UserSp;
|
||||
DPRINT1("Stack: %p\n", Argument);
|
||||
for (i = 4; i < ArgumentCount; i++)
|
||||
{
|
||||
//
|
||||
|
|
|
@ -126,6 +126,11 @@
|
|||
<file>cmhardwr.c</file>
|
||||
</directory>
|
||||
</if>
|
||||
<if property="ARCH" value="arm">
|
||||
<directory name="arm">
|
||||
<file>cmhardwr.c</file>
|
||||
</directory>
|
||||
</if>
|
||||
<if property="ARCH" value="powerpc">
|
||||
<directory name="powerpc">
|
||||
<file>cmhardwr.c</file>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue