Kernel - Changed MM_GetPhysAddr to take a pointer
[tpg/acess2.git] / KernelLand / Kernel / binary.c
index e72de28..de94c6f 100644 (file)
@@ -768,17 +768,7 @@ void *Binary_LoadKernel(const char *File)
        pKBinary->Next = glLoadedKernelLibs;
        glLoadedKernelLibs = pKBinary;
        SHORTREL( &glKBinListLock );
-       
-       // Relocate Library
-       if( !Binary_Relocate( (void*)base ) )
-       {
-               Log_Warning("Binary", "Relocation of '%s' failed, unloading", File);
-               Binary_Unload( (void*)base );
-               Binary_Dereference( pBinary );
-               LEAVE('n');
-               return 0;
-       }
-       
+
        LEAVE('p', base);
        return (void*)base;
 }
@@ -891,12 +881,12 @@ int Binary_int_CheckMemFree( tVAddr _start, size_t _len )
        _start &= ~(PAGE_SIZE-1);
        LOG("_start = %p, _len = 0x%x", _start, _len);
        for( ; _len > PAGE_SIZE; _len -= PAGE_SIZE, _start += PAGE_SIZE ) {
-               if( MM_GetPhysAddr(_start) != 0 ) {
+               if( MM_GetPhysAddr( (void*)_start ) != 0 ) {
                        LEAVE('i', 1);
                        return 1;
                }
        }
-       if( _len == PAGE_SIZE && MM_GetPhysAddr(_start) != 0 ) {
+       if( _len == PAGE_SIZE && MM_GetPhysAddr( (void*)_start ) != 0 ) {
                LEAVE('i', 1);
                return 1;
        }

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