Author: ros-arm-bringup
Date: Tue Feb 12 08:55:12 2008
New Revision: 32313
URL:
http://svn.reactos.org/svn/reactos?rev=32313&view=rev
Log:
Move the entrypoint and startup code in boot.s.
Write ksarm.h and kxarm.h headers, defining the ARM Assembly ABI.
Rewrite the ARM assembler files we currently have to match the ABI.
Added:
trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h (with props)
trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h (with props)
trunk/reactos/ntoskrnl/ke/arm/boot.s (with props)
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s
trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s
trunk/reactos/ntoskrnl/ntoskrnl.rbuild
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s Tue Feb 12 08:55:12 2008
@@ -6,29 +6,14 @@
* PROGRAMMERS: ReactOS Portable Systems Group
*/
-/* INCLUDES *******************************************************************/
+ .title "ARM FreeLDR Entry Point"
+ .include "ntoskrnl/include/internal/arm/kxarm.h"
+ .include "ntoskrnl/include/internal/arm/ksarm.h"
-//#include <kxarm.h>
-
-#define CPSR_IRQ_DISABLE 0x80
-#define CPSR_FIQ_DISABLE 0x40
-#define CPSR_THUMB_ENABLE 0x20
-
-#define C1_MMU_CONTROL 0x01
-#define C1_ALIGNMENT_CONTROL 0x02
-#define C1_DCACHE_CONTROL 0x04
-#define C1_ICACHE_CONTROL 0x1000
-#define C1_VECTOR_CONTROL 0x2000
-
-/* GLOBALS ********************************************************************/
-
-.global _start
-.global ArmTranslationTable
-.section startup
-
-/* BOOT CODE ******************************************************************/
-
-_start:
+ .section startup
+ NESTED_ENTRY _start
+ PROLOG_END _start
+
//
// C entrypoint
//
@@ -67,8 +52,7 @@
// r0 contains the ARM_BOARD_CONFIGURATION_DATA structure
//
bx lr
-
-/* BOOT STACK *****************************************************************/
+ ENTRY_END _start
L_BootStackEnd:
.long BootStackEnd
@@ -81,9 +65,8 @@
.space 0x4000
BootStackEnd:
.long 0
-
-/* INITIAL PAGE TABLE *********************************************************/
.section pagedata
+.global ArmTranslationTable
ArmTranslationTable:
.space 0x4000
Added: trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h (added)
+++ trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h Tue Feb 12 08:55:12 2008
@@ -1,0 +1,9 @@
+.equ CPSR_IRQ_DISABLE, 0x80
+.equ CPSR_FIQ_DISABLE, 0x40
+.equ CPSR_THUMB_ENABLE, 0x20
+
+.equ C1_MMU_CONTROL, 0x01
+.equ C1_ALIGNMENT_CONTROL, 0x02
+.equ C1_DCACHE_CONTROL, 0x04
+.equ C1_ICACHE_CONTROL, 0x1000
+.equ C1_VECTOR_CONTROL, 0x2000
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/ksarm.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h (added)
+++ trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h Tue Feb 12 08:55:12 2008
@@ -1,0 +1,21 @@
+
+.macro TEXTAREA
+ .section text, "rx"
+ .align 2
+.endm
+
+.macro NESTED_ENTRY Name
+ .global &Name
+ .align 2
+ .func &Name
+ &Name:
+.endm
+
+.macro PROLOG_END Name
+ prolog_&Name:
+.endm
+
+.macro ENTRY_END Name
+ end_&Name:
+ .endfunc
+.endm
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/kxarm.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/ntoskrnl/ke/arm/boot.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/boot.s?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/boot.s (added)
+++ trunk/reactos/ntoskrnl/ke/arm/boot.s Tue Feb 12 08:55:12 2008
@@ -1,0 +1,22 @@
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/arm/boot.s
+ * PURPOSE: Implements the kernel entry point for ARM machines
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+ .title "ARM Kernel Entry Point"
+ .include "ntoskrnl/include/internal/arm/kxarm.h"
+ .include "ntoskrnl/include/internal/arm/ksarm.h"
+
+ TEXTAREA
+ NESTED_ENTRY KiSystemStartup
+ PROLOG_END KiSystemStartup
+
+ //
+ // Do stuff!
+ //
+ b .
+
+ ENTRY_END KiSystemStartup
Propchange: trunk/reactos/ntoskrnl/ke/arm/boot.s
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/ntoskrnl/ke/arm/boot.s
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/stubs_asm.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s (original)
+++ trunk/reactos/ntoskrnl/ke/arm/stubs_asm.s Tue Feb 12 08:55:12 2008
@@ -111,7 +111,6 @@
GENERATE_ARM_STUB KeDisableInterrupts
GENERATE_ARM_STUB KeContextToTrapFrame
GENERATE_ARM_STUB KiDispatchException
-GENERATE_ARM_STUB KiSystemStartup
GENERATE_ARM_STUB NtSetLdtEntries
GENERATE_ARM_STUB NtRaiseException
GENERATE_ARM_STUB NtCallbackReturn
Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Tue Feb 12 08:55:12 2008
@@ -59,7 +59,8 @@
</if>
<if property="ARCH" value="arm">
<directory name="arm">
- <file>stubs_asm.s</file>
+ <file first="true">boot.s</file>
+ <file>stubs_asm.s</file>
<file>stubs.c</file>
</directory>
</if>