Kernel - Fixed ARMv7 build, doesn't run
authorJohn Hodge (sonata) <[email protected]>
Tue, 23 Oct 2012 05:11:50 +0000 (13:11 +0800)
committerJohn Hodge (sonata) <[email protected]>
Tue, 23 Oct 2012 05:11:50 +0000 (13:11 +0800)
KernelLand/Kernel/arch/armv7/mm_virt.c
KernelLand/Kernel/arch/armv7/proc.c
KernelLand/Kernel/arch/armv7/vpci_realview_pb.c [new file with mode: 0644]
KernelLand/Kernel/vfs/nodecache.c

index 85f9b27..00d6c68 100644 (file)
@@ -902,7 +902,7 @@ tVAddr MM_NewUserStack(void)
        tVAddr  addr, ofs;
 
        addr = USER_STACK_TOP - USER_STACK_SIZE;
-       if( MM_GetPhysAddr(addr + PAGE_SIZE) ) {
+       if( MM_GetPhysAddr( (void*)(addr + PAGE_SIZE) ) ) {
                Log_Error("MMVirt", "Unable to create initial user stack, addr %p taken",
                        addr + PAGE_SIZE
                        );
index 9d5643e..fa1e02c 100644 (file)
@@ -136,7 +136,7 @@ tThread *Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr )
        Uint32  sp;
 
        new = Threads_CloneThreadZero();
-       if(!new)        return -1;
+       if(!new)        return NULL;
        if(new->ThreadName)     free(new->ThreadName);
        new->ThreadName = NULL;
 
diff --git a/KernelLand/Kernel/arch/armv7/vpci_realview_pb.c b/KernelLand/Kernel/arch/armv7/vpci_realview_pb.c
new file mode 100644 (file)
index 0000000..8c8afdb
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Acess2 Kernel ARMv7 Port
+ * - By John Hodge (thePowersGang)
+ *
+ * vpci_realview_pb.c
+ * - Realview PB VPCI Definitions
+ */
+#include <virtual_pci.h>
+
+// === PROTOTYPES ===
+
+// === GLOBALS ===
+tVPCI_Device   gaVPCI_Devices[] = {
+};
+int giVPCI_DeviceCount = sizeof(gaVPCI_Devices)/sizeof(gaVPCI_Devices[0]);
+
index 0d23894..b2cc57f 100644 (file)
@@ -85,7 +85,7 @@ tVFS_Node *Inode_GetCache(int Handle, Uint64 Inode)
 tVFS_Node *Inode_CacheNode(int Handle, tVFS_Node *Node)
 {
        tInodeCache     *cache;
-       tCachedInode    *newEnt, *ent, *prev;
+       tCachedInode    *newEnt, *ent, *prev = NULL;
        
        cache = Inode_int_GetFSCache(Handle);
        if(!cache)      return NULL;
@@ -95,7 +95,6 @@ tVFS_Node *Inode_CacheNode(int Handle, tVFS_Node *Node)
        
        // Search Cache
        ent = cache->FirstNode;
-       prev = (tCachedInode*) &cache->FirstNode;
        for( ; ent; prev = ent, ent = ent->Next )
        {
                if(ent->Node.Inode < Node->Inode)       continue;
@@ -110,7 +109,10 @@ tVFS_Node *Inode_CacheNode(int Handle, tVFS_Node *Node)
        newEnt = malloc(sizeof(tCachedInode));
        newEnt->Next = ent;
        memcpy(&newEnt->Node, Node, sizeof(tVFS_Node));
-       prev->Next = newEnt;
+       if( prev )
+               prev->Next = newEnt;
+       else
+               cache->FirstNode = newEnt;
        newEnt->Node.ReferenceCount = 1;
 
        LOG("Cached %llx as %p", Node->Inode, &newEnt->Node);

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