8 #define MODULE_MAGIC ('A'|('M'<<8)|('D'<<16)|('\2'<<24))
10 // IA32 - Architecture 1
11 #if ARCH == i386 || ARCH == i586
12 # define MODULE_ARCH_ID 1
13 // IA64 - Architecture 2
14 #elif ARCH == x64 || ARCH == x86_64
15 # define MODULE_ARCH_ID 2
17 # error "Unknown architecture when determining MODULE_ARCH_ID ('" #ARCH "')"
21 # define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deps...) char *_DriverDeps[]={_deps};\
23 {MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,#_ident,_entry,_DriverDeps}
25 # define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deps...) char *_DriverDeps_##_ident[]={_deps};\
26 tModule __attribute__ ((section ("KMODULES"),unused)) _DriverInfo_##_ident=\
27 {MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,#_ident,_entry,_DriverDeps_##_ident}
30 typedef struct sModule {
37 int (*Init)(char **Arguments);
38 char **Dependencies; // NULL Terminated List
39 } __attribute__((packed)) tModule;