X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fmodules.c;h=ba92905fe22ae5a549a2ffa5cb83cc4c3da8706e;hb=38e4b28d370c5f9284b285a71518ae2b6bce125c;hp=44c4cb518fb77cd44f43102f61484e9b08f8218f;hpb=1e7db40300bc594cf708bb6082a6e05a268da946;p=tpg%2Facess2.git diff --git a/Kernel/modules.c b/Kernel/modules.c index 44c4cb51..ba92905f 100644 --- a/Kernel/modules.c +++ b/Kernel/modules.c @@ -5,6 +5,9 @@ #include #include +#define USE_EDI 0 +#define USE_UDI 1 + // === PROTOTYPES === int Modules_LoadBuiltins(); int Module_LoadMem(void *Buffer, Uint Length, char *ArgString); @@ -13,6 +16,9 @@ int Module_IsLoaded(char *Name); // === IMPORTS === +#if USE_UDI +extern int UDI_LoadDriver(void *Base); +#endif extern void StartupPrint(char *Str); extern tModule gKernelModules[]; extern void gKernelModulesEnd; @@ -152,6 +158,14 @@ int Module_LoadFile(char *Path, char *ArgString) } #endif + #if USE_UDI + if( Binary_FindSymbol(base, "udi_init_info", NULL ) == 0 ) + { + Binary_Relocate(base); // Relocate + return UDI_LoadDriver( base ); // And intialise + } + #endif + // Unknown module type?, return error Binary_Unload(base); #if USE_EDI