Changeset 824
- Timestamp:
- 08/06/08 14:35:32 (4 years ago)
- Files:
-
- 1 modified
-
Whitix/trunk/kernel/module.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/kernel/module.c
r730 r824 121 121 #endif 122 122 123 SYMBOL_EXPORT(ModuleSymbolPrint); 124 123 125 DWORD ModuleResolveKernel(char* name) 124 126 { … … 136 138 struct Module* curr; 137 139 140 PreemptDisable(); 141 138 142 /* Look through the kernel symbol table of different modules. */ 139 143 ListForEachEntry(curr, &moduleList, next) … … 148 152 { 149 153 if (!strcmp(currSym->name, name)) 154 { 155 PreemptEnable(); 150 156 return currSym->addr; 157 } 151 158 152 159 currSym++; … … 155 162 } 156 163 157 KePrint("Could not resolve %s\n", name);164 PreemptEnable(); 158 165 159 166 return 0; … … 198 205 break; 199 206 200 KePrint("Could not resolve %s\n", symName); 207 KePrint(KERN_ERROR "Could not resolve %s\n", symName); 208 201 209 return -ENOENT; 202 210 … … 373 381 module->keSymTab=ModuleSectionFind(module, (char*)file+sectionHeaders[elfHeader->strTabSectionIndex].shOffset, ".symtable", elfHeader->shEntries, &module->keSymTabSize); 374 382 375 ListAdd(&module->next, &moduleList); 383 PreemptDisable(); 384 ListAddTail(&module->next, &moduleList); 385 PreemptEnable(); 376 386 377 387 return ret; … … 411 421 strcat(buf, ".sys"); 412 422 413 KePrint("length = %#X: ", *length);414 415 423 if (ModuleAdd(data, kData, *length, 0)) 416 424 KernelPanic("Could not initialize the kernel"); 417 425 418 KePrint( "MODULES: Loaded %s, %dkb\n", buf, (*length)/1024);426 KePrint(KERN_INFO "MODULES: Loaded %s, %dkb\n", buf, (*length)/1024); 419 427 420 428 names+=strlen(names)+1; … … 434 442 int ret; 435 443 436 SpinLock(&moduleListLock);437 438 444 /* Check data is ok to access. */ 439 445 kData=(void*)VirtMapPhysRange(MODULE_START, MODULE_END, PAGE_ALIGN_UP(length) >> PAGE_SHIFT, 3); 440 446 441 447 ret=ModuleAdd(data, kData, length, 0); 442 SpinUnlock(&moduleListLock);443 448 444 449 return ret;
