From: John Hodge (sonata) Date: Tue, 23 Oct 2012 05:11:50 +0000 (+0800) Subject: Kernel - Fixed ARMv7 build, doesn't run X-Git-Tag: rel0.15~670 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=012806735cf2617b868e5c4dff4a8f1107239cf1;p=tpg%2Facess2.git Kernel - Fixed ARMv7 build, doesn't run --- diff --git a/KernelLand/Kernel/arch/armv7/mm_virt.c b/KernelLand/Kernel/arch/armv7/mm_virt.c index 85f9b27f..00d6c681 100644 --- a/KernelLand/Kernel/arch/armv7/mm_virt.c +++ b/KernelLand/Kernel/arch/armv7/mm_virt.c @@ -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 ); diff --git a/KernelLand/Kernel/arch/armv7/proc.c b/KernelLand/Kernel/arch/armv7/proc.c index 9d5643ef..fa1e02ce 100644 --- a/KernelLand/Kernel/arch/armv7/proc.c +++ b/KernelLand/Kernel/arch/armv7/proc.c @@ -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 index 00000000..8c8afdb7 --- /dev/null +++ b/KernelLand/Kernel/arch/armv7/vpci_realview_pb.c @@ -0,0 +1,16 @@ +/* + * Acess2 Kernel ARMv7 Port + * - By John Hodge (thePowersGang) + * + * vpci_realview_pb.c + * - Realview PB VPCI Definitions + */ +#include + +// === PROTOTYPES === + +// === GLOBALS === +tVPCI_Device gaVPCI_Devices[] = { +}; +int giVPCI_DeviceCount = sizeof(gaVPCI_Devices)/sizeof(gaVPCI_Devices[0]); + diff --git a/KernelLand/Kernel/vfs/nodecache.c b/KernelLand/Kernel/vfs/nodecache.c index 0d238941..b2cc57fa 100644 --- a/KernelLand/Kernel/vfs/nodecache.c +++ b/KernelLand/Kernel/vfs/nodecache.c @@ -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);