Kernel/armv7 - Fixing some unneeded errors
authorJohn Hodge <[email protected]>
Thu, 20 Oct 2011 13:13:42 +0000 (21:13 +0800)
committerJohn Hodge <[email protected]>
Thu, 20 Oct 2011 13:13:42 +0000 (21:13 +0800)
Kernel/arch/armv7/mm_virt.c
Kernel/arch/armv7/proc.c

index 03c8cc7..53531d3 100644 (file)
@@ -545,7 +545,11 @@ tPAddr MM_Clone(void)
        tmp_map = new_lvl1_1;
        for( i = 0; i < 0x800-4; i ++ )
        {
-//             Log("i = %i", i);
+               // HACK! Ignore the original identity mapping
+               if( i == 0 && Threads_GetTID() == 0 ) {
+                       tmp_map[0] = 0;
+                       continue;
+               }
                if( i == 0x400 )
                        tmp_map = &new_lvl1_2[-0x400];
                switch( cur[i] & 3 )
index d61160f..a0a646b 100644 (file)
@@ -127,7 +127,7 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr )
 
        new = Threads_CloneThreadZero();
        if(!new)        return -1;
-       free(new->ThreadName);
+       if(new->ThreadName)     free(new->ThreadName);
        new->ThreadName = NULL;
 
        new->KernelStack = MM_NewKStack(1);

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