[ros-diffs] [arty] 30106: Add machineType to arch specific info. Fixup module locations that are not PE coff.

arty at svn.reactos.org arty at svn.reactos.org
Sun Nov 4 12:59:53 CET 2007


Author: arty
Date: Sun Nov  4 14:59:52 2007
New Revision: 30106

URL: http://svn.reactos.org/svn/reactos?rev=30106&view=rev
Log:
Add machineType to arch specific info.
Fixup module locations that are not PE coff.

Modified:
    trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
    trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
    trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
    trunk/reactos/include/reactos/arc/arc.h
    trunk/reactos/include/reactos/ppcboot.h

Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c?rev=30106&r1=30105&r2=30106&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Sun Nov  4 14:59:52 2007
@@ -476,6 +476,8 @@
 
 VOID PpcHwDetect() {
     printf("PpcHwDetect\n");
+    /* Almost all PowerPC boxen use PCI */
+    BootInfo.machineType = PCIBus;
 }
 
 BOOLEAN PpcDiskNormalizeSystemPath(char *SystemPath, unsigned Size) {

Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c?rev=30106&r1=30105&r2=30106&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c Sun Nov  4 14:59:52 2007
@@ -184,6 +184,11 @@
 	    LdrPEFixupImports
 		((PVOID)reactos_modules[i].ModStart,
 		 (PCHAR)reactos_modules[i].String);
+        else /* Make RVA */
+        {
+            reactos_modules[i].ModStart -= (ULONG_PTR)KernelMemory;
+            reactos_modules[i].ModEnd   -= (ULONG_PTR)KernelMemory;
+        }
     }
 
     /* We don't use long longs, but longs for the addresses in the 
@@ -680,6 +685,7 @@
 
     } while(TempName);
     NameBuffer = reactos_module_strings[LoaderBlock.ModsCount];
+    
 
     /* Get Module Size */
     LocalModuleSize = FsGetFileSize(ModuleImage);
@@ -723,8 +729,9 @@
     else
     {
         PVOID ModuleBase = (PVOID)NextModuleBase;
+
         if(FrLdrMapModule(Image, ShortName, 0, 0))
-            Result = ModuleBase;
+            Result = ModuleBase;   
     }
     return Result;
 }

Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c?rev=30106&r1=30105&r2=30106&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c Sun Nov  4 14:59:52 2007
@@ -1,8 +1,10 @@
 #include "freeldr.h"
 #include "machine.h"
+#include "ppcboot.h"
 #include "ppcmmu/mmu.h"
 #include "prep.h"
 
+extern boot_infos_t BootInfo;
 int prep_serial = 0x800003f8;
 
 void sync() { __asm__("eieio\n\tsync"); }
@@ -63,6 +65,8 @@
 
 void PpcPrepVideoPrepareForReactOS(BOOLEAN setup)
 {
+    /* Prep boxen are PCI */
+    BootInfo.machineType = PCIBus;
     pci_setup(&pci1_desc);
 }
 

Modified: trunk/reactos/include/reactos/arc/arc.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arc/arc.h?rev=30106&r1=30105&r2=30106&view=diff
==============================================================================
--- trunk/reactos/include/reactos/arc/arc.h (original)
+++ trunk/reactos/include/reactos/arc/arc.h Sun Nov  4 14:59:52 2007
@@ -342,6 +342,7 @@
 typedef struct _PPC_LOADER_BLOCK
 {
     PVOID BootInfo;
+    ULONG MachineType;
 } PPC_LOADER_BLOCK, *PPPC_LOADER_BLOCK;
 
 //

Modified: trunk/reactos/include/reactos/ppcboot.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/ppcboot.h?rev=30106&r1=30105&r2=30106&view=diff
==============================================================================
--- trunk/reactos/include/reactos/ppcboot.h (original)
+++ trunk/reactos/include/reactos/ppcboot.h Sun Nov  4 14:59:52 2007
@@ -4,6 +4,7 @@
 typedef char font_char[57];
 typedef struct _boot_infos_t {
     void *loaderBlock;
+    int machineType;
     int dispDeviceRect[4];
     int dispDeviceRowBytes;
     int dispDeviceDepth;




More information about the Ros-diffs mailing list