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/…
==============================================================================
--- 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/…
==============================================================================
--- 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/…
==============================================================================
--- 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?…
==============================================================================
--- 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?…
==============================================================================
--- 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;