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
);
--- /dev/null
+/*
+ * 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]);
+
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;
// Search Cache
ent = cache->FirstNode;
- prev = (tCachedInode*) &cache->FirstNode;
for( ; ent; prev = ent, ent = ent->Next )
{
if(ent->Node.Inode < Node->Inode) continue;
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);