Changed the x86 architecture to have tPAddr be 64-bits always
[tpg/acess2.git] / Kernel / modules.c
index 44c4cb5..ba92905 100644 (file)
@@ -5,6 +5,9 @@
 #include <common.h>
 #include <modules.h>
 
+#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

UCC git Repository :: git.ucc.asn.au