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.

svn path=/trunk/; revision=32132
This commit is contained in:
ReactOS Portable Systems Group 2008-02-05 03:06:20 +00:00
parent 57ad1f5f20
commit 525c69f0c1
9 changed files with 167 additions and 4 deletions

View file

@ -0,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@winsiderss.com
*/
/* INCLUDES *******************************************************************/
//#include <ksarm.h>
//#include <kxarm.h>
/* GLOBALS ********************************************************************/
.globl _start
.globl _bss
/* BOOT CODE ******************************************************************/
.extern ArmInit
_start:
b .

View file

@ -0,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@winsiderss.com
*/
/* INCLUDES *******************************************************************/
#include <freeldr.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
VOID
ArmMachInit(const char *CmdLine)
{
//
// Setup ARM routines
//
}

View file

@ -0,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@winsiderss.com
*/
/* INCLUDES *******************************************************************/
#include <freeldr.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/

View file

@ -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>

View file

@ -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>

View file

@ -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

View file

@ -0,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@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

View file

@ -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

View file

@ -37,7 +37,7 @@ typedef struct
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