Author: ros-arm-bringup
Date: Sun Jun 15 01:14:02 2008
New Revision: 33979
URL:
http://svn.reactos.org/svn/reactos?rev=33979&view=rev
Log:
- Start major ARM port cleanup:
- Make use of the SARCH rbuild parameter to define the target board (default to ARM
VersatilePB for now)
- Make official ARM include directory (include/reactos/arm) and move the ARM DDK there
- Start creating header files for different target board components.
- Update halfuncs in NDK with one missing function, and temporarily, one ARM function.
Added:
trunk/reactos/include/reactos/arm/
trunk/reactos/include/reactos/arm/armddk.h
- copied unchanged from r33967, trunk/reactos/include/reactos/armddk.h
trunk/reactos/include/reactos/arm/targets/
trunk/reactos/include/reactos/arm/targets/pl011.h (with props)
trunk/reactos/include/reactos/arm/targets/pl190.h (with props)
trunk/reactos/include/reactos/arm/targets/sp804.h (with props)
Removed:
trunk/reactos/include/reactos/armddk.h
Modified:
trunk/reactos/ReactOS-arm.rbuild
trunk/reactos/config-arm.template.rbuild
trunk/reactos/include/ndk/halfuncs.h
trunk/reactos/ntoskrnl/ke/arm/trapc.c
Modified: trunk/reactos/ReactOS-arm.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=339…
==============================================================================
--- trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] Sun Jun 15 01:14:02 2008
@@ -12,8 +12,14 @@
<define name="_ARM_" />
<define name="__arm__" />
+ <include>include/reactos/arm</include>
+
<property name="WINEBUILD_FLAGS" value="--kill-at"/>
<property name="NTOSKRNL_SHARED" value="-Wl,--file-alignment,0x1000
-Wl,--section-alignment,0x1000 -nostartfiles -shared"/>
+
+ <if property="SARCH" value="versatile">
+ <define name="BOARD_CONFIG_VERSATILE"/>
+ </if>
<if property="OPTIMIZE" value="1">
<compilerflag>-Os</compilerflag>
Modified: trunk/reactos/config-arm.template.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/config-arm.template.rbuild…
==============================================================================
--- trunk/reactos/config-arm.template.rbuild [iso-8859-1] (original)
+++ trunk/reactos/config-arm.template.rbuild [iso-8859-1] Sun Jun 15 01:14:02 2008
@@ -14,15 +14,16 @@
<!--
- Sub-architecture to build for. Specify one of:
+ Sub-architecture (board) to build for. Specify one of:
+ kurobox versatile
-->
-<property name="SARCH" value="" />
+<property name="SARCH" value="versatile" />
<!--
Which CPU ReactOS should be optimized for. Specify one of:
- armv4, armv4t, armv5, armv5te
+ armv5te
See GCC manual for more CPU names and which CPUs GCC can optimize for.
-->
Modified: trunk/reactos/include/ndk/halfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] Sun Jun 15 01:14:02 2008
@@ -137,6 +137,12 @@
PKIRQL OldIrql
);
+VOID
+FASTCALL
+HalClearSoftwareInterrupt(
+ IN KIRQL Request
+);
+
NTHALAPI
BOOLEAN
NTAPI
@@ -162,6 +168,13 @@
ULONG Vector
);
+#ifdef _ARM_ // FIXME: ndk/arm? armddk.h?
+ULONG
+HalGetInterruptSource(
+ VOID
+);
+#endif
+
NTHALAPI
VOID
NTAPI
Added: trunk/reactos/include/reactos/arm/targets/pl011.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/target…
==============================================================================
--- trunk/reactos/include/reactos/arm/targets/pl011.h (added)
+++ trunk/reactos/include/reactos/arm/targets/pl011.h [iso-8859-1] Sun Jun 15 01:14:02
2008
@@ -1,0 +1,58 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: include/reactos/arm/targets/pl011.h
+ * PURPOSE: PL011 Registers and Constants
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* GLOBALS ********************************************************************/
+
+//
+// UART Registers
+//
+#define UART_BASE (PVOID)0xE00F1000 /* HACK: freeldr mapped it here */
+
+#define UART_PL01x_DR (UART_BASE + 0x00)
+#define UART_PL01x_RSR (UART_BASE + 0x04)
+#define UART_PL01x_ECR (UART_BASE + 0x04)
+#define UART_PL01x_FR (UART_BASE + 0x18)
+#define UART_PL011_IBRD (UART_BASE + 0x24)
+#define UART_PL011_FBRD (UART_BASE + 0x28)
+#define UART_PL011_LCRH (UART_BASE + 0x2C)
+#define UART_PL011_CR (UART_BASE + 0x30)
+#define UART_PL011_IMSC (UART_BASE + 0x38)
+
+//
+// LCR Values
+//
+typedef union _PL011_LCR_REGISTER
+{
+ ULONG Todo;
+} PL011_LCR_REGISTER, *PPL011_LCR_REGISTER;
+
+#define UART_PL011_LCRH_WLEN_8 0x60
+#define UART_PL011_LCRH_FEN 0x10
+
+//
+// FCR Values
+//
+typedef union _PL011_FCR_REGISTER
+{
+ ULONG Todo;
+} PL011_FCR_REGISTER, *PPL011_FCR_REGISTER;
+
+#define UART_PL011_CR_UARTEN 0x01
+#define UART_PL011_CR_TXE 0x100
+#define UART_PL011_CR_RXE 0x200
+
+//
+// LSR Values
+//
+typedef union _PL011_LSR_REGISTER
+{
+ ULONG Todo;
+} PL011_LSR_REGISTER, *PPL011_LSR_REGISTER;
+
+#define UART_PL01x_FR_RXFE 0x10
+#define UART_PL01x_FR_TXFF 0x20
Propchange: trunk/reactos/include/reactos/arm/targets/pl011.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/include/reactos/arm/targets/pl011.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/include/reactos/arm/targets/pl190.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/target…
==============================================================================
--- trunk/reactos/include/reactos/arm/targets/pl190.h (added)
+++ trunk/reactos/include/reactos/arm/targets/pl190.h [iso-8859-1] Sun Jun 15 01:14:02
2008
@@ -1,0 +1,20 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: include/reactos/arm/targets/pl190.h
+ * PURPOSE: PL190 Registers and Constants
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* GLOBALS ********************************************************************/
+
+//
+// VIC Registers
+//
+#define VIC_BASE (PVOID)0xE0040000 /* HACK: freeldr mapped it here */
+
+#define VIC_INT_STATUS (VIC_BASE + 0x00)
+#define VIC_INT_ENABLE (VIC_BASE + 0x10)
+#define VIC_INT_CLEAR (VIC_BASE + 0x14)
+#define VIC_SOFT_INT (VIC_BASE + 0x18
+#define VIC_SOFT_INT_CLEAR (VIC_BASE + 0x1C)
Propchange: trunk/reactos/include/reactos/arm/targets/pl190.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/include/reactos/arm/targets/pl190.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/include/reactos/arm/targets/sp804.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/target…
==============================================================================
--- trunk/reactos/include/reactos/arm/targets/sp804.h (added)
+++ trunk/reactos/include/reactos/arm/targets/sp804.h [iso-8859-1] Sun Jun 15 01:14:02
2008
@@ -1,0 +1,46 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: include/reactos/arm/targets/pl011.h
+ * PURPOSE: SB804 Registers and Constants
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* GLOBALS ********************************************************************/
+
+//
+// Timer Registers
+//
+#define TIMER_BASE(x) (PVOID)(0xE00E2000 + (x * 0x1000)) /* HACK: freeldr
mapped it here */
+#define TIMER0_LOAD TIMER_BASE(0, 0x00)
+#define TIMER0_VALUE TIMER_BASE(0, 0x04)
+#define TIMER0_CONTROL TIMER_BASE(0, 0x08)
+#define TIMER0_INT_CLEAR TIMER_BASE(0, 0x0C)
+#define TIMER0_INT_STATUS TIMER_BASE(0, 0x10)
+#define TIMER0_INT_MASK TIMER_BASE(0, 0x14)
+#define TIMER0_BACKGROUND_LOAD TIMER_BASE(0, 0x18)
+#define TIMER1_LOAD TIMER_BASE(1, 0x00)
+#define TIMER1_VALUE TIMER_BASE(1, 0x04)
+#define TIMER1_CONTROL TIMER_BASE(1, 0x08)
+#define TIMER1_INT_CLEAR TIMER_BASE(1, 0x0C)
+#define TIMER1_INT_STATUS TIMER_BASE(1, 0x10)
+#define TIMER1_INT_MASK TIMER_BASE(1, 0x14)
+#define TIMER1_BACKGROUND_LOAD TIMER_BASE(1, 0x18)
+
+//
+// Control Register
+//
+typedef union _SP804_CONTROL_REGISTER
+{
+ struct
+ {
+ ULONG Wrap:1;
+ ULONG Wide:1;
+ ULONG Prescale:2;
+ ULONG Reserved:1;
+ ULONG Interrupt:1;
+ ULONG Periodic:1;
+ ULONG Enabled:1;
+ };
+ ULONG AsUlong;
+} SP804_CONTROL_REGISTER, *PSP804_CONTROL_REGISTER;
Propchange: trunk/reactos/include/reactos/arm/targets/sp804.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/include/reactos/arm/targets/sp804.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Removed: trunk/reactos/include/reactos/armddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/armddk.h?r…
==============================================================================
--- trunk/reactos/include/reactos/armddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/armddk.h (removed)
@@ -1,166 +1,0 @@
-#ifndef _ARMDDK_
-#define _ARMDDK_
-
-//
-// IRQLs
-//
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define SYNCH_LEVEL DISPATCH_LEVEL
-#define PROFILE_LEVEL 27
-#define CLOCK1_LEVEL 28
-#define CLOCK2_LEVEL 28
-#define IPI_LEVEL 29
-#define POWER_LEVEL 30
-#define HIGH_LEVEL 31
-
-//
-// FIXME: mmtypes.h?
-//
-#define KIPCR 0xFFFFF000
-#define KI_USER_SHARED_DATA 0xFFFFE000
-#define USPCR 0x7FFF0000
-#define PCR ((volatile KPCR * const)KIPCR)
-#define USERPCR ((volatile KPCR * const)USPCR)
-
-//
-// Maximum IRQs
-//
-#define MAXIMUM_VECTOR 16
-
-//
-// Just read it from the PCR
-//
-#define KeGetCurrentProcessorNumber() PCR->Number
-#define KeGetCurrentIrql() PCR->CurrentIrql
-#define _KeGetCurrentThread() PCR->CurrentThread
-#define _KeGetPreviousMode() PCR->CurrentThread->PreviousMode
-#define _KeIsExecutingDpc() (PCR->DpcRoutineActive != 0)
-#define KeGetDcacheFillSize() PCR->DcacheFillSize
-
-//
-// Stub
-//
-typedef struct _KFLOATING_SAVE
-{
- ULONG Reserved;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-//
-// Processor Control Region
-// On ARM, it's actually readable from user-mode, much like KUSER_SHARED_DATA
-//
-#ifdef _WINNT_H
-typedef
-VOID
-(*PKINTERRUPT_ROUTINE)(VOID);
-#endif
-typedef struct _KPCR
-{
- ULONG MinorVersion;
- ULONG MajorVersion;
- PKINTERRUPT_ROUTINE InterruptRoutine[MAXIMUM_VECTOR];
- PVOID XcodeDispatch;
- ULONG FirstLevelDcacheSize;
- ULONG FirstLevelDcacheFillSize;
- ULONG FirstLevelIcacheSize;
- ULONG FirstLevelIcacheFillSize;
- ULONG SecondLevelDcacheSize;
- ULONG SecondLevelDcacheFillSize;
- ULONG SecondLevelIcacheSize;
- ULONG SecondLevelIcacheFillSize;
- struct _KPRCB *Prcb;
- struct _TEB *Teb;
- PVOID TlsArray;
- ULONG DcacheFillSize;
- ULONG IcacheAlignment;
- ULONG IcacheFillSize;
- ULONG ProcessorId;
- ULONG ProfileInterval;
- ULONG ProfileCount;
- ULONG StallExecutionCount;
- ULONG StallScaleFactor;
- CCHAR Number;
- PVOID DataBusError;
- PVOID InstructionBusError;
- ULONG CachePolicy;
- ULONG AlignedCachePolicy;
- UCHAR IrqlMask[HIGH_LEVEL + 1];
- ULONG IrqlTable[HIGH_LEVEL + 1];
- UCHAR CurrentIrql;
- KAFFINITY SetMember;
- struct _KTHREAD *CurrentThread;
- ULONG ReservedVectors;
- KAFFINITY NotMember;
- ULONG SystemReserved[6];
- ULONG DcacheAlignment;
- ULONG HalReserved[64];
- BOOLEAN FirstLevelActive;
- BOOLEAN DpcRoutineActive;
- ULONG CurrentPid;
- BOOLEAN OnInterruptStack;
- PVOID SavedInitialStack;
- PVOID SavedStackLimit;
- PVOID SystemServiceDispatchStart;
- PVOID SystemServiceDispatchEnd;
- PVOID InterruptStack;
- PVOID PanicStack;
- PVOID BadVaddr;
- PVOID InitialStack;
- PVOID StackLimit;
- ULONG QuantumEnd;
- PVOID PerfGlobalGroupMask;
- ULONG ContextSwitches;
-} KPCR, *PKPCR;
-
-//
-// Get the current TEB
-//
-FORCEINLINE
-struct _TEB* NtCurrentTeb(VOID)
-{
- return (struct _TEB*)USERPCR->Teb;
-}
-
-//
-// IRQL Support on ARM is similar to MIPS/ALPHA
-//
-KIRQL
-KfRaiseIrql(
- IN KIRQL NewIrql
-);
-
-VOID
-KfLowerIrql(
- IN KIRQL NewIrql
-);
-
-KIRQL
-KeRaiseIrqlToSynchLevel(
- VOID
-);
-
-KIRQL
-KeRaiseIrqlToDpcLevel(
- VOID
-);
-
-#define KeLowerIrql(NewIrql) KfLowerIrql(NewIrql)
-#define KeRaiseIrql(NewIrql, OldIrql) *(OldIrql) = KfRaiseIrql(NewIrql)
-
-//
-// Cache clean and flush
-//
-VOID
-HalSweepDcache(
- VOID
-);
-
-VOID
-HalSweepIcache(
- VOID
-);
-
-#endif
Modified: trunk/reactos/ntoskrnl/ke/arm/trapc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/trapc.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] Sun Jun 15 01:14:02 2008
@@ -26,12 +26,6 @@
);
/* FUNCTIONS ******************************************************************/
-
-ULONG
-HalGetInterruptSource(VOID);
-
-VOID FASTCALL
-HalClearSoftwareInterrupt(IN KIRQL Request);
VOID
KiIdleLoop(VOID)