Some moving around:

- move loader.c to arch/i386 since it's arch specific
- added of.h
- freeldr.h / debug.h (languishing changes)
- arch/powerpc/* updated definitions

svn path=/trunk/; revision=21154
This commit is contained in:
Art Yerkes 2006-02-19 09:39:30 +00:00
parent 13bef77734
commit f3e7f742a9
9 changed files with 40 additions and 10 deletions

View file

@ -58,10 +58,10 @@ int ofw_finddevice( const char *name ) {
int ofw_getprop( int package, const char *name, void *buffer, int buflen ) {
int ret, len = strlen(name);
le_swap( name, name + len, name );
le_swap( buffer, buffer + buflen, buffer );
le_swap( buffer, (char *)buffer + buflen, buffer );
ret = ofproxy
( 4, (void *)package, (char *)name, buffer, (void *)buflen );
le_swap( buffer, buffer + buflen, buffer );
le_swap( buffer, (char *)buffer + buflen, buffer );
le_swap( name, name + len, name );
return ret;
}
@ -155,7 +155,6 @@ int PpcFindDevice( int depth, int parent, char *devname, int *nth ) {
match = !strncmp(buf, devname, strlen(devname));
if( !nth && match ) return parent;
else if( match ) *nth--;
for( i = 0; i < depth; i++ ) PpcPutChar( ' ' );
@ -420,7 +419,7 @@ void PpcInit( of_proxy the_ofproxy ) {
BootMain( CmdLine );
}
void MachInit(char *CmdLine) {
void MachInit(const char *CmdLine) {
int len, i;
char *sep;

View file

@ -59,7 +59,7 @@
ULONG_PTR NextModuleBase = 0;
/* Currently Opened Module */
PFRLDR_MODULE CurrentModule = NULL;
VOID *CurrentModule = NULL;
/* Unrelocated Kernel Base in Virtual Memory */
ULONG_PTR KernelBase;
@ -542,7 +542,7 @@ FrLdrMapKernel(FILE *KernelImage)
ULONG_PTR
STDCALL
FrLdrLoadModule(FILE *ModuleImage,
LPSTR ModuleName,
LPCSTR ModuleName,
PULONG ModuleSize)
{
#if 0
@ -597,7 +597,7 @@ FrLdrLoadModule(FILE *ModuleImage,
ULONG_PTR
STDCALL
FrLdrCreateModule(LPSTR ModuleName)
FrLdrCreateModule(LPCSTR ModuleName)
{
#if 0
PFRLDR_MODULE ModuleData;

View file

@ -24,6 +24,7 @@
<file>i386disk.c</file>
<file>i386rtl.c</file>
<file>i386vid.c</file>
<file>loader.c</file>
<file>machpc.c</file>
<file>pccons.c</file>
<file>pcdisk.c</file>

View file

@ -46,7 +46,6 @@
<file>registry.c</file>
<file>arcname.c</file>
<file>binhive.c</file>
<file>loader.c</file>
<file>reactos.c</file>
</directory>
<directory name="rtl">

View file

@ -73,6 +73,8 @@ void INSTRUCTION_BREAKPOINT4(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT4(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
#elif defined(__PowerPC__)
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n"))
#endif // defined __i386__
#else
@ -83,8 +85,8 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
#define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_)
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n"))
#endif // defined DEBUG
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n"))
#endif // defined __DEBUG_H

View file

@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <ntddk.h>
#include <ndk/ntndk.h>
#include <arch.h>
@ -51,11 +52,13 @@
#include <ui/tui.h>
#include <ui/gui.h>
/* arch files */
#ifdef _X86_
#include <arch/i386/hardware.h>
#include <arch/i386/i386.h>
#include <arch/i386/machpc.h>
#include <arch/i386/machxbox.h>
#include <internal/i386/ke.h>
#endif
/* misc files */
#include <keycodes.h>
#include <version.h>

View file

@ -0,0 +1,27 @@
#ifndef FREELDR_OF_H
#define FREELDR_OF_H
#define OF_FAILED 0
#define ERR_NOT_FOUND 0xc0000010
#define REV(x) (((x)>>24)&0xff)|(((x)>>8)&0xff00)|(((x)<<24)&0xff000000)|(((x)<<8)&0xff0000)
typedef int (*of_proxy)
( int table_off, void *arg1, void *arg2, void *arg3, void *arg4 );
typedef long jmp_buf[100];
extern of_proxy ofproxy;
int ofw_finddevice( const char *name );
int ofw_getprop( int package, const char *name, void *buffer, int size );
int ofw_open( const char *name );
int ofw_write( int handle, const char *buffer, int size );
int ofw_read( int handle, const char *buffer, int size );
void ofw_print_string(const char *);
void ofw_print_number(int);
void ofw_exit();
int setjmp( jmp_buf buf );
int longjmp( jmp_buf buf, int retval );
#endif/*FREELDR_OF_H*/

View file

@ -113,6 +113,5 @@ VOID OptionMenuReboot(VOID)
DiskStopFloppyMotor();
SoftReboot();
#else
UNIMPLEMENTED();
#endif
}