Author: ros-arm-bringup
Date: Tue Feb 5 06:06:20 2008
New Revision: 32132
URL:
http://svn.reactos.org/svn/reactos?rev=32132&view=rev
Log:
Build FreeLDR for ARM.
We merely provide a _start entrypoint stub and two stub architecture files with no
functions implemented.
We also supply the proper ARM configuration settings in the .rbuild files, and add the
necessary headers.
FreeLDR can now be compiled (along with rossym, libcntptr, rtl and cmlib) but it will not
link until the actual ARM code is implemented.
Added:
trunk/reactos/boot/freeldr/freeldr/arch/arm/
trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s (with props)
trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c (with props)
trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c (with props)
trunk/reactos/boot/freeldr/freeldr/include/arch/arm/
trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h (with props)
Modified:
trunk/reactos/boot/freeldr/freeldr/freeldr.rbuild
trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
trunk/reactos/boot/freeldr/freeldr/include/arch.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/include/mm.h
Added: 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 (added)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s Tue Feb 5 06:06:20 2008
@@ -1,0 +1,23 @@
+/*
+ * PROJECT: ReactOS Boot Loader
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: boot/freeldr/arch/arm/boot.s
+ * PURPOSE: Implements the entry point for ARM machines
+ * PROGRAMMERS: alex(a)winsiderss.com
+ */
+
+/* INCLUDES *******************************************************************/
+
+//#include <ksarm.h>
+//#include <kxarm.h>
+
+/* GLOBALS ********************************************************************/
+
+.globl _start
+.globl _bss
+
+/* BOOT CODE ******************************************************************/
+
+.extern ArmInit
+_start:
+ b .
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/boot.s
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c (added)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c Tue Feb 5 06:06:20 2008
@@ -1,0 +1,23 @@
+/*
+ * PROJECT: ReactOS Boot Loader
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: boot/freeldr/arch/arm/marcharm.c
+ * PURPOSE: Implements ARM-specific machine initialization
+ * PROGRAMMERS: alex(a)winsiderss.com
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <freeldr.h>
+
+/* GLOBALS ********************************************************************/
+
+/* FUNCTIONS ******************************************************************/
+
+VOID
+ArmMachInit(const char *CmdLine)
+{
+ //
+ // Setup ARM routines
+ //
+}
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c (added)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c Tue Feb 5 06:06:20 2008
@@ -1,0 +1,15 @@
+/*
+ * PROJECT: ReactOS Boot Loader
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: boot/freeldr/arch/arm/stubs.c
+ * PURPOSE: Non-completed ARM hardware-specific routines
+ * PROGRAMMERS: alex(a)winsiderss.com
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <freeldr.h>
+
+/* GLOBALS ********************************************************************/
+
+/* FUNCTIONS ******************************************************************/
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr.rbuild Tue Feb 5 06:06:20 2008
@@ -18,6 +18,21 @@
<linkerflag>-lgcc</linkerflag>
</module>
</if>
+ <if property="ARCH" value="arm">
+ <module name="freeldr" type="bootloader">
+ <bootstrap installbase="loader" />
+ <library>freeldr_startup</library>
+ <library>freeldr_base64k</library>
+ <library>freeldr_base</library>
+ <library>freeldr_arch</library>
+ <library>freeldr_main</library>
+ <library>rossym</library>
+ <library>cmlib</library>
+ <library>rtl</library>
+ <library>libcntpr</library>
+ <linkerflag>-lgcc</linkerflag>
+ </module>
+ </if>
<if property="ARCH" value="powerpc">
<module name="ofwldr" type="elfexecutable"
buildtype="OFWLDR">
<library>freeldr_startup</library>
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild Tue Feb 5 06:06:20 2008
@@ -59,8 +59,8 @@
<file>ofw.c</file>
<file>ofw_util.s</file>
<file>ofw_calls.s</file>
- <file>ofwdisk.c</file>
- <file>ofw_method.c</file>
+ <file>ofwdisk.c</file>
+ <file>ofw_method.c</file>
<file>prep.c</file>
<file>prep_ide.c</file>
<file>prep_pci.c</file>
@@ -87,4 +87,23 @@
</module>
</if>
</directory>
+ <directory name="arm">
+ <if property="ARCH" value="arm">
+ <module name="freeldr_arch" type="objectlibrary">
+ <include base="freeldr_base">include</include>
+ <include base="freeldr_base">cache</include>
+ <include base="ntoskrnl">include</include>
+ <compilerflag>-ffreestanding</compilerflag>
+ <compilerflag>-fno-builtin</compilerflag>
+ <compilerflag>-fno-inline</compilerflag>
+ <compilerflag>-fno-zero-initialized-in-bss</compilerflag>
+ <compilerflag>-Os</compilerflag>
+ <define name="DEBUG" />
+ <define name="_NTHAL_" />
+ <file>boot.s</file>
+ <file>macharm.c</file>
+ <file>stubs.c</file>
+ </module>
+ </if>
+ </directory>
</directory>
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch.h Tue Feb 5 06:06:20 2008
@@ -40,7 +40,7 @@
#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call
*/
#define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer
for FAT) */
#define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the
BIOS */
-#elif defined(_M_PPC)
+#elif defined(_M_PPC) || defined(_M_ARM)
extern PVOID FsStaticBufferDisk, FsStaticBufferData;
#define DISKREADBUFFER FsStaticBufferDisk
#define FILESYSBUFFER FsStaticBufferData
Added: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h (added)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h Tue Feb 5 06:06:20
2008
@@ -1,0 +1,66 @@
+/*
+ * PROJECT: ReactOS Boot Loader
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: boot/freeldr/include/arch/arm/hardware.h
+ * PURPOSE: Implements routines to support booting from a RAM Disk
+ * PROGRAMMERS: alex(a)winsiderss.com
+ */
+
+#ifndef _ARM_HARDWARE_
+#define __ARM_HARDWARE_
+
+#ifndef __REGISTRY_H
+#include "../../reactos/registry.h"
+#endif
+
+//
+// Static heap for ARC Hardware Component Tree
+// 16KB oughta be enough for anyone.
+//
+#define HW_MAX_ARC_HEAP_SIZE 16 * 1024
+
+//
+// ARC Component Configuration Routines
+//
+VOID
+NTAPI
+FldrSetComponentInformation(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN IDENTIFIER_FLAG Flags,
+ IN ULONG Key,
+ IN ULONG Affinity
+);
+
+VOID
+NTAPI
+FldrSetIdentifier(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN PCHAR Identifier
+);
+
+VOID
+NTAPI
+FldrCreateSystemKey(
+ OUT PCONFIGURATION_COMPONENT_DATA *SystemKey
+);
+
+VOID
+NTAPI
+FldrCreateComponentKey(
+ IN PCONFIGURATION_COMPONENT_DATA SystemKey,
+ IN PWCHAR BusName,
+ IN ULONG BusNumber,
+ IN CONFIGURATION_CLASS Class,
+ IN CONFIGURATION_TYPE Type,
+ OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey
+);
+
+VOID
+NTAPI
+FldrSetConfigurationData(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
+ IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
+ IN ULONG Size
+);
+
+#endif
Propchange: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h Tue Feb 5 06:06:20 2008
@@ -73,6 +73,8 @@
#include <internal/i386/ke.h>
#elif defined(_M_PPC)
#include <arch/powerpc/hardware.h>
+#elif defined(_M_ARM)
+#include <arch/arm/hardware.h>
#elif defined(_M_MIPS)
#include <arch/mips/arcbios.h>
#endif
Modified: trunk/reactos/boot/freeldr/freeldr/include/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/mm.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/mm.h Tue Feb 5 06:06:20 2008
@@ -37,7 +37,7 @@
ULONG Reserved;
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
-#if defined(__i386__) || defined(_PPC_) || defined(_MIPS_)
+#if defined(__i386__) || defined(_PPC_) || defined(_MIPS_) || defined(_ARM_)
#define MM_PAGE_SIZE 4096
#define MM_PAGE_MASK 0xFFF