Author: ros-arm-bringup
Date: Thu Feb 7 08:25:37 2008
New Revision: 32176
URL: http://svn.reactos.org/svn/reactos?rev=32176&view=rev
Log:
We now return failed in FrLdrMapImage if the file could not be read.
FreeLDR ARM now loads properly, however, we need to start building the ARM kernel and ARM boot drivers, otherwise their relocations will have byte offsets which will lead to alignment errors (on ARM relocaitons are DWORD-aligned).
Next steps are to get the kernel building, then the HAL, then bootvid/kdcom.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c
Modified: 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 (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c Thu Feb 7 08:25:37 2008
@@ -13,6 +13,7 @@
/* GLOBALS ********************************************************************/
PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock;
+ULONG BootDrive, BootPartition;
/* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c Thu Feb 7 08:25:37 2008
@@ -492,13 +492,18 @@
/* Allocate a temporary buffer for the read */
ReadBuffer = MmHeapAlloc(ImageSize);
-
+
/* Load the file image */
- FsReadFile(Image, ImageSize, NULL, ReadBuffer);
-
+ if (!FsReadFile(Image, ImageSize, NULL, ReadBuffer))
+ {
+ /* Fail */
+ DbgPrint("Failed to read image: %s\n", Name);
+ return NULL;
+ }
+
/* Map it into virtual memory */
ImageSize = FrLdrReMapImage(ReadBuffer, LoadBase);
-
+
/* Free the temporary buffer */
MmHeapFree(ReadBuffer);
Author: ros-arm-bringup
Date: Wed Feb 6 23:38:59 2008
New Revision: 32170
URL: http://svn.reactos.org/svn/reactos?rev=32170&view=rev
Log:
We now report the correct sector start for the ramdisk -- the actual volume boot sector is at 0x63, not 0x00 which is the MBR.
FreeLDR now reads freeldr.ini correctly and continues all the way to hardware detection (ArmHwDetect)
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
trunk/reactos/boot/freeldr/freeldr/ui/noui.c
Modified: 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 (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c Wed Feb 6 23:38:59 2008
@@ -40,7 +40,7 @@
// Use magic ramdisk drive number and count the number of 512-byte sectors
//
*DriveNumber = 0x49;
- *StartSector = 0;
+ *StartSector = 63;
*SectorCount = gRamDiskSize * 512;
//
Modified: trunk/reactos/boot/freeldr/freeldr/ui/noui.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/no…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/noui.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/noui.c Wed Feb 6 23:38:59 2008
@@ -43,6 +43,7 @@
VOID NoUiDrawStatusText(PCSTR StatusText)
{
+ printf("%s\n", StatusText);
}
VOID NoUiUpdateDateTime(VOID)
Author: ros-arm-bringup
Date: Wed Feb 6 22:15:46 2008
New Revision: 32169
URL: http://svn.reactos.org/svn/reactos?rev=32169&view=rev
Log:
We now enable ramdisk support by calling RamDiskSwitchFromBios() to allow the ramdisk routines to take control of disk r/w.
Unlike the x86 virtual-ramdisk, the ramdisk here is also used as boot device, not only system device.
Current FreeLDR output:
Booting FreeLDR...
FreeLoader v3.0 for ARM
Bootargs: rdbase=0x2000000 rdsize=0x1400000
This file system has cluster sizes bigger than 64k.
FreeLoader does not support this.
Press any key
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
Modified: 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 (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c Wed Feb 6 22:15:46 2008
@@ -35,10 +35,23 @@
//
ASSERT(gRamDiskBase);
ASSERT(gRamDiskSize);
+
+ //
+ // Use magic ramdisk drive number and count the number of 512-byte sectors
+ //
*DriveNumber = 0x49;
*StartSector = 0;
*SectorCount = gRamDiskSize * 512;
+
+ //
+ // Ramdisk support is FAT-only for now
+ //
*FsType = FS_FAT;
+
+ //
+ // Now that ramdisk is enabled, use ramdisk routines
+ //
+ RamDiskSwitchFromBios();
return TRUE;
}
@@ -88,7 +101,7 @@
ArmDiskGetDriveGeometry(IN ULONG DriveNumber,
OUT PGEOMETRY Geometry)
{
- while (TRUE);
+ ASSERT(FALSE);
return FALSE;
}
@@ -107,14 +120,14 @@
IN ULONG SectorCount,
IN PVOID Buffer)
{
- while (TRUE);
+ ASSERT(FALSE);
return FALSE;
}
ULONG
ArmDiskGetCacheableBlockCount(IN ULONG DriveNumber)
{
- while (TRUE);
+ ASSERT(FALSE);
return FALSE;
}